english français deutsch
italiano portugese español

PicBasic Pro Code Samples for the LAB-X1 Experimenter Board (PIC16F877A)

PicBasic Pro code samples for use with the LAB-X1 Experimenter Board from MicroEngineering Labs. These code samples have been written specifically for the PIC16F877A microcontroller. The PIC16F877A was very popular in its day, but has now been replaced by the PIC16F887. These examples were the first published for the LAB-X1.

LAB-X1 PicBasic Pro Code Sample (PIC16F877A) - adcin10x.pbp

Picbasic Pro Compiler Product Thumb

PicBasic Pro program to display result of 10-bit A/D conversion on LCD. Connect analogue input to channel-0 (RA0).

source code

LAB-X1 PicBasic Pro Code Sample (PIC16F877A) - adcin3x.pbp

Picbasic Pro Compiler Product Thumb

PicBasic Pro program to display result of 8-bit A/D conversion on LCD. Connect analogue inputs to channels 0, 1, 3 (RA0, 1, 3).

source code

LAB-X1 PicBasic Pro Code Sample (PIC16F877A) - adcin8x.pbp

Picbasic Pro Compiler Product Thumb

PicBasic Pro program to display result of 8-bit A/D conversion on LCD. Connect analogue input to channel-0 (RA0).

source code

LAB-X1 PicBasic Pro Code Sample (PIC16F877A) - adcx.pbp

Picbasic Pro Compiler Product Thumb

PicBasic Pro program to read potentiometers on 16F877 ADC.

source code

LAB-X1 PicBasic Pro Code Sample (PIC16F877A) - blink8x.pbp

Picbasic Pro Compiler Product Thumb

PicBasic Pro program to blink all the LEDs connected to PORTD.

source code

LAB-X1 PicBasic Pro Code Sample (PIC16F877A) - blinkx.pbp

Picbasic Pro Compiler Product Thumb

PicBasic Pro program to blink an LED connected to PORTD.0 about once a second.

source code

LAB-X1 PicBasic Pro Code Sample (PIC16F877A) - bpx.pbp

Picbasic Pro Compiler Product Thumb

PicBasic Pro program to simulate an LCD Serial Backpack. Serial data received is displayed on the LCD.

source code

LAB-X1 PicBasic Pro Code Sample (PIC16F877A) - butx.pbp

Picbasic Pro Compiler Product Thumb

PicBasic Pro program to show button presses on 4 LEDs.

source code

LAB-X1 PicBasic Pro Code Sample (PIC16F877A) - clockx.pbp

Picbasic Pro Compiler Product Thumb

PicBasic Pro program for an LCD clock using ON INTERRUPT. Uses TMR0 and prescaler. Watchdog Timer should be set to off at program time and NAP or SLEEP should not be used. Buttons may be used to set hours and minutes.

source code

LAB-X1 PicBasic Pro Code Sample (PIC16F877A) - cmp877ax.pbp

Picbasic Pro Compiler Product Thumb

PicBasic Pro program to demonstrate the setup and use of analogue comparators. This program will not compile for the 16F877, as it has no comparators. You must use the 16F877A, or another PICmicro MCU with comparators. Inputs are analogue voltages on RA0 and RA3. The program will compare the voltages and tell you which is greater. On the LAB-X1, POT1 and POT3 adjust the respective inputs.

source code

LAB-X1 PicBasic Pro Code Sample (PIC16F877A) - eepagex.pbp

Picbasic Pro Compiler Product Thumb

PicBasic Pro program to demonstrate the page-write capability of the 24LC256 serial memory. This program will transfer 64 bytes of data to the memory before a pause is needed to complete the write.

source code

LAB-X1 PicBasic Pro Code Sample (PIC16F877A) - hserx.pbp

Picbasic Pro Compiler Product Thumb

PicBasic Pro program to send and receive from the hardware serial port.

source code

LAB-X1 PicBasic Pro Code Sample (PIC16F877A) - i2cwordx.pbp

Picbasic Pro Compiler Product Thumb

