PicBasic Pro Sample Code for the 12F675

adcin1x4.htmPICBASIC PRO program to display result of 10-bit A/D conversion on Lab-X4 serial LCD.
adcinx4.htmPICBASIC PRO program to display result of 8-bit A/D conversion on Lab-X4 serial LCD.
blinkx4.htmPICBASIC PRO program to blink an LED connected to GPIO.0 about once a second
bpx4.htmPICBASIC PRO program for LAB-X4 serial LCD controller - PIC16F676.
butx4.htmPICBASIC PRO program to show button press on LED.
clockx4.htmPICBASIC PRO program for LCD clock 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.htmPICBASIC PRO program to send "Hello World" on serial port (and LCD)
i2cx4.htmPICBASIC PRO program to read and write to I2C SEEPROMs Write to the first 16 locations of an external serial EEPROM, and then read first 16 locations back and send to LCD repeatedly. Note this example is for SEEPROMs with byte-sized address.
lcdx4.htmPICBASIC PRO program to display "Hello World" on LCD (and serial port)
recover.htmPICBASIC PRO program for recovering factory OSCCAL calibration values. Run this program in a 12F675 on the LAB-X4 Experimenter Board. It will display gibberish on the LCD until the calibration value is incremented to a value that lets the serial communication work. It will continue to display hex calibration values until incremented beyond the working range. Let it run, monitor the LCD for values followed by "Correct?". Pick one of the values that work - midway after it starts working and before it stops working.
testx4.htmPICBASIC PRO test program for LAB-X4 (12F675)
upperx4.htmPICBASIC PRO code example showing upper case serial filter.
vmeterx4.htmPICBASIC PRO program to measure voltage (0-5VDC) and display on LCD with 2 decimal places. This program uses the */ operator to scale the ADC result from 0-1023 to 0-500. The */ performs a divide by 256 automatically, allowing math which would normally exceed the limit of a word variable. Connect analog input to channel-3 (RA4)