Tips and Examples
This page contains some examples of the code used in the tutorial. Some of the code have detailed explanations, while others do not. If there is a project without documentation and I get a lot of requests for instructions, I might spend some time writing out the specs if I have time. Requests of interesting projects are welcome, I might have already written something similar in the past anyway. Not all projects are PIC24 based, as I use PIC18′s for USB projects as well.
Basic IO: Button Debounce
A lot of weird things can happen when mechanical devices are introduced to an electrical circuit. Switches and buttons are the most basic of mechanical devices, but they can cause a ton of headaches. In this article, I look at some of the ways to “debounce” mechanical switches in order to use them as clean and reliable inputs to a microcontroller.
Finite State Machine Based LCD Controller
If you ever wanted to display text on an LCD, this article will show you how to effectively make an finite state machine for an LCD controller. Though I don’t go into detail into how the actual driver works, I do explain the concept with a simple demonstration. LCD’s are an effective way to display and output with one output pin!
Non-Blocking Code
For everyone who’s just starting to code, this article is a must read. Learn simple ways to write your program while still maintaining responsiveness in your system.
UART based I2C Controller
I frequently have to fool around with new IC’s. However, since a large number of modern day IC’s use the I2C bus, it would be inconvenient to build a controller on each and every circuit I prototype for component evaluation. Instead, I built a tool that translates RS232 UART commands into I2C commands. Then, using a program in Java to control my RS232 port from a computer, I can have full access to all the IC’s in one simple bus.

Entries (RSS)
[...] PIC Example Codes [...]