PicBasic Pro program to read and write to I2C SEEPROMs that require a word-sized address. Writes to the first 16 locations of an external serial EEPROM. Reads first 16 locations back and sends to LCD repeatedly.

source code

LAB-X1 PicBasic Pro Code Sample (PIC16F877A) - i2cwx.pbp

Picbasic Pro Compiler Product Thumb

PicBasic Pro program to read and write to I2C SEEPROMs that require a word-sized address. Writes to the first 16 locations of an external serial EEPROM. Reads first 16 locations back and sends to LCD repeatedly.

source code

LAB-X1 PicBasic Pro Code Sample (PIC16F877A) - i2cx.pbp

Picbasic Pro Compiler Product Thumb

PicBasic Pro program to read and write to I2C SEEPROMs that require a byte-sized address. Writes to the first 16 locations of an external serial EEPROM. Reads first 16 locations back and sends to LCD repeatedly.

source code

LAB-X1 PicBasic Pro Code Sample (PIC16F877A) - jrcx.pbp

Picbasic Pro Compiler Product Thumb

PicBasic Pro program for an LCD clock using the JRC6355 RTC.

source code

LAB-X1 PicBasic Pro Code Sample (PIC16F877A) - keyx.pbp

Picbasic Pro Compiler Product Thumb

PicBasic Pro program to display key numbers on LCD.

source code

LAB-X1 PicBasic Pro Code Sample (PIC16F877A) - lcd_bit_bang.pbp

Picbasic Pro Compiler Product Thumb

PicBasic Pro program to manually operate (without LCDOUT) an LCD in 4-bit mode.

source code

LAB-X1 PicBasic Pro Code Sample (PIC16F877A) - lcdinx.pbp

Picbasic Pro Compiler Product Thumb

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.

source code

LAB-X1 PicBasic Pro Code Sample (PIC16F877A) - lcdx.pbp

Picbasic Pro Compiler Product Thumb

PicBasic Pro program to display 'Hello World' on LCD.

source code

LAB-X1 PicBasic Pro Code Sample (PIC16F877A) - ltcx.pbp

Picbasic Pro Compiler Product Thumb

PicBasic Pro program to read LTC1298 ADC.

source code

LAB-X1 PicBasic Pro Code Sample (PIC16F877A) - mwx.pbp

Picbasic Pro Compiler Product Thumb

PicBasic Pro program to read and write to Microwire SEEPROM 93LC56A. Writes to the first 16 locations of an external serial EEPROM. Reads first 16 locations back and sends to LCD repeatedly. Note: For SEEPROMs with byte-sized address.

source code

LAB-X1 PicBasic Pro Code Sample (PIC16F877A) - progee8x.pbp

Picbasic Pro Compiler Product Thumb

PicBasic Pro program to receive a HEX file from PC and write data to I2C memory. Writes data in page mode, 8 bytes at a time. Memory device must be addressed with 8 bits and capable of receiving 8 bytes at once.

source code

LAB-X1 PicBasic Pro Code Sample (PIC16F877A) - progeex.pbp

Picbasic Pro Compiler Product Thumb

PicBasic Pro program to receive a HEX file from PC and write data to I2C memory. Writes data in page mode, 16 bytes at a time. Memory device must be addressed with 8 bits and capable of receiving 16 bytes at once.

source code

LAB-X1 PicBasic Pro Code Sample (PIC16F877A) - rtcx.pbp

Picbasic Pro Compiler Product Thumb

PicBasic Pro program for LCD clock using the Dallas 1202/1302 RTC.

source code

LAB-X1 PicBasic Pro Code Sample (PIC16F877A) - rwcodex.pbp

Picbasic Pro Compiler Product Thumb

PicBasic Pro program to read and write to code space. Flash Program Write must be enabled on your programmer. Writes to 8 locations of code space beginning at $1800. Reads 8 locations back and sends to LCD repeatedly.

source code

LAB-X1 PicBasic Pro Code Sample (PIC16F877A) - serbufax.pbp

Picbasic Pro Compiler Product Thumb

PicBasic Pro program to demonstrate an interrupt-driven input buffer for hardware USART receive using assembly language interrupt.

