PDA

View Full Version : More I2C question with PBP



Qacer
- 28th February 2006, 16:32
Hello again kind folks,

I am using a PIC12F675. My datapin is GP0. The clockpin is GP1. The I2C device that I want to use is characterized as a slave-transceiver. The datasheet states that its "IC address C0: 1100000." Looking through the PBP manual, it says I2CWRITE DataPin,ClockPin,Control, {Address,}, Value, Label.

I am not quite sure what to put down in the Control option. I do not see any references to the Control option in the datasheet.

Also, if I want to read data from the I2C device, do I need to set TRISIO and GPIO to inputs before invoking the I2CREAD routine?

Another thing, the I2C datasheet does not state any pause between writing, so am I right to assume that I can just send multiple bytes in one I2CWRITE statement?

Thanks again!

BigWumpus
- 28th February 2006, 20:01
I am using a PIC12F675. My datapin is GP0. The clockpin is GP1. The I2C device that I want to use is characterized as a slave-transceiver. The datasheet states that its "IC address C0: 1100000." Looking through the PBP manual, it says I2CWRITE DataPin,ClockPin,Control, {Address,}, Value, Label.

I am not quite sure what to put down in the Control option. I do not see any references to the Control option in the datasheet.

Use the adress of the slave-device as control.


Also, if I want to read data from the I2C device, do I need to set TRISIO and GPIO to inputs before invoking the I2CREAD routine?

No.


Another thing, the I2C datasheet does not state any pause between writing, so am I right to assume that I can just send multiple bytes in one I2CWRITE statement?

Yes. It depends on your slave-device what does happen....

F1CHF
- 1st March 2006, 07:35
I had quite the same question
I got nice answer from Super Melanie
see
http://www.picbasic.co.uk/forum/showthread.php?t=3104&referrerid=745
good luck
francois

Qacer
- 2nd March 2006, 21:35
Thanks, all! :-)