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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
10/13/04 22:44
Read: times


 
#79294 - RE: MetaLink RD2 to ED2
Responding to: ???'s previous message
I'm not using any emulator, i'm using the chip directly on the system.
The EEPROM is in the chip (if the emulator has more i don't know)
I used this code for read/write in the eprom and works:
;Code for write and read eeprom in AT89c51ED2
;In DPTR the address, in A the data
WRee:	push	acc
lb1:	mov	a,eecon		;Waits the last data was writen
	jb	eebusy,lb1
	clr	ea		;Disable Interrupts
	orl	eecon,#00000010b	;Enable EEPROM
	pop	acc
	movx	@dptr,a
	anl	eecon,#11111101b	;Disable EEPROM
	setb	ea		;Enable Interrupts interrupciones
	ret
RDee:	mov	a,eecon		;Waits the last data was writen
	jb	eebusy,RDee
	clr	ea		;Disable Interrupts
	orl	eecon,#00000010b	;Enable EEPROM
	movx	a,@dptr
	anl	eecon,#11111101b	;Disable EEPROM
	setb	ea		;Disable EEPROM
	ret
;

Sorry the comments are translated 'on the fly' (i usually don't speak english)

List of 14 messages in thread
TopicAuthorDate
MetaLink RD2 to ED2            01/01/70 00:00      
   RE: MetaLink RD2 to ED2            01/01/70 00:00      
      RE: MetaLink RD2 to ED2            01/01/70 00:00      
         RE: MetaLink RD2 to ED2            01/01/70 00:00      
         RE: MetaLink RD2 to ED2            01/01/70 00:00      
   RE: MetaLink RD2 to ED2            01/01/70 00:00      
      RE: MetaLink RD2 to ED2            01/01/70 00:00      
   Why won't it work            01/01/70 00:00      
      RE: Why won't it work            01/01/70 00:00      
      Who do you trust?            01/01/70 00:00      
         Why I believe...            01/01/70 00:00      
   RE: MetaLink RD2 to ED2            01/01/70 00:00      
      RE: MetaLink RD2 to ED2            01/01/70 00:00      
         RE: MetaLink RD2 to ED2            01/01/70 00:00      

Back to Subject List