I'm interfacing 8052 with 24c16 eeprom. Everything works in charm, suddenly a new problem popped up. I can't address the memory location after 0ffh (255 bytes), for that i need more than 8 bits address. And i tried the following code, in which the 16 bit address is written to the DPTR.
But it doesn't seems to be working. All the subroutines in the below code works perfect.
Can any one point me where exactly am i committing mistake ?
But it doesn't seems to be working. All the subroutines in the below code works perfect.
Can any one point me where exactly am i committing mistake ?
Rich (BB code):
read_data:
acall I2C_start
mov a,#0ah ; address of the I2C device
acall send_data
mov a,dph ; location address
acall send_data
mov a,dpl ; location address
acall send_data
; acall I2C_delay
acall I2C_start
mov a, #0a1h
acall send_data
acall get_data
acall I2C_stop
ret
Last edited: