Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
06/16/03 14:14
Read: times


 
#48492 - RE: I2C routines wanted...
Responding to: ???'s previous message
Bruno,

There is one subroutine below you are looking for

;Receiving Byte From AT24C256 via I2C bus
FRAT24: SETB SDA ;Leave data bus
MOV B,#8 ;Bit counter
FRAT1: SETB SCL ;Strobe beginning
MOV C,SDA ;Put current bit
RLC A ;into accumalator
CLR SCL ;End of strobe
DJNZ B,FRAT1 ;All bites?
CLR SDA ;Put ACK bit
SETB SCL ;Last
NOP ;strobe on
CLR SCL ;clock bus
RET

Hope it helps you. Don't turn over the Earth(:-).

Regards,
George

List of 12 messages in thread
TopicAuthorDate
I2C routines wanted...            01/01/70 00:00      
   RE: I2C routines wanted...            01/01/70 00:00      
      RE: I2C routines wanted...            01/01/70 00:00      
         Here are the routines            01/01/70 00:00      
      RE: I2C routines wanted...            01/01/70 00:00      
   RE: I2C routines wanted...            01/01/70 00:00      
      RE: I2C routines wanted...            01/01/70 00:00      
         RE: I2C routines wanted...            01/01/70 00:00      
            RE: I2C routines wanted...            01/01/70 00:00      
               RE: I2C routines wanted...            01/01/70 00:00      
   RE: I2C routines wanted...            01/01/70 00:00      
   RE: I2C routines wanted...            01/01/70 00:00      

Back to Subject List