Tag Archives: StartUSB for PIC


Lab 14: Inter-Integrated Circuit (I2C) communication

MutipleI2C_Devices

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

How to make a contact-less digital tachometer using IR-light reflection technique

Rotating disc with a reflector

Tachometer is a device that measures the rotational speed of any shaft or disc. The unit of the measurement is usually revolutions per minute or RPM. The traditional method of measuring RPM of a rotating shaft was based on velocity feedback concept where a dc generator is hooked to the rotating shaft so that the voltage induced across the generator’s terminals is proportional to the speed of the shaft. Today, we are going to make a digital tachometer based on a PIC microcontroller that requires no physical contact with the rotating shaft to measure its rotational speed. The physical contact is avoided by using an optical detection technique that requires an infrared light emitting diode in conjunction with a photo detecting diode. StartUSB for PIC from mikroElektronika is the main controller board used in this project. To read more about this board, visit my article Getting started with PIC18F Microcontrollers. This tachometer can measure speeds up to 99960 RPM with the resolution of 60 RPM. The result is shown on a 16×2 character LCD display.

Contact-less digital tachometer using StartUSB for PIC and optical sensors

Read more