|
|
View previous topic :: View next topic |
Author |
Message |
allenhuffman
Joined: 17 Jun 2019 Posts: 552 Location: Des Moines, Iowa, USA
|
Alternative I2C library for CCS? |
Posted: Mon Sep 09, 2019 10:18 am |
|
|
Does anyone know of an alternative I2C library that could be used with the CCS IDE/compiler? I've found implementations for PIC in general, and MPLAB, but I am trying to find something I could integrate into existing code to see if behavior of an issue we have been having might change. _________________ Allen C. Huffman, Sub-Etha Software (est. 1990) http://www.subethasoftware.com
Embedded C, Arduino, MSP430, ESP8266/32, BASIC Stamp and PIC24 programmer.
http://www.whywouldyouwanttodothat.com ? |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9221 Location: Greensville,Ontario
|
|
Posted: Mon Sep 09, 2019 10:35 am |
|
|
I've not had any issues but it'd be easy enough to dump the listing, see how CCS codes, then cut you own 'drivers' and 'tweak' them for whatever device you're using. Once you've got the machine code, you simply check for correct timing and sequences of operations.
I've seen in the past so called 'I2C' compatible devices that need specific timing requirements. Course that was 2 decades ago, preCCS, when I used assembler.
Is there a specific device ? as every RTC, EEPROM have always worked with CCS drivers. Remember.. the CCS drivers tend to be 'generic'.
Jay |
|
|
allenhuffman
Joined: 17 Jun 2019 Posts: 552 Location: Des Moines, Iowa, USA
|
|
Posted: Mon Sep 09, 2019 10:42 am |
|
|
temtronic wrote: |
Is there a specific device ? as every RTC, EEPROM have always worked with CCS drivers. Remember.. the CCS drivers tend to be 'generic'.
Jay |
The issue is on a bus with three PIC-based devices connected to a PC via FTDI I2C driver. At some point, we get a bus hang. It appears one of the PIC devices misses a clock pulse and creates the issue.
We have seen some oddness with the spacing of the clock pulses the FTDI part generates and have a dialog with FTDI on this, also. (The FTDI drivers do not support the bus clear (I2C spec 3.1.16).
Since we can't generate the clock pulses from the PC, we are now trying to do so from the PIC side. I started researching how to do this today.
Meanwhile, I've been asked to find an alternate I2C implementation that we can use to try to recreate this.
It's been a fun last few weeks. _________________ Allen C. Huffman, Sub-Etha Software (est. 1990) http://www.subethasoftware.com
Embedded C, Arduino, MSP430, ESP8266/32, BASIC Stamp and PIC24 programmer.
http://www.whywouldyouwanttodothat.com ? |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|