Pulse width modulation may have been invented to encode messages into pulsing signal but it was originally conceived as a technique for controlling power supplied to motors. In this tutorial, we will look at how PIC16 PWM works.
Read More »Use the PIC16F877A with Nokia 3310 in XC8
In this post, I’ll share with you how I got the Nokia 3310 LCD to run using a PIC16F877A microcontroller. How to use the Nokia 3310 LCD with the Arduino has been covered before. This one is more challenging because I had to create a library for the XC8 compiler. …
Read More »PIC ADC (Analog to Digital Conversion)
There are instances when digital systems need to interface with devices that produce analog signals, such as sensors and radio equipment. In such cases, the digital system, such as a microcontroller, needs an analog-to-digital converter (ADC) to handle the analog signal.
Read More »PIC16 I2C Tutorial
To continue with our tutorial on synchronous serial with PICs, we will know look at I2C, another popular protocol used by sensors, displays and memory devices.
Read More »PIC16 SPI Tutorial
Simply put, synchronous serial protocols like SPI and I2C have a separate line for timing (the CLK line) while asynchronous protocols like UART (RS232) don’t. The addition of a clock line makes reception timing much easier and thus reduces transmission errors. It is also possible to interconnect more than two …
Read More »Serial (USART) Communication with PIC16F877A
PIC microcontrollers, obviously, can do more than just light up LEDs or reading button states. Microcontrollers can also communicate with another microcontroller or with other devices like sensors, memory cards, etc. Often the communication is done serially, where data bits are sent one at a time. The microcontroller serial communication …
Read More »Input/Output with PIC Microcontrollers
For most microcontrollers, the input and output channels are handled by data direction special function registers. AVR microcontrollers call them Data Direction Registers (DDR) while ARM-based STM32 has a group of “GPIO” registers. PICs call them TRIS registers which is supposed to be short for “TRIState”. In this article, we …
Read More »PIC16F877 Internet: Creating Web-based PIC Apps
The Internet of Things (IoT) revolution has inspired thousands of makers to build interconnected systems that span the globe. Want to join the revolution? Learn first how to make a PIC16F877 Internet connection! This tutorial will cover using the PIC with the ESP8266 Wi-Fi module both in sending and receiving …
Read More »Using PIC Timer with PIC16F84A
In this tutorial, I will discuss how to use the PIC16F84A microcontroller timer module for a variety of applications including turning a LED on and off without the use of a software delay subroutine.
Read More »PIC Interrupt with PIC16F84A
So far we have discussed how to code microcontrollers sequentially, i.e., the device performs the code from top to bottom and may branch out to labels (via goto) or subroutines (via call). Now we'll be looking at PIC interrupt.
Read More »