source code

LAB-X1 PicBasic Pro Code Sample (PIC16F877A) - serbufx.pbp

Picbasic Pro Compiler Product Thumb

PicBasic Pro program to demonstrate an interrupt-driven input buffer for HSERIN using ON INTERRUPT.

source code

LAB-X1 PicBasic Pro Code Sample (PIC16F877A) - servosx.pbp

Picbasic Pro Compiler Product Thumb

PicBasic Pro program for servo control using ON INTERRUPT. Uses TMR0 and prescaler. Watchdog Timer should be set to off at program time and NAP or SLEEP should not be used. Buttons on keypad are used to move servos.

source code

LAB-X1 PicBasic Pro Code Sample (PIC16F877A) - servox.pbp

Picbasic Pro Compiler Product Thumb

PicBasic Pro program to move RC servo 1 using keypad buttons. Button 1 moves servo left, 2 centres servo, 3 moves servo right.

source code

LAB-X1 PicBasic Pro Code Sample (PIC16F877A) - spix.pbp

Picbasic Pro Compiler Product Thumb

PicBasic Pro program to read and write to SPI SEEPROMs. Writes to the first 16 locations of an external serial EEPROM. Then reads first 16 locations back and sends to LCD repeatedly. Note: For SEEPROMs with word-sized address.

source code

LAB-X1 PicBasic Pro Code Sample (PIC16F877A) - strtblx.pbp

Picbasic Pro Compiler Product Thumb

PicBasic Pro program to demonstrate a method of storing text strings in a table. The strings can be called by storing the location of the first character in a variable and calling the strout subroutine. The string will be sent to both LCD and Serial pin and the main program will resume when the null terminating character is encountered in the table.

source code

LAB-X1 PicBasic Pro Code Sample (PIC16F877A) - temp3x.pbp

Picbasic Pro Compiler Product Thumb

PicBasic Pro program to read the DS1620 3-wire temperature sensor and display temperature on LCD.

source code

LAB-X1 PicBasic Pro Code Sample (PIC16F877A) - temp_ds1822.pbp

Picbasic Pro Compiler Product Thumb

PicBasic Pro program to read DS1822 or DS18B20 1-wire temperature sensor using OWIN and OWOUT commands and display temperature on LCD.

source code

LAB-X1 PicBasic Pro Code Sample (PIC16F877A) - tempx.pbp

Picbasic Pro Compiler Product Thumb

PicBasic Pro program to read DS1820 1-wire temperature sensor and display temperature on LCD.

source code

LAB-X1 PicBasic Pro Code Sample (PIC16F877A) - testx.pbp

Picbasic Pro Compiler Product Thumb

PicBasic Pro program to test LAB-X1 Experimenter Board.

source code

LAB-X1 PicBasic Pro Code Sample (PIC16F877A) - tmr1clkx.pbp

Picbasic Pro Compiler Product Thumb

PicBasic Pro program to demonstrate the use of Timer1 interrupt for a real-time clock.

source code

LAB-X1 PicBasic Pro Code Sample (PIC16F877A) - tonex.pbp

Picbasic Pro Compiler Product Thumb

PicBasic Pro program to create telephone pad tone. Note: LAB-X1 Oscillator must be set to 20MHz.

source code

LAB-X1 PicBasic Pro Code Sample (PIC16F877A) - vbarx.pbp

Picbasic Pro Compiler Product Thumb

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.

source code

LAB-X1 PicBasic Pro Code Sample (PIC16F877A) - vmeterx.pbp

Picbasic Pro Compiler Product Thumb

PicBasic Pro program to measure voltage (0-5VDC) and display on LCD with 2 decimal places.

source code

Page Updated:
20/12/11

Visa Credit
Mastercard
Visa Debit
Maestro
Visa Electron
Paypal

Tel: +44 7814 044 754 - Fax: +44 8715 283 948 - Skype: warburtech.co.uk

Warburton Technology, 33 Selkirk Close, Wimborne, Dorset, BH21 1TN, United Kingdom

VAT Number: GB 846 917 877