PIC-BASIC-Compiler

iL_BAS16xx

PIC-BASIC-Compiler

(for Windows (Win9x, W2k, XP, NT)

PRICE

Shareware version for 16C83 for download

This BASIC compiler iL_BAS16xxx helps you to write programs for Microchips PIC microcontrollers quick and easily. Today following controllers are supported: PIC10F20x, PIC12C50x, PIC12C67x, PIC16Cxx and PIC16Fxx (list). iL_BAS16xxx produces real object code and is not an interpreter. After assembling the source code you may put it in your desired PIC by iL_PRG16PRO, PICSTART plus or equivalent programers.
BASIC is a simple language and easy to learn, really. We won't participate on that never ending discussion "which is the best language". Fact is: You can write BASIC programs which are very effective. You can create these programs is a form that makes them readable years ago.

iL_BAS16 generates code that is very compact and efficiently. For example: Assignments like LET A=0 or INC A are recognized and coded in a very optimized code. The Compiler produces different code in IF-clauses if it is a bit comparison than an byte comparison. This save a lot of program memory.
iL_BAS16PRO (professional version) supports 32-bit arithmetic!
In combination with the simulator iL_SIM16 high level language debugging is available. You check your BASIC program line by line without any touch of the controller's machine language. But anyway, if your familiar with the machine language you may put your own routines in the BASIC program using the commands ASM and ENDASM. Machine language together with BASIC is no problem. But I'm sure you'll never mind.
Handling interrupts is also very easy (10F20x, 12C5xx and 16C5x have no interrupts). The crystal frequency is on your own choice, the compiler calculates the needed values for e.g. delays, serial i/o etc.

A lot of BASIC key words make programming easy. The BASIC key words are listed below. (date 12/2004):
ADDELAY charging time for hold capacitor
ADINP read analogue inputs (only for 12C67x, 16C7x and 16F87x)
ASM machine language follows
BINTOASC converts 8 or 16 bit variable into ascii string new
BINTOBCD converts 8 or 16 bit variable into a packed bcd format new
BINTODEC expands 8 or 16 bit variable to 3 or 5 byte new
BITPOS converts a number from 0 to 7 into the number representing the bit position
CALVAL defines the value for calibration of internal rc oscillator
CLOCK real time clock using internal timer TMR0 (not 10F20x, 12C5xx and 16C5x)
CLOCK1 real time clock using internal timer TMR1, if implemented (not 10F20x, 12C5xx and 16C5x) new
CLRWDT resets watchdog (only together with $WDTUSR and WDT_ON)
CONASC converts 8 or 16 bit variable into ascii string
CONDEC expands 8 or 16 bit variable to 3 or 5 byte
CURSOFF turns cursor off (lcd)
CURSON turns cursor on (lcd)
DATA defines a table of contants (not 10F20x, 12C5xx and 16C5x)
DEC decrements the contents of a variable
DELAY short delay (resolution 100us)
DOZE short power saving sleep mode
DTMFOUT generates DTMF signals (dialing tones)
EEDATA defines values for internal eeprom, programming by prommer
END end of program, controller is set in sleep mode
ENDASM the end of ASM command
ERR copy the internal error status into a variable, e.g. time-out, overflow
FOR TO NEXT FOR-NEXT loops, up to 16 levels
FREQIN counts pulses during a defined periode
GOSUB jump to a subroutine, up to 4 levels
GOTO jump to a label, no line numbers are required!
HIGH i/o pin becomes output and is set high
I2CDELAY slows down the I2C communication, e.g. or long distance
I2CHARDS turn on the I2C module of the PIC to work as a slave
I2CINIT initializes 2 pins for then I2C communication
I2CREAD reads data from an I2C device
I2CRD reads data out of an I2C device without generating a start or stop condition
I2CSLAVE the PIC becomes an universal slave device
I2CST generates a start condition on I2C bus
I2CSP generates a stop condition on the I2C bus
I2CWRITE writes into an I2C device
I2CWR writes into an I2C device without generating a start or stop condition
IF THEN ELSE conditional jumps or assignments
INC increments the contents of a variable
INKEY scans a 4x4 key matrix, even on then same port as LCD possible (4x3)
INP i/o pin becomes input
INPUT reads the port (8 bits)
INTERRUPT user defined interrupt routines are enabled and insert in the interrupt queue
INTEND indicates the end of the user defined interrupt routine (isr)
INTPROC indicates the beginning of the user defined isr
LCDCLEAR clears the LCD display
LCDDELAY if you are using slower LCD displays
LCDINIT initializes LCD displays with HD44780 controller (4 bit)
LCDTYPE defines serveral kind of connections for LCD (e.g. 74LS164) new
LCDWRITE writes data onto the display
LET Assignment (must be used)
LOCATE puts cursor to a determinate position on a lcd new
LOFREQ produces frequencies up to approx. 2kHz
LOOKDN reads a table of values
LOOKUP reads the index of a table of values
LOW i/o pin becomes output and is set to low
ON...GOSUB multiple conditional calls of subroutines
ON...GOTO multiple conditional jumps
OUTP i/o pin becomes output
OUTPUT 8 bits are send to a port
PEEK reads the contents of a file register
POKE writes into a file register
PRINT for debugging (only 16F627, 16F628, 16F818, 16F819 and 16F87x)
PULSIN measures the pulse duration
PULSOUT generates a pulse
PWM generates a pwm signal, e.g. for analogue output
RANDOM generates a random number
RCTIME measures the time of charge/uncharge a capacitor
READ reads data form the eeprom (only for PICs with build-in data eeprom)
READDATA gets the next item of the data list (not 10F20x, 12C5xx and 16C5x)
REM indicates a comment line
RES pin is set to low
RESTORE sets the data pointer to a specified line (not 10F20x, 12C5xx and 16C5x)
RETURN end of the subroutine
REVERS i/o pin becomes output an the actual level is inverted
SERIN reads data serial
SEROUT writes data serial
SET pin is set to high
SETBAUD defines different baud rate when using interrupt driven usart transmit routines
SLEEP controller is put in sleep mode
SOUND generates frequencies from approx. 1kHz up to 20kHz
SWAP swaps the two nibbles in a variable
TOGGLE level at the i/o pin is inverted
TRIS initializes the tris register
VARPTR returns the address of the file register the basic variable is stored in
WAIT waits for a certain time (solution 1ms, no power consumption is reduced)
WRITE writes data in the eeprom (only for PICs with build-in data eeprom)


The following arithmetic and logical function are available:

+ - * / mod
and or xor swap
shl shr rotl rotr


You may use the following comparisons:

= < > <= >=

PRICE
email ordering
home page