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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
04/15/05 14:07
Modified:
  04/15/05 14:13

Read: times


 
#91644 - re:
Responding to: ???'s previous message
At end of i2c_start SDA is cleared
and you can see in my I2C_READ routine
i don't use SETB SDA,
therefore when i want to reading from SDA pin
SDA is 0,Why?
why my code works properly!
I accept my corection post was wrong
but jan,your attitude was unsuitable too
Please say your suggestion more friendly,etc.etc

EEPROM_READ:
LCALL I2C_START
LCALL EEPROM_WRITE_ADDR
MOV A,DPH
LCALL WRITE
MOV A,DPL
LCALL WRITE
LCALL I2C_START
LCALL EEPROM_READ_ADDR
LCALL I2C_READ
LCALL I2C_STOP1
CLR SCL
LCALL DELAY
SETB SDA
SETB SCL
LCALL DELAY
CLR SCL
LCALL DELAY
RET

I2C_START:
SETB SDA
SETB SCL
LCALL DELAY
CLR SDA
CLR SCL
RET

EEPROM_READ_ADDR:
MOV A,#10100001B
LCALL WRITE1
RET

WRITE1:
MOV R7,#8
WRITING1:
RLC A
MOV SDA,C
LCALL CLOCK
DJNZ R7,WRITING1
RET

I2C_READ:
MOV R7,#8
GFD:
LCALL CLOCK
MOV C,SDA
RLC A
DJNZ R7,GFD
MOV DYTA,A
RET


List of 28 messages in thread
TopicAuthorDate
Bit Bang i2c            01/01/70 00:00      
   You should            01/01/70 00:00      
      Errr            01/01/70 00:00      
      a slight problem            01/01/70 00:00      
   I was            01/01/70 00:00      
      Licence            01/01/70 00:00      
         call it SMB            01/01/70 00:00      
            maybe different            01/01/70 00:00      
   Maybe!            01/01/70 00:00      
      Correction!            01/01/70 00:00      
         SETB SDA            01/01/70 00:00      
            misunderstanding?            01/01/70 00:00      
         re:            01/01/70 00:00      
   Thanks to Atmel            01/01/70 00:00      
      'Stub' resistors missing?            01/01/70 00:00      
         Pull ups ?            01/01/70 00:00      
            Not those...            01/01/70 00:00      
               Rp            01/01/70 00:00      
                  IIC is owned by philips why not go there            01/01/70 00:00      
                  You're right!            01/01/70 00:00      
   Set port as input - NO SUCH THING!            01/01/70 00:00      
      oh yes there is            01/01/70 00:00      
         Yes, but not here?            01/01/70 00:00      
         nowhere in the documentation            01/01/70 00:00      
            one more reason not to rely on testing            01/01/70 00:00      
               one more reason not to rely on testing            01/01/70 00:00      
               Catch 'em young ...            01/01/70 00:00      
                  Yes            01/01/70 00:00      

Back to Subject List