Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

i2c

Status
Not open for further replies.

jijita

New Member
in a read sequential do i have to do a receive enable after every byte read
and wp what should i do with it
 
I would suggest you read the datasheet, it knows all. I have been doing some work with i2c recently and have got 4 datasheets scattered around to aid me.

I suggest you look at Nigel Goodwins site as well! www.winpicprog.co.uk
 
I'm assuming you're using the Microchip hardware implementation.

Microchip's data sheet & App Note on this is notoriously horrible. It looks nice on the surface but once you start trying to implement it and ask hard questions the datasheet is very short on real information.

In particular, how to read states is not clear, and how to accomodate link problems and reset the state machine is totally left out. In fact, a discussion of the state machine as a whole is far too vague. So look to working examples.
 
jijita said:
in a read sequential do i have to do a receive enable after every byte read
and wp what should i do with it


Yes you do. All I2C slave devices need a clock source for data transmission and the only devices that provide a clock signal are the masters (eg. your PIC). When you enable receive mode, it tells the PIC to start the clock signal so the slave devices can clock out their serial stream. After receiving a byte, you must generate an acknowledge. Once the acknowledge has completed, you must enable the receive mode to continue the data transmission. You can do this as many times as you want until you generate a stop condition.

-Bill
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top