Category Archives: PIC Tutorials

Software realization of Real-Time Clock and Calendar

Dedicated real-time clock and calendar (RTCC) chips are useful in a wide range of embedded applications, such as data loggers, for accurate time-stamping of data measurements. The use of external RTCC chip frees the main processor from timekeeping responsibility and to perform other critical tasks. However, for small applications the software realization of RTCC in the main application can simplify the design and reduce the overall cost of the system. This application note from Microchip describes the implementation of software RTCC using PIC16F1827 microcontroller. The implementation provides the time (seconds, minutes, and hour), date (day, month, and year), day of week, and one alarm signal. The

Read more

Access 15 tact switches with one input pin

A while back I posted two articles on reading multiple tact switches using a minimal number of I/O pins of PIC microcontroller. One of them uses a resistor-divider network to create an unique range of analog voltages for each keypress. The voltage is then measured through an ADC input channel to detect which key has been pressed. Another approach was a 2-wire keypad interface using 555 timer IC configured as an astable multivibrator. The 555 timer is configured to generate a specific frequency of oscillation for each key press. However, these are not the only methods out there. Benabadji Noureddine’s recent

Read more

High Resolution RGB LED Color Mixing

This application note demonstrates color mixing using the PIC12F1572 MCU. The PIC12F1572 microcontroller features three 16-bit pulse-width modulators (PWMs), which allow precise control over each RGB LED, allowing smooth transitions even at low-brightness/luminosity levels. Development efforts are supported by the following features of this demonstration board. • ICSP™ programming connector • EUSART bus tie-in points • USB or battery powered • Multiple test points A color mixing software routine allows developers to specify colors in xyY format with the PIC® device performing color mixing calculations.

Read more

Implementing digital filters using PIC18F microcontrollers

Microchip’s PIC18 family of microcontrollers are popularly known for their logic and controlling functions. In addition, these microcontrollers have builtin hardware multipliers and multiple file pointers. These features, along with the built-in analog-to-digital converter (ADC), make PIC18 microcontrollers a competent choice for applications where logic and controlling functions are combined with signal processing applications. This application note demonstrates how the PIC18 family of microcontrollers can be used to implement digital FIR and IIR filters.

Read more

Lab 21: Servo motor control

A servo motor is a special geared DC motor equipped with an electronic circuit for controlling the direction of rotation, as well as the position, of the motor shaft. Because servo motors allows precise angular positioning of their output shaft, they are used extensively in robotics and radio-controlled cars, airplanes, and boats to control the motion of their various parts. In this lab session, we will first explore what a servo motor consists of and how it works and then illustrate how to interface it with a PIC microcontroller.

Read more
« Older Entries