Tag Archives: PIC18F2550


Lab 14: Inter-Integrated Circuit (I2C) communication

I2C (Inter-Integrated Circuit) is a short distance serial interface that requires only 2 bus lines for data transfer. It was invented by Philips in 1980’s, originally to provide easy on-board communications between a CPU and various peripheral chips in a TV set. Today, it is widely used in varieties of embedded systems to connect low speed peripherals (external EEPROMs, digital sensors, LCD drivers, etc) to the main controller. In this experiment, we will cover an overview of I2C protocol, its implementation in PIC microcontrollers, and the method of connecting single and multiple devices on a common I2C bus. We will demonstrate the technique by connecting two I2C EEPROM chips (24LC512) and an I2C compatible temperature sensor (DS1631) with PIC18F2550 microcontroller.

I2C devices with PICMicro

Read more

Lab 12: Basics of LED dot matrix display

We covered how to interface seven segment LED displays to a PIC microcontroller in two sections: Lab 6 and Lab 11. Today, we will move on to interfacing an LED dot matrix display. LED dot matrices are very popular means of displaying information as it allows both static and animated text and images. Perhaps, you have encountered them at gas stations displaying the gas prices, or in the public places and alongside highways, displaying advertisements on large dot matrix panels. In this experiment, we will discuss about the basic structure of a monochrome (single color) LED dot matrix and its interface with a microcontroller to display static characters and symbols. We will cover the animation stuff in next tutorial. I am using the PIC18F2550 microcontroller on the StartUSB for PIC board for demonstration, but this technique is applicable to any other microcontrollers that have sufficient I/O pins to drive the LED matrix.

Interfacing a LED dot matrix display with a PIC microcontroller

Read more

Getting started with PIC18F Microcontrollers

After writing quite a bit of experimental tutorials on PIC16F series of microcontrollers, I thought of moving forward to the enhanced-range family of PIC microcontrollers, the PIC18F, which was introduced by Microchip in late 90s. Although PIC16F series are excellent general purpose microcontrollers, certain limitations have emerged, such as, they have limited program and data memory, their stack size is small, and all the interrupt sources have to share a single interrupt vector. Their limited instruction set also doesn’t provide direct support for more advanced peripherals interfaces like USB and CAN. The basis of the PIC18F Series is to address the issues that limit the PIC16F series. The PIC18F series of microcontrollers has larger instruction set, more memory, bigger stack, more external interrupts, higher speed, enhanced I/O port architecture, and many more features that we will be exploring in upcoming tutorials. I have decided that I am not going to spend much time on soldering and making my own prototyping board for PIC18F microcontroller as I did for PIC16F. I am going to use StartUSB for PIC board from mikroElektronika for writing these tutorials.

StartUSB for PIC board from mikroElektronika

Read more

Recent Entries »