Author |
Message |
Topic: I2c eeprom - works fine but odd problem with code or me? |
skywest
Replies: 10
Views: 22505
|
Forum: General CCS C Discussion Posted: Thu Jun 28, 2018 2:54 pm Subject: I2c eeprom - works fine but odd problem with code or me? |
Thanks so much Ttelmah for all your help.
Changed the ints to 16 bit
Added the NACK
Added the while(TRUE);
Now works fine.! |
Topic: I2c eeprom - works fine but odd problem with code or me? |
skywest
Replies: 10
Views: 22505
|
Forum: General CCS C Discussion Posted: Thu Jun 28, 2018 12:58 pm Subject: I2c eeprom - works fine but odd problem with code or me? |
Yes, in fact the devices I'm using I have pulled from those old boards. Worked fine and also similar for reading and writing a DS1307 registers and it's internal memory. Just for interest, this is the ... |
Topic: I2c eeprom - works fine but odd problem with code or me? |
skywest
Replies: 10
Views: 22505
|
Forum: General CCS C Discussion Posted: Thu Jun 28, 2018 11:54 am Subject: I2c eeprom - works fine but odd problem with code or me? |
Thanks, that's really useful stuff and seems to reflect many of the software issues I have been seeing.
This is based old code I wrote in 2003, I'm trying to port from my old compiler (wiz c) whic ... |
Topic: I2c eeprom - works fine but odd problem with code or me? |
skywest
Replies: 10
Views: 22505
|
Forum: General CCS C Discussion Posted: Thu Jun 28, 2018 10:02 am Subject: I2c eeprom - works fine but odd problem with code or me? |
Thanks, yes I have tried that, no luck there. As the printf in i2cRead displays the correctly read value, something is going wrong when it returns that value to the main function where it ends up as n ... |
Topic: I2c eeprom - works fine but odd problem with code or me? |
skywest
Replies: 10
Views: 22505
|
Forum: General CCS C Discussion Posted: Thu Jun 28, 2018 8:56 am Subject: I2c eeprom - works fine but odd problem with code or me? |
I have been testing CCS with I2c and a 24LC64 eeprom.
The I2c is working perfectly, I can write a byte to a memory location and read it back. Using a logic analyser, I can see that this works correct ... |
Topic: Can not change device this far into the code |
skywest
Replies: 2
Views: 10355
|
Forum: General CCS C Discussion Posted: Mon May 14, 2018 12:23 am Subject: Can not change device this far into the code |
Thanks. |
Topic: Can not change device this far into the code |
skywest
Replies: 2
Views: 10355
|
Forum: General CCS C Discussion Posted: Sun May 13, 2018 10:15 am Subject: Can not change device this far into the code |
I am trying out some basic functions of CCS.
I want to do some RS232 comms and have just #included rs232.h and the compiler immediately throws up errors.
The first line in rs232.h is #device PIC18F ... |
|