logo image - link to home page

Products | Support | Resources | PurchaseContact  | Basket  | Checkout

  Home
  What's New
  Products
  Distributors
  Purchasing Info
  Developer Resources
  Support
  Upgrades
  Site Index
  Contact Us
  Pb-Free Info (RoHS)
 

 

keyword search:
 


 

Home:
  Developer Resources:

Programming Help
    Sample Programs
    Search the
PICBASIC™ List
    PICBASIC PRO™
Compiler Manual
    PICBASIC™ Compiler
Manual
    Serin2/Serout2 Modes
    ASCII Character Set
    Number Conversion
    Floating Point
Routines
    PBP Debug Monitor
    Articles and Tutorials

Hardware Help
    PICmicro® MCU
Selection Guide
    PIC16F62x Datasheet
    PIC16F84A Datasheet
    PIC16F87x Datasheet
    Parts / Vendor List
    PICPROTO™ Boards
    LAB-X1 Docs
    LAB-X2 Docs
    LAB-X20 Docs
    LAB-X3 Docs
    LAB-X4 Docs
    LAB-XUSB Docs
    LAB-XT Docs
     

 Other Resources
    MicroCode Studio
IDE for Windows
    melabs Loader
HEX files
    Links to other sites

Sample Code

To save these files to your computer, you may have to right-click the hyperlink and select "Save Target As..." from the context menu.

 

PICBASIC PRO™ Compiler  back to top

