Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Question about assembly code

Status
Not open for further replies.
what does this EEPROM instruction do sir? does 0xaa and 0x55 represents the destination of the bits to be saved?


Code:
eep_1		movf INDF, W
		movwf EEDATA
		;bcf INTCON, GIE
		bsf STATUS, RP0
		bcf EECON1, EEIF
		bsf EECON1, WREN
		movlw 0x55
		movwf EECON2
		movlw 0xaa
		movwf EECON2
		bsf EECON1, WR
 
what does this EEPROM instruction do sir? does 0xaa and 0x55 represents the destination of the bits to be saved?


Code:
eep_1		movf INDF, W
		movwf EEDATA
		;bcf INTCON, GIE
		bsf STATUS, RP0
		bcf EECON1, EEIF
		bsf EECON1, WREN
		movlw 0x55
		movwf EECON2
		movlw 0xaa
		movwf EECON2
		bsf EECON1, WR

Read the datasheet where it's clearly explained - this code comes directly from it.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top