Using PicBasic with the PIC16F84 PIC Microcontroller
30,713
Using PicBasic with the PIC16F84 PIC Microcontroller
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
The following circuit illustrates a Water Level Detector Circuit Diagram. This circuit is based on the PIC12F683 microcontroller. Features include the ability of the PIC microcontroller to enter a sleep mode.
The Water Level Detector Circuit utilizing the PIC12F683 microcontroller...
The circuit presented utilizes modulated rectangular waves of varying time periods to generate ringing tones akin to those produced by a telephone. It requires four astable multivibrators for operation, implemented using two 556 integrated circuits (ICs). The 556 IC...
This encoder can transmit the state of up to 16 TTL digital inputs using an RF or infrared transmitter. When enabled, the included modulator automatically generates the 38kHz IR carrier. Containing a PIC microcontroller, the circuit is very flexible....
By adding the same circuit in parallel, the number of inputs can be increased according to the applications. Each input is connected to the inverting terminal of the LM3900. The built-in amplifier of each section amplifies every audio input...
This simple low-power DC to AC inverter circuit converts 12V DC to either 230V or 110V AC. By making simple modifications, it is also possible to convert 6V DC to 230V AC or 110V AC. This inverter can be...
Stepper motors consist of a permanent magnet rotating shaft, known as the rotor, and electromagnets on the stationary part that surrounds the motor, referred to as the stator. One complete rotation of a stepper motor is illustrated. At position...
We use cookies to enhance your experience, analyze traffic, and serve personalized ads.
By clicking "Accept", you agree to our use of cookies.
Learn more