Home  Products Prices Directory Order Contact New Books Files Links Other
DonTronics Home Page  PicBasic Compiler.
Bottom of Page
Current Version stocked 1.41
Due to time constraints, some pages aren't updated on a regular basis when the product is constantly changing.
This is just one of them.
But we offer a Free DT101 SimmStick PCB with every mEL PICBasic, and CCS C Compiler sold.

PicBasic, New Name, New Features!

Write your PIC programs in BASIC! The PicBasic Compiler converts these programs into hex or binary files that can be programmed directly into a PIC microcontroller. The easy-to-use BASIC language makes PIC programming available to everyone with its English-like instruction set.

The PicBasic Compiler instruction set is compatible with the Parallax BASIC Stamp I. BASIC Stamp I programs can be compiled into PIC code ready for programming into a PIC, eliminating the need for a BASIC Stamp module. The benefits of the PicBasic Compiler include faster program execution than BASIC interpreters, longer programs possible and substantial cost savings over a BASIC Stamp.

New Peek and Poke instructions let you access PORTA, A/D converters and other on-PIC features in BASIC. Also in the latest release, the serial speed has been increased to 9600 baud.

Assembly language instructions may be mixed with BASIC instructions through the use of the PicBasic Compiler's in-line assembler and Call instruction. Our PIC macro assembler is included and automatically invoked by the PicBasic Compiler.

The PicBasic Compiler runs on PC compatibles. It can create programs for the PIC16C6x, 62x, 7x and 8x series PIC microcontrollers and works with most PIC programmers.

*BASIC Stamp and PBASIC are trademarks of Parallax, Inc.

Available from DonTronics NOW.

Check the Dontronics "Manual and Disk" prices page for full pricing calculations.
And check out the Dontronics Upgrade price from Standard PicBasic to the PRO version of PicBasic.

Price includes PicBasic Compiler, and PIC Macro Assembler.
There is now a support group for Picbasic:
Send a message to majordomo@qunos.net
In the message body enter:
subscribe picbasic-l
This will then reply with a message to check your email exists and asking you to reply.
Once this is done you can send a message to picbasic-l@qunos.net


The PicBasic Pro Compiler is a new and separate product from this PicBasic Compiler. 

PM(tm) PIC-Macro Cross-Assembler


PicBasic Compiler Instruction Set

*PicBasic language extension not found in Parallax PBASIC 1.

PicBasic Sample Programs

' Blinks LED using HIGH and LOW commands to control specified pin.

Symbol  LED = 2                         ' LED Pin

Loop:   High LED                        ' LED On
        Pause 1000                      ' Delay 1 second
        Low LED                         ' LED Off
        Pause 1000                      ' Delay 1 second
        goto Loop                       ' Forever

' Blink LEDs using For..Next Loops. Uses Nap for low power.

Symbol  LED1_DIR = DIR2                 ' LED Direction Bit (0=Out, 1=In)
Symbol  LED2_DIR = DIR3
Symbol  LED1_PIN = PIN2                 ' LED Output Bit
Symbol  LED2_PIN = PIN3

        LED1_DIR = 1                    ' Make Pins Outputs
        LED2_DIR = 1

Loop:   For LED2_PIN = 0 To 1           ' Toggle LED 1
                For LED1_PIN = 0 To 1   ' Toggle LED 2
                        Nap 6           ' Delay Approx 1 Second (Low Power)
                Next LED1_PIN
        Next                            ' NOTE : No NEXT Variable
        goto Loop                       ' Forever

' Access PIC16C71 A/D using PEEK and POKE instructions.

Symbol  ADCON0 = 8                      ' A/D Configuration Register 0
Symbol  ADRES = 9                       ' A/D Result
Symbol  ADCON1 = $88                    ' A/D Configuration Register 1
Symbol  SO = 0                          ' Serial output

        poke ADCON1, 0                  ' Set PORTA 0-3 to analog inputs
        poke ADCON0, $41                ' Set A/D to Fosc/8, Channel 0, On

