Home
Downloads
Licenses Contact

OshonSoft

20th Anniversary

20th Anniversary of the
OSHONSOFT PROJECT
(2001 - 2021)

PIC Basic Compiler Examples

This page contains several complete examples where PIC Simulator IDE integrated PIC Basic compiler is used to get the HEX file ready to be programmed into a real PIC chip.

All examples presented on this page were tested on the development board for PIC16F877A microcontroller that is documented on the Hardware Projects page. All schematics are subsections of the schematics of the whole development board.


Example 1: Basic LCD test
Example 2: Reading analog input
Example 3: Playing with LEDs
Example 4: 7-segment displays
Example 5: 4x4 matrix keypad
Example 6: PWM regulation of LED light intensity
Example 7: RS-232 communication with PC
Example 8: I2C communication with 24C256 eeprom
Example 9: I2C communication with PCF8583 real time clock
Example 10: Measuring temperature with DS18S20


Example 1: Basic LCD test

Schematics: view

The photo of the program execution: view

Basic source program:


Example 2: Reading analog input

Schematics: view

The photo of the program execution: view

Basic source program:


Example 3: Playing with LEDs

Schematics: view

The photo of the program execution: view

Basic source program:


Example 4: 7-segment displays

Schematics: view

The photo of the program execution: view

Basic source program:


Example 5: 4x4 matrix keypad

Schematics: view

Basic source program:


Example 6: PWM regulation of LED light intensity

Schematics: view

Basic source program:


Example 7: RS-232 communication with PC

Schematics: view

The photo of the program execution: view

The screenshot of the PIC Simulator IDE serial port terminal: view

Basic source program:


Example 8: I2C communication with 24C256 eeprom

Schematics: view

The photo of the program execution: view

Basic source program:


Example 9: I2C communication with PCF8583 real time clock

Schematics: view

The photo of the program execution: view

Basic source program:


Example 10: Measuring temperature with DS18S20

Schematics: view

The photo of the program execution: view

Basic source program:
Basic source program (low level 1-wire):