MBASIC (Basic Micro)
From Wikipedia, the free encyclopedia
Programming Language used to program the Basic Atom line of microcontrollers made by Basic Micro. This implementation of basic has several chip specific commands and is interpreted with the Basic Micro CPU via a bootloader. There is support for a preprocessor in the beta IDE[1] for this chip and can be used on windows only. Limited project support is included.
[edit] Commands
- BRANCH - Computed GOTO (equivalent to ON..GOTO).
- BUTTON - Debounce and auto-repeat input on specified pin.
- CLEAR - Clear all user ram locations, setting all variables to zero.
- COUNT - Count Oscillations on PIN
- DATA - Initialize EEPROM with data
- DEBUG - Displays specified variables to the IDE
- DEBUGIN - Displays specified variables to the IDE
- DTMFOUT - Output DTMF signals on PIN.
- END - Stop execution and enter low power mode.
- FREQOUT - Output frequency on PIN
- FOR..NEXT - Repeat statement(s) specific # of times
- GOSUB...RETURN - Call BASIC subroutine at specified label.
- GOTO - Continue execution at specified label.
- HIGH - Make pin output high.
- IF..THEN..ELSE..ENDIF - Goto if specified condition is true or skip false.
- INPUT - Make pin an input.
- LET - Assign result of an expression to a variable.
- LOOKDOWN - Search table for value.
- LOOKUP - Fetch value from table.
- LOW - Make pin output low.
- NAP - Power down processor for short period of time.
- OUTPUT - Make pin an output.
- PAUSE - Delay (1mSec resolution).
- PAUSEUS - Delay (With in 1us resolution).
- PAUSECLK - Delay based on internal hardware timer.
- PULSIN - Measure pulse width (10us resolution).
- PULSOUT - Generate pulse (10us resolution).
- PWM - Output pulse width modulated pulse train to pin.
- RANDOM - Generate random value.
- RCTIME - Measure time High to Low on pin. (Reading a Potentiometer)
- READ - Read byte from any on-chip EEPROM.
- RETURN - See GOSUB command
- REVERSE - Make output pin an input or an input pin an output.
- SERIN - Asynchronous serial input (8N1).
- SEROUT - Asynchronous serial output (8N1).
- SHIFTIN - Read binary data on PIN w/ Flow control.
- SHIFTOUT - Output binary data on PIN w/ Flow control.
- SLEEP - Power down processor for a period of time.
- STOP - Stop CPU and SLEEP forever
- TOGGLE - Make pin output and toggle state.
- WRITE - Write byte to any on-chip EEPROM