Thursday, May 26, 2016

BASCOM for 8051 Basic Compiler


hiembeddedlovers now 8051 issythan u think. with BASCOM.
no need anyhderfile no need anycomplex flow. just go with BASCOM - 8051

This is the first Basic compiler on MCU project at few yrs ago and till now it is still my favourite. Simple, sy to use and FREE (demo version can run 4K ). and i am also provide for that.

I am work with P89V51RD2 using BASCOM-8051 and keil4, i think BASCOM is moresimplethan keil.




Benefits


Structured BASIC with labels.Structured programming with IF-THEN-ELSE-END IF, DO-LOOP, WHILE-WEND, SELECT- CASE.Fast machine instd of interpreted .Variables and labels can be as long as 32 characters.Bit, Byte, Integer, Word, Long, Single and String variables.Compiled programs work with any 8051 uP such as AT89C1051, AT89C2051, 8031, 8032, 8051, 8052, 80552, 80535 and 80537 m Processors.Statements are highly compatible with ’s VB/QB.Special commands for L-displays , I2C chips and 1WIRE chips.Integrated terminal emulator with download option..Integrated simulator for testing.Integrated flash programmer and support for SPI, PG2051, PG302, SE512, SE514, TAFE. (hardware can be purchased separately)Editor with statement highlighting.Context sensitive help.For compatibility with BASCOM LT, there is also a 32-bit version of the BASCOM LT compiler.

The following statements are supported :

Decision and structures
IF, THEN, ELSE, ELSEIF, END IF, DO, LOOP, WHILE, WEND, UNTIL, EXIT DO, EXIT WHILE, FOR, NEXT, TO, DOWNTO, STEP, EXIT FOR, ON .. GOTO/GOSUB, SELECT, CASE.

Input and output
PRINT, INPUT, IN, PRINTHEX, INPUTHEX, L, UPPERLINE, LOWERLINE,DISPLAY ON/OFF, CURSOR ON/OFF/BLINK/NOBLINK, HOME, LOE, SHIFTL LEFT/RIGHT, SHIFTCURSOR LEFT/RIGHT, CLS, DEFLCHAR, WAIT, INPUTBIN, PRINTBIN, LHEX, OPEN, CLOSE, DEBOUNCE, SHIFTIN, SHIFTOUT.

Numeric functions
AND, OR, XOR, INC, DEC, MOD, NOT, ABS, B.

I2C
I2CSTART, I2CSTOP, I2CWBYTE, I2CRBYTE, I2CSEND and I2CRECEIVE.

1WIRE
1WWRITE, 1WRD, 1WRESET.

SPI
SPIINIT, SPIIN, SPIOUT.

Interrupt programming
ON INT0/INT1/TIMER0/TIMER1/, RETURN, ENABLE, DISABLE, PRIORITY SET/RESET, COUNTERx, CAPTUREx, INTERRUPTS, CONFIG, START, LOAD.

Bit manipulation
SET, RESET, ROTATE, BITWAIT.

Variables
DIM, BIT , BYTE , INTEGER , WORD, LONG, SINGLE, STRING , DEFBIT, DEFBYTE, DEFINT, DEFWORD.

Miscellaneous
REM, ' , SWAP, END, STOP, CONST, DELAY, WAIT, WAITMS, GOTO, GOSUB, POWERDOWN, IDLE, DECLARE, CALL, SUB, END SUB, MAKEDEC, MAKEB, INP,OUT, ALIAS, DIM , ERASE, DATA, RD, RESTORE, INCR, DECR, PEEK, POKE, CPEEK, GETRC5.

Compiler directives
$INCLUDE, $NOINIT, $BAUD and $CRYSTAL, $OBJ, $INPUT, $OUTPUT, $ROMSTART, $RAZE, $RAMSTART, $MONSTART, $IRAMSTART, $DEFAULT XRAM, $ASM-$END ASM, $L.

Conditional compilation
#IF, #ELSE, #ENDIF

String manipulation
STRING, SPACE, LEFT, RIGHT, MID, VAL, HEXVAL, LEN, STR, HEX, LCASE, UCASE

To make a program takes just a few steps :


Write the program in BASICCompile it to fast machine binary Test the result with the integrated simulator(with additional hardware you can simulate the hardware too)Program the chip with one of the integrated programmers.(hardware must be purchased separately)
L
:

you candownload this from this link.

and enjoe 8051 with BASCOM.

No comments:

Post a Comment