WF AUTOMA_AO wrote: > Did someone have experience how to write and read a information at > 8000H external position memory! Using the PIC17c42 assembly code? mIGUEL: To read the contents of address 8000H into registers HIBYTE and LOBYTE: MOVLW HIGH (08000H) ;TBLPTR points to 08000H. MOVWF TBLPTRH ; MOVLW LOW (08000H) ; MOVWF TBLPTRL ; TABLRD 0,0,LOBYTE ;Copy the 16-bit data from 08000H into the ;table latch. TLRD 0,LOBYTE ;Copy the low 8 bits from the table latch ;into the "LOBYTE" register. TLRD 1,HIBYTE ;Copy the high 8 bits from the table ;latch into the "HIBYTE" register. To write the contents of registers HIBYTE and LOBYTE to address 8000H: MOVLW HIGH (08000H) ;TBLPTR points to 08000H. MOVWF TBLPTRH ; MOVLW LOW (08000H) ; MOVWF TBLPTRL ; TLWT 0,LOBYTE ;Copy the contents of the "LOBYTE" ;register to the low 8 bits of the ;table latch. TABLWT 1,0,HIBYTE ;Copy the contents of the "HIBYTE" ;register to the high 8 bits of the ;table latch, then copy the contents ;of the table latch to address 8000H. You may want to look at Microchip's appnote AN548; it's probably on the Microchip web site. -Andy === Andrew Warren - fastfwd@ix.netcom.com === Fast Forward Engineering - Vista, California === http://www.geocities.com/SiliconValley/2499