Using PicBasic with the PIC16F84 PIC Microcontroller

30,709

Circuit Image

This project uses only a few of the instructions that come with PicBasic, but serves to show how easy PicBasic really is. It also shows how PicBasic strongly resembles programming the BASIC Stamp. Here we are using the serin command, and a couple if then statements to design a simple serially controlled I/O-expander that can be used to increase the I/O capabilities of other PIC microcontrollers or the BASIC Stamp. One feature that PicBasic offers with the serin command is the ability to use a qualifier.

The project described focuses on utilizing the PicBasic programming language to create a serially controlled I/O expander. The I/O expander serves to enhance the input/output capabilities of microcontrollers, specifically those from the PIC family or the BASIC Stamp. The serin command is employed to facilitate serial communication, allowing for the reception of data from a controlling device.

The circuit typically consists of a PIC microcontroller configured to operate in conjunction with additional I/O pins. The I/O expander can be implemented using a shift register or a dedicated I/O expander IC, which receives serial data and translates it into multiple parallel outputs. This is particularly useful in applications where the number of available I/O pins on the primary microcontroller is limited.

In the implementation, the serin command is utilized to read incoming data. The qualifier feature of the serin command allows for more robust data handling by enabling specific conditions to be set for the incoming serial data. This can include checking for specific start bits or ensuring that data is received in the expected format, thereby enhancing reliability.

The overall design includes pull-up resistors on the input lines to ensure stable logic levels, and decoupling capacitors are placed close to the power pins of the microcontroller to filter out noise. The schematic will typically showcase connections between the microcontroller's serial output pin and the data input of the I/O expander, along with connections for power and ground.

This project exemplifies the ease of programming with PicBasic while demonstrating practical applications for expanding I/O capabilities in embedded systems. The simplicity of using if-then statements in conjunction with the serin command allows for straightforward control logic, making it accessible for both novice and experienced developers.This project uses only a few of the instructions that come with PicBasic, but serves to show how easy PicBasic really is. It also shows how PicBasic strongly resembles programming the BASIC Stamp. Here we are using the serin command, and a couple if then statements to design a simple serially controlled I/O-expander that can be used to increase the I/O capabilities of other PIC microcontrollers or the BASIC Stamp.

One feature that PicBasic offers with the serin command is the ability to use a qualifier. 🔗 External reference