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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
08/22/03 15:32
Read: times


 
#53106 - Move data from XRAM to EEPROM - how?
Hi,
does somebody use Temics-formed chips which have both EEPROM and XRAM on-chip (here: T89C51CC01 and T89C51AC2)?
These devices have EEPROM mapped by EECON/EEE bit to 0x0000...0x07FF and internal extra-RAM mapped by EXTRAM/AUXR bit to 0x0000...0x03FF. To write EEPROM I should map Column Latches, write to them with MOVX and then write to EECON a command sequence. The problem is that I need to move bytes from XRAM which address is overlapped via EEPROM! As result, I enable/disable EEPROM Column Latches many times due moving; and I am not sure that this is correct way. Here is example:
MOVE_XRAM2EEPROM:
	CLR	EA
MOVE_XRAM2EEPROM_C:
	MOV	EECON,#00000000b	; disable EEPROM
	MOV	AUXR,#00001101b		; enable XRAM
	MOVX	A,@DPTR
	INC	DPTR
	INC	AUXR1			; select second DPTR
	MOV	AUXR,#00001111b		; disable XRAM
	MOV	EECON,#00000010b	; enable EEPROM
	MOVX	@DPTR,A
	INC	DPTR
	INC	AUXR1			; select first DPTR
	DJNZ	R7,MOVE_XRAM2EEPROM_C
	MOV	EECON,#0x50
	MOV	EECON,#0xA0
	SETB	EA
	RET


So questions are:
1) is it correct to disable EEPROM Column Latches --- will command sequence write all moved bytes or just last one? I dunno :(
2) Should I disable XRAM each time before enable EEPROM or EEE bit has higher priority than EXTRAM?

Thank you and good days!

List of 5 messages in thread
TopicAuthorDate
Move data from XRAM to EEPROM - how?            01/01/70 00:00      
   RE: Move data from XRAM to EEPROM - how?            01/01/70 00:00      
      RE: Move data from XRAM to EEPROM - how?            01/01/70 00:00      
         RE: Move data from XRAM to EEPROM - how?            01/01/70 00:00      
      RE: Move data from XRAM to EEPROM - how?            01/01/70 00:00      

Back to Subject List