767pwm.bas (2.45 or later) PICBASIC PRO program that demonstrates the steps necessary to use hardware PWM channel 3 on the 16F767 (and similar devices).
7segment.pbp PICBASIC PRO program to demonstrate 7-segment LED display. Schematic can be found on ledart.htm (fig 6).
a2d10.bas PICBASIC PRO program to display result of 10-bit A/D conversion on LCD without using ADCIN.
a2d8.bas PICBASIC PRO program to display result of 8-bit A/D conversion on LCD without using ADCIN.
adcin10.bas ADCIN Command - PICBASIC PRO program to display result of 10-bit A/D conversion on LCD.
adcin8.bas ADCIN Command - PICBASIC PRO program to display result of 8-bit A/D conversion on LCD.
asmint.bas Interrupts in assembly language - Interrupt on PORTB.0 turns LED off. Program waits .5 seconds and turns LED back on.
bcd.bas PICBASIC PRO program to demonstrate conversion to and from BCD format
blink.bas Example program from PBP manual to blink an LED connected to PORTB.0 about once a second
button.bas Demonstrate BUTTON command. Prints working variable (in this case B0) to show how auto-repeat works. Prints "PRESS" when button is pressed or repeated.
case.bas (2.40 or later) Demonstrates the use of the SELECT CASE command structure.
div32.bas (2.40 or later) Demonstrates the use of the DIV32 command for 31x15-bit division.
ee.bas Demonstrate commands for EEPROM. Works on PIC16F(C)84 targets only!!!  Initialized address 0..5 and 9. Writes 10..63. This leaves addresses 6..8 undefined (assuming your programmer doesn't unconditionally program all EEPROM locations).
ee12ce.bas Read and Write to internal I2C EEPROM on the 12CExxx devices.
ee16ce.bas Read and Write to internal I2C EEPROM on the 16CExxx devices.
eeword.bas READ and WRITE word variables to on-board EEPROM
for.bas FOR..NEXT Command - Prints series of numbers showing STEP facility.
fp.zip FLOATING POINT ROUTINES - Add, Subtract, Multiply, and Divide using 24 or 32 bit floating point.  Includes math libraries and 4 sample programs. 
hardpwm.bas PICBASIC PRO Program to demonstrate hardware PWM.
i2c.bas I2CREAD and I2WRITE Commands - Write to the first 16 locations of an external serial EEPROM Read first 16 locations back and send to serial out repeatedly. Note: for EEPROMS with byte-sized address
i2cee12.bas I2CREAD and I2WRITE Commands - Internal EEPROM on 12-bit core.
i2cee674.bas I2CREAD and I2WRITE Commands - Write to the first 16 locations of internal I2C EEPROM. Read first 16 locations back and send to serial out repeatedly. For PIC12CE67x MCU's
i2cee625.bas I2CREAD and I2WRITE Commands - Write to the first 16 locations of internal I2C EEPROM. Read first 16 locations back and send to serial out repeatedly. For PIC16CE62x MCU's
i2cslave.bas
i2cmast.bas
PICBASIC PRO program to demonstrate the I2C slave function.  Use i2cmast.bas to read and write data to the slave device.
lcd.bas PICBASIC program to demonstrate operation of an LCD in 4-bit mode
logic.bas Display Truth Table for Binary Logical Operators.
lookdown.bas LOOKDOWN Command - Convert ASCII Hexadecimal characters to numeric equivalents.
lookup.bas LOOKUP & RANDOM Commands - Convert numeric value to ASCII hexadecimal equivalents.
maxmin.bas MAX/MIN Operators - Use MAX and MIN operators to Bound [0..9] to [3..7]
onewire.bas (2.40 or later) OWIN & OWOUT Commands - Interface to the DS1820 temperature sensor with one-wire.
onint.bas On Interrupt - Interrupts in BASIC - Interrupt on PORTB.0 turns LED off.  Program waits .5 seconds and turns LED back on.
ps2clock.bas PicStic-2 Clock Test - Requires Micromint PicStic-2 with JRC6355
ps3adc.bas PicStic-3 ADC Test - Requires Micromint PicStic-3 with LTC1298
pulsin.bas PULSIN Command - Serial Pulse Width Meter
pulsout.bas PULSOUT Command - Variable Pulse Generator. Two buttons adjust from off to 10mSec in 10 uSec steps.
ser2mod.bas A collection of examples using Serin2 and Serout2.  Demonstrates the uses of modifiers.
serin.bas SERIN & SEROUT Commands - Upper case serial filter.
serqual.bas SERIN Command w/ Qualifiers - "Crude" serial filter for C++ Style Comments
shift.bas SHIFTIN and SHIFTOUT Commands
sleep.bas SLEEP Command - Slowly Blink LED Using Low Power Mode Delay
sound.bas SOUND Command - Make random computer-like noises. 
spimast.bas
spislave.bas
PICBASIC PRO program to read and write to SPI slave using the synchronous serial port
usart.bas Read and write hardware USART

PICBASIC PRO™ Compiler - written for the LAB-X1 Experimenter Board  back to top

adcx.bas
adcx.hex
PICBASIC PRO program to read pots on 16F877 ADC
adcin3x.bas
adcin3x.hex
PICBASIC PRO program to display result of 8-bit A/D conversion on LCD.  Reads all three pots.
blink8x.bas
blink8x.hex
PICBASIC PRO program to blink all the LEDs connected to PORTD
blinkx.bas
blinkx.hex
PICBASIC PRO program to blink an LED connected to PORTD.0 about once a second
bpx.bas
bpx.hex
PICBASIC PRO program to simulate an LCD Backpack
butx.bas
butx.hex
PICBASIC PRO program to show button press on LED
clockx.bas
clockx.hex
LCD clock program using On Interrupt. Uses TMR0 and prescaler. Watchdog Timer should be set to off at program time and Nap and Sleep should not be used. Buttons may be used to set hours and minutes
cmp877Ax.bas
cmp877Ax.hex
(2.42 or later) PICBASIC PRO program to demonstrate the setup and use of analog comparators on the PIC16F877A.  (This program will not compile for the 16F877.)
eepagex.bas
eepagex.hex
PICBASIC PRO program to demonstrate the page-write capability of the 24LC256 serial memory.
hserx.bas
hserx.hex
PICBASIC PRO program to send and receive from the hardware serial port
i2cx.bas
i2cx.hex
PICBASIC PRO program to read and write to I2C SEEPROMs
i2cWordx.bas
i2cWordx.hex
PICBASIC PRO program to read and write to I2C SEEPROMs that require a word-sized address
jrcx.bas
jrcx.hex
LCD clock program using JRC6355 RTC
keyx.bas
keyx.hex
PICBASIC PRO program to display key number on LCD
lcdinx.bas
lcdinx.hex
PICBASIC PRO program to display "hello world" on LCD, then use LCDIN to read the first letter of each line and change it to upper case.
lcdx.bas
lcdx.hex
PICBASIC PRO program to display "Hello World" on LCD
ltcx.bas
ltcx.hex
PICBASIC PRO program to read LTC1298 ADC
mwx.bas
mwx.hex
PICBASIC PRO program to read and write to Microwire SEEPROM 93LC56A
progeex.bas
progeex.hex
PICBASIC PRO program that receives a hex file via RS232 and stores the data to a serial memory device.  For memory with word-size address and 16 byte page write capability.
progee8x.bas
progee8x.hex
Same as progeex, but for memory with byte-size address and 8 byte page write.
rtcx.bas
rtcx.hex
LCD clock program using Dallas1202/1302 RTC
rwcodex.bas
rwcodex.hex
PICBASIC PRO program to read and write to code space
serbufAx.bas
serbufAx.hex
PICBASIC PRO program that demonstrates an interrupt-driven buffer for hardware serial communications, using assembly language interrupt handler.
serbufx.bas
serbufx.hex
PICBASIC PRO program that demonstrates an interrupt-driven buffer for hardware serial communications, using PICBASIC ON INTERRUPT command.
servox.bas
servox.hex
PICBASIC PRO program to move RC servo 1 using buttons. Button 1 moves servo left, 2 centers servo, 3 moves servo right
servosx.bas
servosx.hex
PICBASIC PRO program that moves and maintains 2 RC servos simultaneously.  Uses PBP On Interrupt.
spix.bas
spix.hex
PICBASIC PRO program to read and write to SPI SEEPROMs
strtblx.bas
strtblx.hex
PICBASIC PRO program to demonstrate a method of storing text strings in a table
temp3x.bas
temp3x.hex
PICBASIC PRO program to read DS1620 3-wire temperature sensor and display temperature on LCD
tempx.bas
tempx.hex
PICBASIC PRO program to read DS1820 1-wire temperature sensor and display temperature on LCD
testx.bas
testx.hex
PICBASIC PRO test program for LAB-X1 (16C74)
tmr1clkx.bas
tmr1clkx.hex
PICBASIC PRO program that demonstrates the use of the Timer1 interrupt for a real-time clock.
tonex.bas
tonex.hex
PICBASIC PRO program to create telephone pad tone. Oscillator must be set to 20MHz
vbarx.bas
vbarx.hex
PICBASIC PRO program to measure voltage (0-5VDC) and display on LCD with 2 decimal places. A 60 segment bargraph is also displayed using custom LCD characters.
vmeterx.bas
vmeterx.hex
PICBASIC PRO program to measure 0-5VDC with 10-bit ADC and display the voltage with 2 decimal places.

PICBASIC PRO™ Compiler - written for the LAB-X2 Experimenter Board  back to top

3butx2.bas
3butx2.hex
Demonstrates multiple BUTTON commands. Each of 3 buttons toggles an LED.
adc10x2.bas
adc10x2.hex
Read an analog voltage on RA0 and send the decimal representation of the value on the serial port at 2400 baud. 10-bit conversion yields 0-1023 result for 0-5 volt input.
adc8x2.bas
adc8x2.hex
Read an analog voltage on RA0 and send the decimal representation of the value on the serial port at 2400 baud. 8-bit conversion yields 0-255 result for 0-5 volt input.
blink3x2.bas
blink3x2.hex
PICBASIC PRO program to blink 3 LEDS in sequence.
blinkx2.bas
blinkx2.hex
PICBASIC PRO program to blink an LED connected to PORTB.0 about once a second
butx2.bas
butx2.hex
PICBASIC PRO program to show button press on LED
ccpx2.bas
ccpx2.hex
PICBASIC PRO Program to demonstrate the use of the hardware capture module to measure the period of a frequency input.
countx2.bas
countx2.hex
PICBASIC PRO program to show binary count on 3 LEDS
hellox2.bas
hellox2.hex
PICBASIC PRO program to send "Hello World" on serial port
hserx2.bas
hserx2.hex
PICBASIC PRO program to send and receive from the hardware serial port. LEDs count characters and flash error if none received for 10 seconds.
servox2.bas
servox2.hex
PICBASIC PRO program to move RC servo using potentiometer
upperx2.bas
upperx2.hex
PICBASIC PRO upper case serial filter.
vux2.bas
vux2.hex
PICBASIC PRO program to display result of ADC in 3 segment bargraph. The last LED in the graph dims or brightens with changes in the analog input.
wakex2.bas
wakex2.hex
PICBASIC PRO program to demonstrate wake from sleep on RB port change interrupt.

PICBASIC PRO™ Compiler - written for the LAB-X3 Experimenter Board  back to top

blinkx3.bas
blinkx3.hex
PICBASIC PRO program to blink an LED connected to PORTB.4 about once a second
bpx3.bas
bpx3.hex
PICBASIC PRO program to simulate an LCD Backpack
butx3.bas
butx3.hex
PICBASIC PRO program to show button press on LED
clockx3.bas
clockx3.hex
LCD clock program using On Interrupt
countx3.bas
countx3.hex
PICBASIC PRO program to show binary count on 2 LEDS
hellox3.bas
hellox3.hex
PICBASIC PRO program to send "Hello World" on serial port
hserx3.bas
hserx3.hex
PICBASIC PRO program to send and receive from the hardware serial port - LEDs count characters and flash error if none received for 10 seconds
lcdx3.bas
lcdx3.hex
PICBASIC PRO program to display "Hello World" on LCD
potx3.bas
potx3.hex
PICBASIC PRO program to read pot and display on LCD
servox3.bas
servox3.hex
PICBASIC PRO program to move RC servo using buttons
testx3.bas
testx3.hex
PICBASIC PRO test program for LAB-X3 (16F628)
upperx3.bas
upperx3.hex
PICBASIC PRO upper case serial filter
vux3.bas
vux3.hex
PICBASIC PRO program to display pot on 2 segment bargraph

PICBASIC PRO™ Compiler - written for the LAB-X4 Experimenter Board (PIC12F683)  back to top

adcinx4.bas
adcinx4.hex
PICBASIC PRO program to display result of  8-bit A/D conversion on LCD
adcin1x4.bas
adcin1x4.hex
PICBASIC PRO program to display result of 10-bit A/D conversion on LCD
blinkx4.bas
blinkx4.hex
PICBASIC PRO program to blink an LED connected to GPIO.0 about once a second
butx4.bas
butx4.hex
PICBASIC PRO program to show button press on LED
clockx4.bas
clockx4.hex
LCD clock program using On Interrupt.  Uses TMR0 and prescaler. Watchdog Timer should be set to off at program time and Nap and Sleep should not be used. Button may be used to set time.
hellox4.bas
hellox4.hex
PICBASIC PRO program to send "Hello World" on serial port (and LCD)
i2cx4.bas
i2cx4.hex
PICBASIC PRO program to read and write to I2C SEEPROMs
lcdx4.bas
lcdx4.hex
PICBASIC PRO program to display "Hello World" on LCD (and serial port)
recover.bas
recover.hex
PICBASIC PRO program to help recover a corrupted factory calibration value.  Written for the 12F675 running on the LAB-X4. 
testx4.bas
testx4.hex
PICBASIC PRO test program for LAB-X4
upperx4.bas
upperx4.hex
PICBASIC PRO upper case serial filter
vmeterx4.bas
vmeterx4.hex
PICBASIC PRO program to measure voltage (0-5VDC) and display on LCD with 2 decimal places

PICBASIC PRO™ Compiler - written for the LAB-X18 Experimenter Board  back to top

adcx18.bas
adcx18.hex
PICBASIC PRO program to read pot and display on LCD.
blinkx18.bas
blinkx18.hex
PICBASIC PRO program to blink an LED connected to PORTA.4 about once a second
bpx18.bas
bpx18.hex
PICBASIC PRO program to simulate an LCD Backpack
butx18.bas
butx18.hex
PICBASIC PRO program to show button press on LED
clockx18.bas
clockx18.hex
PICBASIC PRO LCD clock program using On Interrupt.
hellox18.bas
hellox18.hex
PICBASIC PRO program to send "Hello World" on serial port
hserx18.bas
hserx18.hex
PICBASIC PRO program to send and receive from the hardware serial port.  LEDs count characters and flash error if none received for 10 seconds
i2cwx18.bas
i2cwx18.hex
PICBASIC PRO program to read and write to I2C SEEPROMs that require a word-sized address
i2cx18.bas
i2cx18.hex
PICBASIC PRO program to read and write to I2C SEEPROMs
lcdx18.bas
lcdx18.hex
PICBASIC PRO program to display "Hello World" on LCD
testx18.bas
testx18.hex
PICBASIC PRO test program for LAB-X20
upperx18.bas
upperx18.hex
PICBASIC PRO upper case serial filter

PICBASIC PRO™ Compiler - written for the LAB-X20 Experimenter Board  back to top

adcx20.bas
adcx20.hex
PICBASIC PRO program to read pot and display on LCD.
blinkx20.bas
blinkx20.hex
PICBASIC PRO program to blink an LED connected to PORTA.4 about once a second
bpx20.bas
bpx20.hex
PICBASIC PRO program to simulate an LCD Backpack
butx20.bas
butx20.hex
PICBASIC PRO program to show button press on LED
clockx20.bas
clockx20.hex
PICBASIC PRO LCD clock program using On Interrupt.
countx20.bas
countx20.hex
PICBASIC PRO program to show binary count on 2 LEDS
hellox20.bas
hellox20.hex
PICBASIC PRO program to send "Hello World" on serial port
hserx20.bas
hserx20.hex
PICBASIC PRO program to send and receive from the hardware serial port.  LEDs count characters and flash error if none received for 10 seconds
i2cwx20.bas
i2cwx20.hex
PICBASIC PRO program to read and write to I2C SEEPROMs that require a word-sized address
i2cx20.bas
i2cx20.hex
PICBASIC PRO program to read and write to I2C SEEPROMs
lcdx20.bas
lcdx20.hex
PICBASIC PRO program to display "Hello World" on LCD
servox20.bas
servox20.hex
PICBASIC PRO program to move RC servo using buttons.  Button 1 moves servo left, 2 moves servo right.  Press both buttons to center servo
testx20.bas
testx20.hex
PICBASIC PRO test program for LAB-X20
upperx20.bas
upperx20.hex
PICBASIC PRO upper case serial filter
vux20.bas
vux20.hex
PICBASIC PRO program to display pot on 2 segment bargraph.  The last LED in the graph dims or brightens with changes in the pot.

PICBASIC PRO™ Compiler - written for the LAB-XUSB Experimenter Board  back to top

adci10xu.bas
adci10xu.hex
PICBASIC PRO program to display result of ' 10-bit A/D conversion on LCD
adcin2xu.bas
adcin2xu.hex
PICBASIC PRO program to display result of  8-bit A/D conversion on LCD
adcin8xu.bas
adcon8xu.hex
PICBASIC PRO program to display result of 8-bit A/D conversion on LCD
adcxu.bas
adcxu.hex
PICBASIC PRO program to read pots on 16F877 ADC
blink4xu.hex
blink4xu.hex
PICBASIC PRO program to blink all the LEDs connected to PORTD
blinkxu.bas
blinkxu.hex
PICBASIC PRO program to blink an LED connected to PORTD.0 about once a second
bpxu.bas
bpxu.hex
PICBASIC PRO program to simulate an LCD Backpack
butxu.bas
butxu.hex
PICBASIC PRO program to show button press on LED
clockxu.bas
clockxu.hex
PICBASIC PRO LCD clock program using On Interrupt.
dacxu.bas
dacxu.hex
PICBASIC PRO program to demonstrate the use of the MAX549A Digital to Analog Converter. This program causes the DAC to output a sawtooth wave on channel A and a sinwave on channel B. Written for the PIC18F4550 on the LAB-XUSB Experimenter Board.
hserxu.bas
hserxu.hex
PICBASIC PRO program to send and receive from the hardware serial port.
i2cwxu.bas
i2cwxu.hex
PICBASIC PRO program to read and write to I2C SEEPROMs that require a word-sized address
i2cxu.bas
i2cxu.hex
PICBASIC PRO program to read and write to I2C SEEPROMs
keyxu.bas
keyxu.hex
PICBASIC PRO program to display key number on LCD
lcdxu.bas
lcdxu.hex
PICBASIC PRO program to display "Hello World" on LCD
rtcxu.bas
rtcxu.hex
PICBASIC PRO LCD clock program using Dallas DS1307 I2C RTC
servoxu.bas
servoxu.hex
PICBASIC PRO program to move RC servo 1 using buttons. Button 1 moves servo left, 2 centers servo, 3 moves servo right.
tempxu.bas
tempxu.hex
PICBASIC PRO program to read DS1820 1-wire temperature sensor and display temperature on LCD
testxu.bas
testxu.hex
PICBASIC PRO test program for LAB-XU
tonexu.bas
tonexu.hex
PICBASIC PRO program to create telephone pad tone. Oscillator must be set to 20MHz
usbcdc.bas
usbcdc.hex
USB sample program for PIC18F4550 CDC serial port emulation

Compilation of this program requires that specific support files be available in the source directory. You may also need to modify the file USBDESC.ASM so that the proper descriptor files are included. For detailed information, see the file PBP\USB18\USB.TXT.

usbjadem.bas
usbjadem.hex
This USB sample program implements the functionality of the Jan Axelson demo which accepts two numbers from the host, increments each and sends them back. An application running on the host sends the numbers and displays the returned values.

Compilation of this program requires that specific support files be available in the source directory. You may also need to modify the file USBDESC.ASM so that the proper descriptor files are included. For detailed information, see the file PBP\USB18\USB.TXT.

usbmouse.bas
usbmouse.hex
USB sample program for PIC18F4550 to move mouse cursor

Compilation of this program requires that specific support files be available in the source directory. You may also need to modify the file USBDESC.ASM so that the proper descriptor files are included. For detailed information, see the file PBP\USB18\USB.TXT.

vbarxu.bas
vbarxu.hex
PICBASIC PRO program to measure voltage (0-5VDC) ' and display on LCD with 2 decimal places. A 60 segment bargraph is also displayed using custom LCD characters.
vmeterxu.bas
vbarxu.hex
PICBASIC PRO program to measure voltage (0-5VDC) and display on LCD with 2 decimal places

PICBASIC PRO™ Compiler - written for the LAB-XT Telephony Experimenter Board  back to top

blinkxt.bas
blinkxt.hex
PICBASIC PRO program to blink an LED connected to PORTC.1 about once a second
callidxt.bas
callidxt.hex
Displays Caller ID information on LCD. Connect either jack on the LAB-XT to a telephone line. Caller ID service must be provided by your local phone company. This code only reads Multiple Data Message Format. LED4 lights when ring is present.
grabrxt.bas
grabrxt.hex
Simple DTMF digit-grabber that monitors for DTMF on a telephone line and displays any digits received. Tracks display position and wraps to first position on new line. Press RESET to clear display.
hserxt.bas
hserxt.hex
PICBASIC PRO program to send and receive from the hardware serial port
keyxt.bas
keyxt.hex
PICBASIC PRO program to display key label on LCD
phone1xt.bas
phone1xt.hex
Simple telephone. Press keys for on-hook, off-hook, and to dial. Incoming call sounds ringer and flashes LED. Watches for loop-current wink when off-hook.
phone2xt.bas
phone2xt.hex
Same as phone1xt.bas, but with Caller ID display.
pulsext.bas
pulsext.hex
Sample program for dialing with pulses instead of DTMF. Works as a telephone, but doesn't detect incoming calls. See phone1xt.bas for ring detect and ringer code. 
remotext.bas
remotext.hex
Demonstrates remote control using DTMF over a phone line. The LAB-XT will answer an incoming call on the third ring and sound a short tone to the caller. The caller can then control 2 leds by pressing keys on his telephone.
sitxt.bas
sitxt.hex
Telemarketing stopper. Reads caller id and plays Special Information Tones (SIT) when CID information has been blocked.
voicext.bas
voicext.hex
PICBASIC PRO program to record and play multiple voice messages. Uses hardware SPI for 2-way communication to the voice device. Record messages in sequence by pressing the A key, speaking into a headset mic, then pressing the B key to stop recording. The first  message may be played back by pressing 0, the second by pressing 1, etc.

PICBASIC PRO™ Compiler for PIC18F series MCUs  back to top

clock452.bas LCD clock program using On Interrupt
readconf.bas PicBasic Pro program to display PIC18F configuration data on LCD.  This method can also be used to read device id.
serA452.bas PICBASIC PRO program to demonstrate an interrupt-driven input buffer for hardware USART receive using Assembly language interrupt.  Pin definitions compatible with LAB-X1 and PIC18F452.
tmr1clk18.bas LCD time display using Timer1 with Assembly language interrupt on an 18F452.

PICBASIC PRO™ Compiler for PIC12F675 MCU  back to top

adcinx4.bas
adcinx4.hex
PICBASIC PRO program to display result of  8-bit A/D conversion on LCD
adcin1x4.bas
adcin1x4.hex
PICBASIC PRO program to display result of 10-bit A/D conversion on LCD
blinkx4.bas
blinkx4.hex
PICBASIC PRO program to blink an LED connected to GPIO.0 about once a second
butx4.bas
butx4.hex
PICBASIC PRO program to show button press on LED
clockx4.bas
clockx4.hex
LCD clock program using On Interrupt.  Uses TMR0 and prescaler. Watchdog Timer should be set to off at program time and Nap and Sleep should not be used. Button may be used to set time.
hellox4.bas
hellox4.hex
PICBASIC PRO program to send "Hello World" on serial port (and LCD)
i2cx4.bas
i2cx4.hex
PICBASIC PRO program to read and write to I2C SEEPROMs
lcdx4.bas
lcdx4.hex
PICBASIC PRO program to display "Hello World" on LCD (and serial port)
recover.bas
recover.hex
PICBASIC PRO program to help recover a corrupted factory calibration value.  Written for the 12F675 running on the LAB-X4. 
testx4.bas
testx4.hex
PICBASIC PRO test program for LAB-X4
upperx4.bas
upperx4.hex
PICBASIC PRO upper case serial filter
vmeterx4.bas
vmeterx4.hex
PICBASIC PRO program to measure voltage (0-5VDC) and display on LCD with 2 decimal places

PICBASIC™ Compiler (for PIC16F84A)  back to top

2k.bas Demo program of table use past 2K
adc71.bas PEEK and POKE Commands - Access 16C71 A/D using Peek and Poke
blink.bas Example program from manual to blink an LED connected to RB0 about once a second
button.bas Demonstrate BUTTON command. Prints working variable (in this case B0) to show how auto-repeat works. Prints "PRESS" when button is pressed or repeated.
ee.bas Demonstrate commands for EEPROM. Works on 16C84 and 16Fxxx targets only!!! Initialized address 0..5 and 9. Writes 10..63. This leaves addresses 6..8 undefined (assuming your programmer doesn't unconditionally program all EEPROM locations).
flash1.bas Blinks LED using HIGH and LOW commands to control specified pin.
flash2.bas Blinks LED using Direction and Data bit variables.
flash3.bas Blinks LED using Bit Math
flash4.bas Blinks LED using For..Next Loops. Uses Nap for Low Power & Good Measure!!!
for.bas FOR..NEXT Command - Prints series of numbers showing STEP facility. Inner-loop locks up when step size reaches zero (because loop never increments).
high92x.bas Access high register banks in 16C92x
i2c8.bas I2CIN and I2COUT Commands - Write address to the first 16 locations of an external serial EEPROM. Read first 16 locations back and send to serial out repeatedly. The control byte and address variable are selected for EEPROM's with 1-byte addressing, such as 24LC01, 24LC02, etc.
i2c16.bas I2CIN and I2COUT Commands - Write address to the first 16 locations of an external serial EEPROM. Read first 16 locations back and send to serial out repeatedly. The control byte and address variable are selected for EEPROM's with 2-byte addressing, such as 24LC32 and 24LC65
lcd.bas Demonstrate operation of an LCD in 4-bit mode
logic.bas Display Truth Table for Binary Logical Operators
lookdown.bas LOOKDOWN Command - Convert ASCII Hexadecimal characters to numeric equivalents.
lookup.bas LOOKUP & RANDOM Commands - Convert numeric value to ASCII Hexadecimal equivalents.
minmax.bas Use MIN and MAX operators to Bound [0..9] to [3..7]
porta.bas Read and write PortA using Peek and Poke
ps2clock.bas PicStic-2 Clock Test - Requires Micromint PicStic-2 with JRC6355
ps3adc.bas PicStic-3 ADC Test - Requires Micromint PicStic-3 with LTC1298
pulsin.bas PULSIN Command - Serial Pulse Width Meter
pulsout.bas PULSOUT Command - Variable Pulse Generator. Two buttons adjust from off to 10mSec in 10 uSec steps.
serin.bas SERIN & SEROUT Commands - Upper case serial filter.
serqual.bas SERIN Command w/ Qualifiers - "Crude" serial filter for C++ Style Comments
shift.bas Simulate BS2 Shiftin and Shiftout
sleep.bas SLEEP Command - Slowly Blink LED Using Low Power Mode Delay
sound.bas SOUND Command - Make random computer-like noises. More refinement might make sound effects realistic enough to convince your boss you're working when you're really just playing Doom!!!
usart.bas Read and write hardware USART using Peek and Poke. For 16C63, 65(A), 73(A), 74(A).

PICBASIC™ Compiler - written for the LAB-X1 Experimenter Board  back to top

adcx.bas
adcx.hex
PICBASIC program to send result of 8-bit A/D conversion with serout
blink8x.bas
blink8x.hex
PICBASIC program to blink 8 LEDS in sequence
blinkx.bas
blinkx.hex
PICBASIC program to blink an LED connected to PORTB.0 about once a second
butx.bas
butx.hex
PICBASIC program to show button press on LED
countx.bas
countx.hex
PICBASIC program to show binary count on 8 LEDS
hellox.bas
hellox.hex
PICBASIC program to send "Hello World" on hardware serial port (USART)
hserx.bas
hserx.hex
PICBASIC program to send and receive from the hardware serial port. 
keyx.bas
keyx.hex
PICBASIC Compiler program that reads the matrix keypad on a LAB-X1 Experimenter Board and displays the values on the LCD.
lcdx.bas
lcdx.hex
Demonstrate operation of an LCD in 4-bit mode
upperx.bas
upperx.hex
PICBASIC upper case serial filter.

PICBASIC™ Compiler - written for the LAB-X2 Experimenter Board  back to top

adcx2.bas
adcx2.hex
PICBASIC program to send result of 8-bit A/D conversion with serout
blink3x2.bas
blink3x2.hex
PICBASIC program to blink 3 LEDS in sequence
blinkx2.bas
blinkx2.hex
PICBASIC program to blink an LED connected to PORTB.0 about once a second
butx2.bas
butx2.hex
PICBASIC program to show button press on LED
countx2.bas
countx2.hex
PICBASIC program to show binary count on 3 LEDS
hellox2.bas
hellox2.hex
PICBASIC program to send "Hello World" on hardware serial port (USART)
hserx2.bas
hserx2.hex
PICBASIC program to send and receive from the hardware serial port. LEDs count characters and flash error if none received for 10 seconds.
servox2.bas
servox2.hex
PICBASIC program to move RC servo using potentiometer
upperx2.bas
upperx2.hex
PICBASIC upper case serial filter.
vux2.bas
vux2.hex
PICBASIC program to display result of ADC in 3 segment bargraph. The last LED in the graph dims or brightens with changes in the analog input.

PICBASIC™ Compiler - written for the LAB-X3 Experimenter Board  back to top

blinkx3.bas
blinkx3.hex
PICBASIC program to blink an LED connected to PORTB.4 about once a second
butx3.bas
butx3.hex
PICBASIC program to show button press on LED
hellox3.bas
hellox3.hex
PICBASIC program to send "Hello World" on serial port
hserx3.bas
hserx3.hex
PICBASIC program to send and receive from the hardware serial port LEDs count characters and flash error if none received for 10 seconds
lcdx3.bas
lcdx3.hex
PICBASIC program to demonstrate operation of an LCD in 4-bit mode
potx3.bas
potx3.hex
PICBASIC program to send pot value to serial port
servox3.bas
servox3.hex
PICBASIC program to move RC servo using potentiometer
upperx3.bas
upperx3.hex
PICBASIC upper case serial filter

PICBASIC™ Compiler - written for the LAB-X4 Experimenter Board  back to top

adcx4.bas
adcx4.hex
PICBASIC program to display 8-bit A/D conversion from potentiometer
blinkx4.bas
blinkx4.hex
PICBASIC program to blink an LED connected to GPIO.0 about once a second
butx4.bas
butx4.hex
PICBASIC program to show button press on LED
hellox4.bas
hellox4.hex
PICBASIC program to send "Hello World" on serial port
lcdx4.bas
lcdx4.hex
PICBASIC program to display "Hello World" on LCD (and serial port)
upperx4.bas
upperx4.hex
PICBASIC upper case serial filter

PICBASIC™ Compiler - written for the LAB-X18 Experimenter Board  back to top

adcx18.bas
adcx18.hex
PICBASIC program to send pot value to serial port
blinkx18.bas
blinkx18.hex
PICBASIC program to blink an LED connected to PORTA.4 about once a second
butx18.bas
butx18.hex
PICBASIC program to show button press on LED
hellox18.bas
hellox18.hex
PICBASIC program to send "Hello World" on serial port
hserx18.bas
hserx18.hex
PICBASIC program to send and receive from the hardware serial port LEDs count characters and flash error if none received for 10 seconds
lcdx18.bas
lcdx18.hex
PICBASIC program to demonstrate operation of an LCD in 4-bit mode
upperx18.bas
upperx18.hex
PICBASIC upper case serial filter

PICBASIC™ Compiler - written for the LAB-X20 Experimenter Board  back to top

adc10x20.bas
adc10x20.hex
PICBASIC program to display 10-bit pot value on LCD
adcx20.bas
adcx20.hex
PICBASIC program to send pot value to serial port
blinkx20.bas
blinkx20.hex
PICBASIC program to blink an LED connected to PORTA.4 about once a second
butx20.bas
butx20.hex
PICBASIC program to show button press on LED
hellox20.bas
hellox20.hex
PICBASIC program to send "Hello World" on serial port
hserx20.bas
hserx20.hex
PICBASIC program to send and receive from the hardware serial port LEDs count characters and flash error if none received for 10 seconds
lcdx20.bas
lcdx20.hex
PICBASIC program to demonstrate operation of an LCD in 4-bit mode
upperx20.bas
upperx20.hex
PICBASIC upper case serial filter

Programs Submitted by our users - These programs are untested by us.  They come from trusted sources, but melabs takes no responsibility for problems arising from their use.

PULSE-LOGGER.pbp PICBASIC PRO program to use the Parallax Datalogger with the PIC18F2550. This program tells the Parallax Datalogger to create a file on your thumb drive.  Written by Bradley M. Gibson
ElectronicDice.pdf  (PBP) PICBASIC PRO Electronic Dice project for the PIC10F202 or PIC10F206.  Written by Melanie Newman
counter. zip  (PBP) PICBASIC PRO program displays to 3 x 7 segments LED display the result of pulse count on PORTA.4 pin/sec.  Based on a 16F84A.  Schematic included.  Written by Steve Monfette
dimmer. zip  (PBP) PICBASIC PRO program is used to dim intensity of an AC line load (lamp). Developed for 60 Hz line and based on a 12F675.  Schematic included.  Written by Steve Monfette
OlympicTimer.pdf  (PBP) A Stop-Watch Timer that displays in real-time up to 100 hours with 1/100th Second resolution. It demonstrates a use of PICBASIC PRO interrupts and (most significantly for a timer) accounts for the fact that PBP doesn't jump to servicing that interrupt immediately. A Calibration feature is also included to fine-tune the time-keeping.  Written by Melanie Newman
12F675_Voltage_Monitor.bas  (PBP) PICBASIC PRO program that allows you to monitor Vdd on a 12F675 using only 1 pin for external reference.  This allows you to take action when the supply voltage drops.  Written by Frank Miller.
comms1.txt  (PBP) Demonstration of PC to PIC® bi-directional Dialogue... PC User (using something like Hyperterminal) is able to control 5 LEDs using a number of Commands with sub-parameters shows a different approach to Comms in having the PIC parse a received command line rather than WAIT for something valid to arrive and latch on to.  Written by Melanie Newman
DallasEdit12Lines1button.bas  (PBP) PICBASIC PRO Program using Dallas Semiconductor real-time clock.  It edits the clock with one button and 12 lines of code.  For this, you simply put a jumper on the in-circuit programming adapter you already have and go to the clock editing routine.  by Stephen R. Collins, Collins & Associates
SRF08.pbp  (PBP) PICBASIC PRO Program to change Devantech SRF08 Ultrasonic Module's I2C address.
LcdEdit.bas  (PBP) Editing and saving Numbers and Alfa Characters on Lcd with PICBASIC PRO 2.4 using 24 char Lcd Display and 4 buttons.  by Stephen R. Collins, Collins & Associates
MagCard.txt  (PBP) PICBASIC PRO Magnetic Card Reader Program. Designed for Mag-Card Track 2. This track contains the numeric information that is usually printed on the face of your Credit Card ie Card Number, Start and Expiry Dates etc.  Written by Melanie Newman
MN1307.txt  (PBP) PICBASIC PRO demonstrator for the DS1307, PIC16F628, LCD and three buttons.  It shows how you can use buttons to enter time, date and operating mode (12 or 24 hour clock) to preset the DS1307, and also shows how the date is verified for validity so you don't enter 29 February when you're not supposed to. It has autorepeat on the buttons and automatically returns you to time/date view if you're in setup and don't press any buttons within a set time period.  Written by Melanie Newman
read_gps.bas  (PBP) PICBASIC PRO program for reading speed from a GPS.  by Gilbert
vicmon2.bas  (PBP) Demonstrates the use of OnDebug command in PICBASIC PRO.  This program dumps a listing of the values in memory and on the I/O ports after every program step.  Use a terminal emulator to see the serial output.  by Victor Faria
sixpics.bas  (PBP) Six Pic microprocessors on one serial Port!  Single ended; talk only operation. Same software in all pics Tested with six but should work with 20 or more Pics also drives 7 seg display LED's with no transistors.  by Stephen R. Collins, Collins & Associates
VictorAlphabet.bas  (PBP) Uses ADCIN and LOOKUP to display the alphabet based on an analog voltage.  For the LAB-X1 Experimenter Board.  by Victor Faria 
 


Copyright 2008
microEngineering Labs, Inc.
Box 60039
Colorado Springs CO 80960
(719) 520-5323
(719) 520-1867 fax
email: support@melabs.com

Last Updated: 01/04/2008

Home | What's New | Products | Support
Resources
| Purchase | Index Contact

PIC, PICmicro, dsPIC, and  MPLAB are registered trademarks of Microchip Technology Inc. in the USA and other countries.  PICBASIC, PICBASIC PRO, PICPROTO, and EPIC are trademarks of Microchip Technology Inc. in the USA and other countries.   BASIC Stamp is a trademark of Parallax, Inc.

Microchip third-party partner  Microchip Consultant Program Member