Posted 2 Nov 2007 Alright guys/gals, here is a challange for all of you CoDeSys Guru's out there. Write an I2C Bus Protocol Driver using CoDeSys in ST using standard I/O's of a PLC. For example, you can tag the SCL signal to one of the PLC outputs and the SDL to one of the PLC inputs/outputs (share the same signal). All you have to do is write one byte of data to the I2C EEPROM and read one byte of data out of the EEPROM. I have attached a PDF file that contains the specs on this module and the pinouts for clarification. I just bumped into this interesting protocol. I haven't written anything for it yet. Let me know what your thoughts are. I will start writing hopfully later on this evening. Have fun and let me know what you come up with! PS: Just remember, there is a Read or Write Initialization byte that has to be transmitted before the actual data byte is written or read. HAN_ID_Module_Flow_Chart.pdf Share this post Link to post Share on other sites
Posted 2 Nov 2007 Hey Chaca, Yow, that's alot of work. I write all my I2C stuff on a 16-bit micro. To each his own though. Peace Share this post Link to post Share on other sites
Posted 2 Nov 2007 Hey Tony, I just finished coding it in SLC500, now I am going to work on it to write in CoDeSys. Will post it when ready...just curious to see how many people are comfortable with St. Cheers! Share this post Link to post Share on other sites
Posted 3 Nov 2007 Here is the SLC Code. Did anyone resolve this in CoDeSys yet? Read_Harting_ID.RSS Share this post Link to post Share on other sites
Posted 15 Nov 2007 Here is the Omron CX-1 Code. I still didn't have a chance to do that in CoDeSys. Han_Modular_ID_Module_I2C_protocol.zip Share this post Link to post Share on other sites