CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Reading and writing to EEPROM 2432 multiple chips

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Arakel



Joined: 06 Aug 2016
Posts: 107
Location: Moscow

View user's profile Send private message Visit poster's website AIM Address

Reading and writing to EEPROM 2432 multiple chips
PostPosted: Thu Aug 17, 2017 5:10 am     Reply with quote

I was looking at the driver for I2C, "2432.c", I managed to read and write from a random and to a random address. Now I want to use it for multiple chips.

I know this "a0" is the control byte which specifies at the last 3 "0s" the address. Should I copy the driver as a second driver with a different control byte for the second chip or should I rewrite the "write" and "read" functions to take an address?
If I have to rewrite them, whats the difference between using "BYTE" and "unsigned int8" ?
_________________
Yo! I love learning and technology! I just do not have experience so do not be angry if I ask a stupid question about a detail! From so much to remember sometimes I forget the details in order to remember the big problems!
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Aug 17, 2017 5:19 am     Reply with quote

The issue of how to handle multiple eeproms was already answered by
Ttelmah in this recent thread, with code:
http://www.ccsinfo.com/forum/viewtopic.php?t=56412
Arakel



Joined: 06 Aug 2016
Posts: 107
Location: Moscow

View user's profile Send private message Visit poster's website AIM Address

PostPosted: Thu Aug 17, 2017 5:23 am     Reply with quote

Sorry about that, multitasking is something very bad! The human processor can also not do more than 1 thing at a time!
_________________
Yo! I love learning and technology! I just do not have experience so do not be angry if I ask a stupid question about a detail! From so much to remember sometimes I forget the details in order to remember the big problems!
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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