Loop:   poke ADCON0, $45                ' Start conversion
        pause 1                         ' Wait 1ms for conversion
        peek ADRES, B0                  ' Get result to variable B0

        serout SO,N2400,(#B0,10)        ' Send variable to serial out

        goto Loop

' Read and write PORTA using PEEK and POKE instructions.

Symbol  PORTA = 5                       ' PORTA address
Symbol  TRISA = $85                     ' PORTA data direction register
Symbol  SO = 0                          ' Serial output

        poke TRISA, 0                   ' Set PORTA to all output
        poke PORTA, 31                  ' Send a value to PORTA

        poke TRISA, 255                 ' Set PORTA to all input
Loop:   peek PORTA, B0                  ' Get PORTA inputs to variable B0

        serout SO,N2400,(#B0,10)        ' Send variable to serial out

        goto Loop


PicBasic Frequently Asked Questions

Q. Does the PicBasic Compiler work with BASIC Stamp II programs?

A. The PicBasic Compiler uses the BASIC Stamp I (PBASIC I) instruction set. However, most BASIC Stamp users are using only a few of the BASIC Stamp II specific instructions. BASIC Stamp II features such as more I/O pins can be accessed using the PicBasic Compiler's PEEK and POKE instructions or its in-line assembler function and assembler calls. These instructions allow any of the larger PICs expanded features to be accessed.

Q. I want to run a serial port at 9600 baud. Can the PicBasic Compiler do this?

A. Yes. The latest version of the PicBasic Compiler supports serial baud rates up to 9600. The supported baud rates are 300, 1200, 2400 and 9600.

Q. Does the PicBasic Compiler work with the PIC16C5x ( 54, 56, 58) parts?

A. The PicBasic Compiler does not support the older 5x series PICs. They only have a 2 level stack and the compiler requires the 8 level stack of the mid-range PICs. There are suitable pin compatible replacements for the 54, 56 and 58. The PIC16C620, 621 and 622 are an updated version of those 5x parts and are available in about the same price range. They have expanded features and are well suited to the PicBasic Compiler.

Q. Which PICs does the PicBasic Compiler support?

A. The PicBasic Compiler works with all of the PIC16C6x, 62x, 7x and 8x series PICs. These include the PIC16C61, 62, 620, 621, 622, 63, 64, 65, 71, 710, 711, 72, 73, 74, 83 and 84. It is particularly suited to the EEPROM PIC16C84 as it is a good match to the BASIC Stamp I feature set.

Q. How do I use the A/D converter on the PIC16C71?

A. The A/D converter on the PIC16C7x series parts may be accessed using either the PicBasic PEEK and POKE instructions or by using the in-line assembler feature. See the ADC71 sample program for an example.

Q. Can I use PORTA with the PicBasic Compiler?

A. As with the A/D coverter above, PORTA (and other ports on PICs with more pins) may be accessed using either the PicBasic PEEK and POKE instructions or by using the in-line assembler feature. See the PORTA sample program for an example.

 Q. Can I use the PIC16C74 as a platform for PicBasic?

 A. Yes, the '74 works OK with the compiler right now. Several people are using it. They want the A/D converters, real serial port, and more I/O. Peek and Poke makes it all possible.

 Every PIC has a problem at the 2K boundary. It's because of the cool page crossing design. Calls and the like don't have enough bits to handle the long address. You have to set the PCLATH before each instruction that may try to go to either side of 2K. Since the compiler was designed to be as small as possible to allow programs to fit in 1K or .5K PICs, the boundary problem hasn't been addressed. You need to fix up the assembler code every place it tries to cross the boundary (usually a daunting task unless you can just use the upper 2K for tables or the like.) Writing in PIC assembler or C has the same issues.

microEngineering Labs are looking at addressing this and there may be a future release that overcomes these limitations.


Revision Information:

Latest Release: 1.30

PicBasic Compiler Version 1.30 Copyright (c)1995, 1996 microEngineering Labs I2CIN and I2COUT commands for access to external serial EEPROMs.

 More user variables from B0-B79 and W0-W39 for use with larger PICs.

 PicStic 4+ PASS function.

 Interrupt vector access improved in INC\PBH.INC.

 ENDASM previously had to be on a line all by itself.

 

Previous Release: 1.20

Adds PEEK and POKE instructions for accessing all PIC registers including PORTA and A/D converters from BASIC. The maximum serial baud rate has been increased to 9600 baud.

Previous Release: 1.11

Adds in-line assembly capability and CALL instruction to assembler subroutines.

Additional Info: Full Update Info and other items of interest.


DonTronics PicBasic Compiler Upgrade Policy

Thank you for purchasing your PicBasic Compiler from DonTronics

Updates are being done on a regular basis and at this stage microEngineering Labs are making updates available free of charge, plus postage and handling costs. They calculate this at $10USD

DonTronics offers the same upgrade policy that microEngineering Labs offer. That is, free software upgrades to the latest revision. You need only pay a $15AUD handling fee to receive the latest release.

Just E-Mail us and quote your DonTronics Registration number. The $15AUD Payment can now be done by Credit Card using our Internet On-line Secure Credit Card Facilities at http://www.dontronics.com/ord.html.

This service is only for DonTronics customers. Please contact microEngineering Labs if you purchased elsewhere.
As per our agreement with mEL, new manuals must be purchased directly form mEL, as they may get out of date quickly if DonTronics were to stock them, however any new features are normally covered in the readme file that come with the files update.
 


Your DonTronics Registration Number for PicBasic Compiler is:

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .


DonTronics

Don McKenzie (Proprietor)
P.O. Box 595 Tullamarine 3043 Australia.
(Same address for 26 years).
http://www.dontronics.com
 
PicBasic Pro is from:

microEngineering Labs
Box 7532
Colorado Springs CO 80933
(719) 520-5323
(719) 520-1867 fax  
Home  Products Prices Directory Order Contact New Books Files Links Other
 

DonTronics Home Page

mailto: don@dontronics.com_
Copyright © 1996-99 DonTronics
 
 
 
Top of Page