I2C COMMUNICATION WITH PIC MICROCONTROLLER

I2C COMMUNICATION WITH PIC MICROCONTROLLER: I²C stands for Inter-Integrated Circuit. It is a short distance serial interface that requires only two bus lines for bi-directional data transfer. It is used for attaching lower speed peripheral ICs to microcontrollers in short distance communication. Low speed peripherals include external EEPROMs, digital sensors, lcd, etc. Page Contents 1 I2C communication PROT ...

Read more

Basics of the I2C Communication Protocol

So far, we’ve talked about the basics of SPI communication and UART communication, so now let’s go into the final protocol of this series, the Inter-Integrated Circuit, or I2C. You’ll probably find yourself using I2C if you ever build projects that use OLED displays, barometric pressure sensors, or gyroscope/accelerometer modules. I2C combines the best features of SPI and UARTs. With I2C, you can connect mu ...

Read more

Interfacing of PIC16F84A with (i2c based) 24LC64 EEPROM (Code + Proteus simulation)

This post provides the code for interfacing 24LC64 EEPROM with PIC16F84A microcontroller. This 24LC64 EEPROM has i2c based interface and PIC16F84A doesn't have any built in i2c modules, so software i2c module is created in the code. This code is written in C language using MPLAB with HI-TECH C compiler. You can download this code from the 'Downloads' section at the bottom of this page. It is assumed that yo ...

Read more

Connect I²C with PIC

The I²C full master MSSP module is available with a number of PIC MCU models. mikroC PRO for PIC provides library which supports the master I²C mode.   Important : Some MCUs have multiple I²C modules. In order to use the desired I²C library routine, simply change the number 1 in the prototype with the appropriate module number, i.e. I2C2_Init(100000); Library Routines I2C1_Init I2C1_Start I2C1_Repeated_Star ...

Read more

PIC16F877 i2c code and Proteus simulation

This post provides the i2c code (using the i2c module built in the hardware[1]) for PIC16F877 microcontroller. This code is written in C language using MPLAB with HI-TECH C compiler. You can download this code from the 'Downloads' section at the bottom of this page. It is assumed that you know how to blink an LED with PIC16F877 microcontroller. If you don't then please read this page first, before proceedin ...

Read more

PIC16F84A i2c (bit banging) code and Proteus simulation

This post provides the i2c bit banging code for PIC16F84A microcontroller. As we know[1], PIC16F84A microcontroller doesn't have any built in i2c modules, so we have to create it in the software. This code is written in C language using MPLAB with HI-TECH C compiler. You can download this code from the 'Downloads' section at the bottom of this page. It is assumed that you know how to blink an LED with PIC16 ...

Read more

PIC12F675 i2c (bit banging) code and Proteus simulation

This post provides the i2c bit banging code for PIC12F675 microcontroller. As we know[1], PIC12F675 microcontroller doesn't have any built in i2c modules, so we have to create it in the software. This code is written in C language using MPLAB with HI-TECH C compiler. You can download this code from the 'Downloads' section at the bottom of this page. It is assumed that you know how to blink an LED with PIC12 ...

Read more

I2C keypad using PIC18F4550 microcontroller

I2C keypad This instructable explains how to interface with a 4x4 keypad over an I2C bus. I started this project because I wanted some plug and play input and output modules for easy and fast prototyping of my electronics projects (mostly with PIC microcontrollers). Of course you can use leds and dip switches but they require lots of pins on your microcontroller and you only have binary I/O. To solve this p ...

Read more
Scroll to top