bcf INTCON,GIE
movfw number
call Send
BANKSEL EEADR ;
movlw DATA_EE_ADDR ;
movwf 0x00 ;Data Memory Address to write
movlw DATA_EE_DATA ;
movwf EEDAT ;Data Memory Value to write
BANKSEL EECON1 ;
bcf EECON1, EEPGD ;Point to DATA memory
bsf EECON1, WREN ;Enable writes
bcf INTCON, GIE ;Disable INTs.
btfsc INTCON, GIE ;SEE AN576
goto $-2
movlw 0x55 ;
movwf EECON2 ;Write 55h
movlw 0xAA ;
movwf EECON2 ;Write AAh
bsf EECON1, WR ;Set WR bit to begin write
bsf INTCON, GIE ;Enable INTs.
write_complete_check
btfsc EECON1,WR
goto write_complete_check
bcf EECON1, WREN ;Disable writes
;*********************
Send
movwf TXREG
bsf STATUS,RP0 ; ROUTINE RESPONSIBLE FOR TRANSMISSION
Wait
btfss TXSTA,TRMT
goto Wait
bcf STATUS,RP0
return