STM8 BASIC™ gives you the power and flexibility you need to program an STM8 microcontroller from your BASIC code.
Designed by STM8 BASIC in United States of AmericaNo shipping info available.
Set destination country to see options
Shipping to starts at
Free shipping is available to !
Ships from
This item does not ship to .
More Info
Sign up to get notified when this product is back in stock!
Manuals are freely available for download at: BASIC Embedded Compact BASIC Embedded Please review both manuals prior to purchasing in order to make sure you are getting the "Syntax version" that yo…
Read More…Manuals are freely available for download at:
Please review both manuals prior to purchasing in order to make sure you are getting the "Syntax version" that you want for your boards.
Quite possibly the Smallest and Least Expensive User Programmable Embedded Controller EVER with an on-board fully integrated development environment!
The STM8S103F3P6 Minimum System Board containing STM8 BASIC Embedded™ or STM8 Compact BASIC Embedded™ is a 1.125" x .75" (30mm x 18mm) Single Board Computer containing a version of the BASIC programming language designed specifically for FAST, EASY, and INEXPENSIVE Embedded Systems Development.
If you need a very tiny, very inexpensive, very low power, and very simple to program controller for performing Controller functionality such as Analog to Digital conversion, PWM output, Digital I/O and more then the STM8S103F3P6 version of STM8 BASIC™ is exactly what you’re looking for.
Designed by an Embedded Systems Architect with 40 years embedded systems experience, using every technique they knew to squeeze an amazing amount of functionality onto a microcontroller with only 8K Flash code memory and 1K of RAM (and only uses ¾ of that RAM – the rest belongs to you!).
Yet because of just that it’s easily usable by hobbyists or students as well as professionals.
STM8 BASIC™ gives you the power and flexibility you need to program the internal peripherals of the STM8S103F3P6 microcontroller from your code – and even allows you to additionally load your own custom STM8 machine code routines into memory and execute them along with your code.
And of course, there is an Auto-Run feature that lets you decide if you want your program to run automatically on power-on or reset… it is intended to be an unattended controller after all; with such a minuscule power consumption (max 2.3 mA @ 3.3 VDC) that you can run off very small capacity batteries for extended periods of time. Excellent for use as an industrial controller or an unattended remote IoT sensor “leaf node”.
No development tools needed! Your purchase price gives you a completely self-hosted development environment with built-in editor and debugger – all the software tools you need to start your project right out of the box. Your code is held in non-volatile EEPROM rated at 300K write cycles. No need to download code to your board, unless you want to of course (and the manual tells you how if you prefer editing and archiving your code on a PC).
And as for the debugger - you can optionally trace every line of execution with not just a line number, but the entire line displayed along with the value of all the variables. No need to have a listing at hand to match line numbers to lines of code, it’s all there in a single glance.
Stuck in a “forever loop”? Hit Escape and the program breaks displaying the line number last executed. Or alternatively enable the debugger and you will have a trace of every line executed along with every variable value at that moment to see just where and why you never exit the loop.
STM8 BASIC Embedded™ and STM8 Compact BASIC Embedded™ both contain almost an identical set of features, the primary difference being that STM8 Compact BASIC Embedded™ uses a “compact” syntax that takes up on average 15% to 30% less program memory to implement the exact same functionality – allowing you to fit more into your programs using less memory. On the other hand, some may prefer STM8 BASIC Embedded™ which uses a traditional BASIC syntax similar to that used by Microsoft and Commodore in their early versions of BASIC for 8-bit systems such as the Commodore 64 and original IBM-PC.
Full support for conveniently controlling the microcontroller via it’s device registers by providing not only Decimal but also Hexadecimal numbers, math, and display along with all of the “Bitwise” operators provided by the ‘C’ programming language (bitwise AND, bitwise OR, bitwise XOR, shift right, shift left, bitwise negation).
Operators include all standard math operators, plus a Modulo operator.
USR (call a machine code or “C helper” routine)
PEEK and POKE any memory location be it RAM, EEPROM, or device register (excepting Flash memory containing the STM8 BASIC™ System which is read/copy protected). Attempting to access a non-existent or protected memory location will not result in a fault – your program will keep right on running normally.
With headers soldered on an STM8 BASIC module can fit in a 20-pin DIP footprint for prototyping boards and ease of layout for through-hole PCBs.
Includes a 45 page User’s Manual (downloadable pdf) including a board schematic, memory map, program listings that show you how to use STM8 BASIC’s features by example, and more. Download a copy of both manuals for STM8 BASIC Embedded™ and STM8 Compact BASIC Embedded™, then before buying you can decide which version will best suit your needs (links to manuals are below).
Manuals are freely available for download at:
For BASIC Embedded: https://www.dropbox.com/s/iilsx3dredfwd7d/STM8EMBEDDEDBASIC_052420.pdf?dl=0
For Compact BASIC Embedded:
https://www.dropbox.com/s/sn24ppa8wuanj2o/STM8COMPACTBASICEMBEDDED_052420.pdf?dl=0
IMPORTANT NOTE: This board will require either a Serial to USB converter cable (recommended) -or- a direct RS-232 serial connection to a PC serial port (a direct RS-232 connection also requires 3.3VDC <-> 5VDC level shifters for the RX and TX lines) to connect to a PC running a serial terminal program, such as Tera Term or PuTTY. Either of these inexpensive required items are almost always available for sale on Ebay and elsewhere on the web.
Note that the FTDI based Serial to USB cables are known to work on all modern versions of Windows, but the PL203 based cables will not run on Windows 8x or Windows 10 - earlier versions of Windows (7 and prior) to my knowledge are no problem for the PL203 based cables.
EXAMPLE ANALOG TO DIGITAL CONVERSION PROGRAM
Shown in both BASIC Embedded™ and Compact BASIC Embedded™ syntax:
Here is a small example program using STM8 BASIC Embedded™ demonstrating reading a voltage on an Analog to Digital input, sampling every half second, and printing the updated value at the upper left hand corner of the display. This program could also be modified to just as easily send the data in ASCII or binary in your chosen data format out the UART to any device you wish to have receive it using one of the ‘C helper’ functions (UserSendByte) callable from your BASIC code.
First, set up the I/O port ‘D’ as an input with no internal pull-up and I/O interrupts disabled.
1 POKE $500F,0
2 POKE $5010,0
3 POKE $5011,0
Next set ADC1 channel to AIN4 (Analog input 4) in the ADC Control Status register.
40 POKE $5400,4
Set Left-aligned result data using Configuration Register 2
60 POKE $5402,0
Enable ADC1. First POKE to Configuration Register 1 “turns on” the ADC. Subsequent invocations of the same POKE will trigger a conversion.
70 POKE $5401,1
Clear the screen
100 CLR
Trigger a conversion
105 POKE $5401,1
Wait for the conversion done bit to be set. Check the bit by reading the Control Status Register, then doing a bitwise AND using hexadecimal 80 as a bit mask on the result.
110 L=PEEK $5400
120 IF L&$80 THEN 200
130 GOTO 110
Reset the conversion complete bit.
200 POKE $5400,4
Read the result. Use byte variables X and Y to hold the high and low byte values of the result.
210 X=PEEK $5404
220 Y=PEEK $5405
Print the output, using the relationship between special variables X, Y, and Z. Z is an unsigned 16-bit variable that overlays both X and Y (like a union in the C programming language) such that X is the high byte of Z and Y is the low byte of Z. Divide the result by 19 to convert ADC counts to millivolts.
310 PRINT Z/19
Use the tenth-millisecond delay (WAIT) to wait 0.5 seconds
320 WAIT 5000
Go do it all over again until the user breaks out of the program.
400 GOTO 100
[Program size 262 bytes]
NOTE: An “END” statement is optional at the end of your program – if it’s not there the interpreter implies an “END”, in this example we leave it out as it would never be reached.
AND NOW, THE SAME EXACT PROGRAM USING STM8 Compact BASIC Embedded™ with it’s more compact syntax using fewer bytes of code to perform the same functionality:
WM = Write Memory (POKE)
RM = Read Memory (PEEK)
CL = Clear Screen (CLR)
JP = Jump to line (GOTO)
CO = Console Out (PRINT)
?: = Conditional Branch (IF/THEN)
WT = Delay 10th milliseconds (WAIT)
1 WM $500F,0
2 WM $5010,0
3 WM $5011,0
40 WM $5400,4
60 WM $5402,0
70 WM $5401,1
100 CL
105 WM $5401,1
110 L=RM $5400
120 ?L&$80:200
130 JP 110
200 WM $5400,4
210 X=RM $5404
220 Y=RM $5405
310 CO Z/19
320 WT 5000
400 JP 100
[Program size 223 bytes]
No country selected, please select your country to see shipping options.
No rates are available for shipping to .
Enter your email address if you'd like to be notified when STM8 BASIC can be shipped to you:
Thanks! We'll let you know when the seller adds shipping rates for your country.
Shipping Rate | Tracked | Ships From | First Item | Additional Items |
---|---|---|---|---|
:
|
Mail from our very remote Alaska island, on the Pacific Ocean, goes out approximately 2 times per week on various days when the weather is good enough for the mail plane to come and go. If weather is really good, mail goes out 3 times per week. If weather is bad, mail might be delayed from a few days to a couple of weeks - until the bad weather clears. The mail plane is a single propeller float (pontoon) plane that can only fly the 100 miles to us in clear weather with low winds during daylight hours, to do otherwise would put lives at risk! Thank you for your understanding :)
Product: (5.00)
Documentation: (4.83)
Shipping: (4.67)
Communication: (4.83)
Scott | Nov. 17, 2020
Gian Luca | Oct. 2, 2020
José Ángel | Sept. 25, 2020
Piero Giorgio | Aug. 12, 2020
Massimiliano | Aug. 7, 2020
Val | Aug. 7, 2020
No shipping info available.
Set destination country to see options
Shipping to starts at
Free shipping is available to !
Ships from
This item does not ship to .
More Info
Sign up to get notified when this product is back in stock!
Edna Bay, AK, United States of America
Ships from United States of America.
6 Reviews | 21 Orders
By clicking Register, you confirm that you accept our Terms & Conditions
We recognize our top users by making them a Tindarian. Tindarians have access to secret & unreleased features.
We look for the most active & best members of the Tindie community, and invite them to join. There isn't a selection process or form to fill out. The only way to become a Tindarian is by being a nice & active member of the Tindie community!