Programming PIC microcontrollers usually requires specialized hardware programmers like the PICkit series. But what if you don’t have one? Thanks to open-source projects like a-p-prog, you can turn an Arduino Uno or Nano into a PIC programmer that works over the In-Circuit Serial Programming (ICSP) interface. In this tutorial, we’ll …
Read More »Using a 16x2 Monochrome LCD with the PIC16F84A (Assembly Tutorial)
Introduction A 16x2 monochrome LCD module is a widely used display in microcontroller projects. It can show two lines of text, each up to 16 characters long, making it ideal for simple user interfaces. These LCDs are based on the HD44780 controller (or compatible), which accepts commands and data via …
Read More »How to Use Lookup Tables in PIC Assembly
Programming a microcontroller in assembly languages takes time and to reduce that time, embedded systems engineers often have tricks up their sleeves. One of those tricks is the use of lookup tables. In this post, I will share how I use lookup tables in assembly language for the PIC16F84A microcontroller.
Read More »Persistence of Vision (POV) with Seven-segment Displays
Lack of pins to use is a common challenge in designing microcontroller-based projects. This is particularly true when dealing with liquid crystal or seven-segment displays. Multiplexers and display drivers are great help but at an additional cost. Thankfully, a software-based solution exists to solve such a problem.
Read More »Capture and Compare with PIC16F877A
The PIC16F877A microcontroller comes with a Capture Compare PWM (CCP) module which utilizes its 16-bit Timer1 module to generate or count pulses, among other things. I have already covered how to generate PWM in my previous tutorial. This time, we will look at how to implement capture and compare with …
Read More »Using Buttons and LEDs on the Curiosity HPC
Last time, I showed how to get started with Microchip's Curiosity HPC board. I will now explore the use of the included buttons and LEDs on this microcontroller board.
Read More »PIC16F877A - More Microcontroller Features
We have managed to blink an LED and use interrupts and timers with the PIC16F84A. Sadly, that’s almost all we can do with that microcontroller as it lacks features that most microcontrollers or Arduino have. From here on, we will now be using the PIC16F877A.
Read More »Using a Water Level Sensor with Microcontrollers
A water level sensor is a simple device used to measure the level and volume of water inside a container. This tutorial shows you how to use a water level sensor with microcontrollers like an Arduino or PIC.
Read More »PIR Motion Sensor
You can in fact build your own motion sensor without spending too much. Motion sensors can be set up using ultrasonic transceivers, video cameras, or microwave signals. In this tutorial, I’ll show you how to use the PIR motion sensor with a microcontroller. PIR is short for passive infrared which …
Read More »How to Use L298N Motor Driver
You can drive an LED on or off using a microcontroller like Arduino or PIC. There’s no problem there because the 20 mA or so current from the pins is enough. You can’t drive loads that require much more current like a motor. This is where the L298N motor controller …
Read More »