This circuit demonstrates the use of the XCSB servo library to control four RC servos. The demo operates on a PIC16F628 microcontroller utilizing the internal 4MHz oscillator. A single push button is employed to select between the servos, while two additional push buttons are used to modify the position of the selected servo. A 16x2 character LCD provides feedback to the operator during servo control. The servo library is capable of managing up to 20 servos on a PIC16F876. The circuit includes additional resistors between the PIC and the LCD, facilitating in-circuit programming of the PIC with a programmer such as the WISP628. Connection points are clearly marked. Additionally, this circuit illustrates the integration of a 3x4 keypad and a 16x2 LCD connected to a PIC16F628. The 3x4 keypad is an economical component that employs 12 switches arranged in a matrix format. The interface utilizes seven wires for direct connection to the PIC. The XCSB test program "keypad-02.bas" demonstrates the ease of reading the keypad and displaying key presses on the LCD. A simple modification could enable the program to accept PIN numbers and activate an electronic lock. A precompiled executable is available as "keypad-02.hex". Furthermore, this circuit shows how to read an analog input using the built-in Analog to Digital Converter (ADC) of the PIC16F876. The analog input is a 10K linear potentiometer (pot). The XCSB test program "adc-pwm-876-001.bas" reads the value of the potentiometer (R6) using the ADC, displays it on the LCD, and uses it to set the PWM generator. The speaker generates a tone corresponding to the potentiometer's value, with the tone changing as the potentiometer is adjusted. A simple LED flashing program is also included, designed for a minimal PIC16F628 circuit with an internal oscillator. This is a machine code executable in hex format, compiled from "led-01.bas". The XCSB source file for the LED flashing program incorporates switch inputs for flash count, with pauses between flashes. Two switches allow user selection of the number of flashes between pauses. A more sophisticated version of "led-02.bas" utilizes multiple tasks and background switch debouncing, demonstrating the creation of simple XCSB programs with effective user response. There is also a simple LCD test program ready to run on a minimal PIC16F628 circuit with an internal oscillator, available as a machine code executable in hex format, compiled from "lcd-01.bas". This XCSB source file showcases a simple user interface using two switches and an LCD, where the switches perform an UP/DOWN function, useful for setting values to control external hardware. This program exemplifies switch debouncing and multitasking capabilities. Additionally, there is an XCSB source file similar to "lcd-03.bas" that illustrates significant improvements in switch operation (e.g., single key press and autorepeat timings) through the addition of an extra task. A simple RS232 interface test program is also featured, which sends one character per second via an RS232 interface to a terminal or PC running terminal emulation software. Upon receiving a character from the terminal or PC, it sends that character back instead of the original, allowing testing of both the sending and receiving sides of the circuit. The program also flashes an LED to indicate correct operation (in case data transmission is not functioning on the RS232 interface). This RS232 interface test program is ready to run on a minimal PIC16F628 circuit with an internal oscillator, available as a machine code executable in hex format, compiled from "rs232-01.bas". Another simple program accepts input via an RS232 interface and displays the input on an LCD display, operating similarly to "rs232-01.bas" (including the flashing LED). A final RS232 interface test program, ready to run on a minimal PIC16F628 circuit with an internal oscillator, is available as a machine code executable in hex format, compiled from "rs232-03.bas". This XCSB source file demonstrates a simple user interface to control four RC servos, utilizing one push button for servo selection and two push buttons for adjusting the position of the selected servo.
The circuit design integrates multiple components and functionalities, showcasing the versatility of the PIC microcontroller platform. The use of the XCSB servo library allows for seamless control over multiple servos, enhancing the application potential in robotics and automation. The LCD interface provides real-time feedback, which is crucial for user interaction, while the keypad enables user input for control and security features. The incorporation of an ADC for analog input processing exemplifies the ability to interface with variable resistance devices, such as potentiometers, to create dynamic control systems. Furthermore, the RS232 interface programs illustrate the capability of the PIC microcontroller to communicate with other devices, facilitating data exchange and control commands. Overall, this circuit serves as a comprehensive platform for developing and testing various electronic applications, leveraging the capabilities of the PIC16F628 and PIC16F876 microcontrollers.This circuit shows the use of the XCSB servo library to control 4 RC servos. The demo runs on a 16f628 using the internal 4MHz oscilator. It uses 1 push button to select between servos and 2 push buttons to change the selected servos position. A 16x2 character LCD gives operator feed back while controlling the servos. The servo library can handle upto 20 servos on a 16f876. The circuit has additional resisters between the PIC and the LCD to allow in-circuit programming of the PIC using a programmer such as the wisp628 available from Connection points are clearly marked. This circuit shows the use of a 3x4 keypad and a 16x2 LCD connected to a 16f628. The 3x4 keypad is a cheap device using 12 switches aranged as a matrix. The interface uses 7 wires and connects directly to the PIC. The XCSB test program keypad-02. bas shows how trivial it is to read the keypad and display key presses on the LCD. A very simple modification would allow the program to accept PIN numbers and activate an electronic lock.
A precompiled ready to run executable is available as keypad-02. hex This circuit shows how to read an analog input using the built-in Analog to Digital Convertor (ADC) of the 16f876 The analog input is a 10K linear potentiometer (also know as a pot). The XCSB test program adc-pwm-876-001. bas reads the value of the pot (R6) using the built-in Analog to Digital Convertor (ADC) of the 16f876, displays it on the LCD and uses it as the setting for the PWM generator.
The speaker produces a tone corresponding to the value of the pot. Turning the pot changes the tone produced. Simple flashing LED program ready to run on minimal 16f628 circuit with internal oscillator - machine code executable in hex format ready to run (compiled from led-01. bas source) XCSB source file for LED flashing program with switch inputs for flash count. There is pause between flashes. Two switches are used to allow the user to select the number of flashes between pauses. Much more sophiticated version of led-02. bas using multiple tasks and background switch debouncing. Shows how to produce simple XCSB programs with very good user response. Simple LCD test program ready to run on minimal 16f628 circuit with internal oscillator - machine code executable in hex format ready to run (compiled from lcd-01.
bas source) XCSB source file to show simple user interface using two switches and an LCD. The switches perform an UP/DOWN function useful for setting values to control external hardware. This program shows switch debouncing and multitasking. XCSB source file similar to lcd-03. bas but showing how to greatly improve switch operation (i. e. single key press and autorepeat timings) by adding an extra task. Simple RS232 interface test program. This program sends one character per second via an RS232 interface to a terminal (or PC running terminal emulation software). If it receives a character from the terminal (or PC) it sends that character back instead of the original.
This allows both the sending and receiving side of the circuit to be tested. The program also flashs an LED to show that it is working correctly (in case data is not getting through on the RS232 interface) Simple RS232 interface test program ready to run on minimal 16f628 circuit with internal oscillator - machine code executable in hex format ready to run (compiled from rs232-01. bas source) This simple program accepts input using an RS232 interface and displays the input on an LCD display.
Otherwise this program operates as per rs232-01. bas (including the flashing LED). Simple RS232 interface test program ready to run on minimal 16f628 circuit with internal oscillator - machine code executable in hex format ready to run (compiled from rs232-03. bas source) XCSB source file to show simple user interface to control 4 RC servos. It uses 1 push button to select between servos and 2 push buttons to change the selected servos position.
Create a basic RF oscillator. The circuit is very simple, so complex calculations will be omitted, and component selection will be simplified using calculators. For this example, the target frequency is 7 MHz. The circuit includes a transistor (TR1)...
If a page name is not selected by pressing the button, the previously selected page name continues to be used. The value is stored in EEPROM and may be changed at any time. When the unit is first powered...
A homebuilt basic plotter, engraver, vinyl cutter, and PCB driller utilizes a fundamental program to read HPGL files and control stepper motors connected to a parallel port.
This device serves multiple functions, including plotting, engraving, cutting vinyl, and drilling printed...
This is a simple 3-digit digital voltmeter. A PIC16F676 microcontroller is utilized to read analog signals (voltage) and display the value on a 3-digit 7-segment display. Similar principles can be applied to measure DC current using a parallel resistor...
This post addresses the question, "How to create a pulse width modulator using the PIC16F877?" Additionally, the PWM code can be verified using the PIC16 simulator (Proteus).
The PIC16F877 microcontroller is widely utilized for creating pulse width modulation (PWM) signals...
Tengu derives its name from a mythical Japanese creature known for getting into mischief. However, this Tengu is more earthly in nature. It responds to voice and sounds, changing its facial features depending on the intensity of the sound....
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