Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

DS1307
Goto page Previous  1, 2
 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    www.mcselec.com Forum Index -> BASCOM-AVR Unsupported versions
View previous topic :: View next topic  
Author Message
Printpix52

Bascom Member



Joined: 18 Jun 2014
Posts: 282
Location: D.F.

mexico.gif
PostPosted: Thu May 25, 2017 3:17 am    Post subject: Reply with quote

Hi all!!
Does anyone have a manual "How to prepare a BASCOM i2c address from an i2c address?" I would like to read this manual since the help does not appear DS1307 nor example. Very Happy
Back to top
View user's profile
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 6197
Location: Holland

blank.gif
PostPosted: Thu May 25, 2017 10:15 am    Post subject: Reply with quote

The manual/help does mention that bascom i2c address is vendor address shift left by 2. Or multiply by 2.
The i2c scanner will give this info.
if you had done some search on the forum you would have found that too.
The more interesting question is : why does bascom use a different address?

After an i2cstart we must send the address of the slave.
This address has a Read/Write bit at bit position 0, which indicates if we want to read or write.
Thus the 8 bit we must send is A6,A5,A4,A3,A2,A1,A0, R/W
While vendor uses address &H20 for example, we must send it as &H40 because of the R/W bit.

And while R/W is not actually an address, i think it simplifies dealing with I2C since it is always sent as part of the address.

_________________
Mark
Back to top
View user's profile Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    www.mcselec.com Forum Index -> BASCOM-AVR Unsupported versions All times are GMT + 1 Hour
Goto page Previous  1, 2
Page 2 of 2

 
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
You cannot attach files in this forum
You cannot download files in this forum