component I2C

Forum for problems or queries regarding Flowcode Comms Components. Eg LIN, I2C, SPI, RS232, CAN, IrDA etc

Moderators: Benj, Mods

Post Reply
pilou8830
Flowcode V4 User
Posts: 58
Joined: Mon Aug 16, 2010 12:52 am
Been thanked: 1 time
Contact:

component I2C

Post by pilou8830 »

hello, I have version 3 of flowcode.j 'd like to order an external EEPROM, such as a bus with 24C256N I2C.Le example program for I2C component does not display as "Hi" but yy or ASCII code 255 .
Posting in the component: s, 160,0,0,72 "(H), 105 (i), p for writing (ok).
For reading: s, 160,0,0, r, 161.255 (?), 255 (?), P. (not ok)
255 instead of 72, 255 instead of 105?
Can you help me? I have yet to assemble it. I will use a PIC16F877 to 4000000Hz.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: component I2C

Post by Benj »

Hello,

With things such as I2C etc it is normally best to try on hardware using an LCD or LEDs to help diagnose if things are working correctly.

Eg if you are writing certain values using the I2C simulation and then expecting to be able to read back the values then this will probably not work correctly.

pilou8830
Flowcode V4 User
Posts: 58
Joined: Mon Aug 16, 2010 12:52 am
Been thanked: 1 time
Contact:

Re: component I2C

Post by pilou8830 »

Okay I spend achievement and tells you what the next week.
thank you

pilou8830
Flowcode V4 User
Posts: 58
Joined: Mon Aug 16, 2010 12:52 am
Been thanked: 1 time
Contact:

I2C RESOLVED

Post by pilou8830 »

After changing the port (port A to port B) Port B default because Flowcode outputs are real!
And after loading the SLC and SDA pins with resistors of 4.7 k everything works!
Thank you Thank you Thank you :lol:

Post Reply