i2c

Discussion about projects that used PIC Microcontroller, Hardware Interface, Programming Algorithm and etc......

i2c

Postby bear » Sun Jul 17, 2011 11:07 pm

anyone know how to use i2c??
my project needs to send data more than 8-bits.. so i think i2c is better application..
but i have no idea about this communication..
bear
Apprentice
 
Posts: 46
Joined: Tue Oct 05, 2010 2:11 am

Re: i2c

Postby shahrul » Mon Jul 18, 2011 1:07 am

Send data between PIC to what device?
There are the way to use
1) UART transmit and UART receive
2) SPI master and SPI slave
3) I2C master and I2C slave
User avatar
shahrul
Professional
 
Posts: 812
Joined: Sat May 16, 2009 9:54 pm
Location: Selangor

Re: i2c

Postby robosang » Sun Jul 24, 2011 8:48 pm

:D
1st, not necessary to use I2C even when you need to send data more than 8-bit, as pointed out by shahrul, there are many serial communication protocol which is suitable, and serial communication is meant to send data more than 1 byte, we normally use it to send 1 byte because that is the minimum data it can send.

You can refer to Cytron DIY project. They have several examples using I2C, one of it is the Real Time Clock with DS1307.
robosang
Expert
 
Posts: 1239
Joined: Wed Jun 10, 2009 5:37 pm

Re: i2c

Postby Brian Griffin » Mon Jul 25, 2011 4:50 pm

bear WROTE:anyone know how to use i2c??
my project needs to send data more than 8-bits.. so i think i2c is better application..
but i have no idea about this communication..


I2C only uses two wires, hence the alternate name "Two Wire Interface". The I2C/IIC is developed by Philips Inc.

SPI uses three wires. It is developed by Motorola.

In microcontrollers, all of these send/receive data by 8-bit chunks.
PIC - UIC00B from Cytron (replacement for my broken PICKit 2), Pickit 3, MikroC for PIC
dsPIC - MikroC for dsPIC, mikromedia board (dsPIC33)
AVR - AVR Dragon
Parallax - Prop tool
User avatar
Brian Griffin
Enthusiast
 
Posts: 403
Joined: Mon Jan 17, 2011 9:36 am


Return to PIC Microcontroller

Who is online

Users browsing this forum: No registered users and 4 guests