BASCOM-AVR1® is a Windows BASIC COMPILER IDE for the AVR family.
It is designed to run on Microsoft Windows XP/VISTA/WIN7, WIN8 and WIN10/WIN11 (32&64-bit).
This product description was updated on 24/04/2025 to reflect new version features. Please note that we do not update the description below each time the software is updated. Please see the Online Help for a list of all statements and functions.
Key BenefitsThe following statements are supported (actually there are more - see DEMO version help file for full list):
Decision and structuresIF, THEN, ELSE, ELSE IF, END IF, DO, LOOP, WHILE, WEND, UNTIL, EXIT DO, EXIT WHILE, FOR, NEXT, TO, DOWNTO, STEP, EXIT FOR, ON .. GOTO/GOSUB, SELECT, CASE, CONTINUE, REDO
Input and output
PRINT, INPUT, INKEY, PRINT, INPUTHEX, LCD, UPPERLINE, LOWERLINE,DISPLAY ON/OFF, CURSOR ON/OFF/BLINK/NOBLINK, HOME, LOCATE, SHIFTLCD LEFT/RIGHT, SHIFTCURSOR LEFT/RIGHT, CLS, DEFLCDCHAR, WAITKEY, INPUTBIN, PRINTBIN, OPEN, CLOSE, DEBOUNCE, SHIFTIN, SHIFTOUT, GETATKBD, SPC, SERIN, SEROUT
Numeric functions
AND, OR, XOR, INC, DEC, MOD, NOT, ABS, BCD, SIN,COS,TAN,EXP
I²C
I²CSTART, I²CSTOP, I²CWBYTE, I²CRBYTE, I²CSEND and I²CRECEIVE
1WIRE
1WWRITE, 1WREAD, 1WRESET, 1WIRECOUNT, 1WSEARCHFIRST, 1WSEARCHNEXT
SPI
SPIINIT, SPIIN, SPIOUT
Interrupt programming
ON INT0/INT1/TIMER0/TIMER1/SERIAL, RETURN, ENABLE, DISABLE, COUNTERx, CAPTUREx, INTERRUPTS, CONFIG, START, LOAD
Bit manipulation
SET, RESET, ROTATE, SHIFT, BITWAIT, TOGGLE
Variables
DIM, BIT , BYTE , INTEGER , WORD, LONG, SINGLE, DOUBLE, STRING , DEFBIT, DEFBYTE, DEFINT, DEFWORD
Miscellaneous
REM, ' , SWAP, END, STOP, CONST, DELAY, WAIT, WAITMS, GOTO, GOSUB, POWERDOWN, IDLE, DECLARE, CALL, SUB, END SUB, MAKEDEC, MAKEBCD, INP,OUT, ALIAS, DIM , ERASE, DATA, READ, RESTORE, INCR, DECR, PEEK, POKE, CPEEK, FUNCTION, READMAGCARD, BIN2GREY, GREY2BIN, CRC8, CRC16, CRC32, CHECKSUM
Compiler directives
$INCLUDE, $BAUD and $CRYSTAL, $SERIALINPUT, $SERIALOUTPUT, $RamsIZE, $RamsTART, $DEFAULT XRAM, $ASM-$END ASM, $LCD, $EXTERNAL, $LIB
String manipulation
STRING, SPACE, LEFT, RIGHT, MID, VAL, HEXVAL, LEN, STR, HEX, LTRIM, RTRIM, TRIM, LCASE, UCASE, FORMAT, FUSING, INSTR, CHARPOS
And many, many other functions and statements ! Check the Online Help.
Program CreationTo make a program takes just a few steps:
This is a screen shot of the editor. You can work in normal mode or project mode.
On the left you find the Code Explorer. The Code explorer can show unused data in a different colour.
When the Code Explorer is visible, the editor supports Proper Indent and Indent drawing.
Indent lines can be a great visual help.
A tool tip with info can be shown by pressing SHIFT :
Here it is clear that BDIL is a byte variable, dimension-ed in the module CAN-Elektor.bas
It will show info for constants, aliases, variables and functions.
BASCOM-AVR supports the tiny, mega and Xmega processors with internal SRAM and 32 registers.
A full list you find on avrhelp.mcselec.com under the Chips topic.
In 2019 Atmel/Microchip introduced new AVR processors. The Xtiny (attiny816 for example) , the megaX (mega4808 for example) and AVRX(AVR128DB28 for example).
While the names suggest these are normal AVR processors they only share the AVR instructions. The hardware is different. New capabilities, different timers, different programming interface (UPDI).
For this reason MCS names these processors different so you know as a user that these are no drop in replacements. Code need to be slightly adapted. While usually all you need to do is change the $REGFILE directive, now you need to make some more changes. It is explained in the on line help. You can see it like the difference between a normal AVR and an XMEGA. The new AVR look more like XMEGA.
For the new Xtiny processors you need an add-on which need to be purchased separately. You only need it when you plan to use these new processors.
So to be clear : the normal BASCOM-AVR version supports Xmega and the AT90 and ATMEGA and ATTINY range with ISP/PDI interface. For new processors with UPDI interface you need BASCOM-AVR + the add on.
Please note that it might take up to 2 additional working days to send your order for this product.