Fernando, movlw 0x0F8 ;can ignore first 0 after "x", same as 0xF8 andlw STATUS ;Clears bits 0, 1 and 2 (3 lower bits) The 0x0F8 has nothing to do with addresses or bank switching. It simply clears the "carry", "digit carry/borrrow" and "zero" bits in the status register. The bank select bits are the upper 3 bits. movlw 0x1F andlw STATUS ;clears all bank select bits, now bank 0 The "h" in the memory maps means "hexadecimal". For example, 81h is 0x81 is 129 decimal. I am not sure about why to use a 1 MHz crystal when the part is rated for 4MHz. Possible reasons: - don't need speed and want to save power - don't need speed and only have 1MHz crystal available - Could it be the crystal is really 4 MHz, which makes the cycle/instruction frequency 1 MHz (instruction rate = clock/4) Hope this helps. Bob. ---------- From: Fernando Scalini Sent: Wednesday, November 26, 1997 2:19 AM To: PICLIST@MITVMA.MIT.EDU Subject: memory terminology Excuse my ignorance of such basic knowledge, but 3 books and several weeks of banging my head against my desk have driven me to this. I can't figure out how memory is mapped for the PICs (16c84). the data sheets show bank 0 from 00h to 7Fh and bank 1 from 80h to FFh. I think I've finally figured out the concept of data banks and register shadowing but their is a sample program in Predko's book that clears the STATUS flags as follows: movlw 0x0F8 andwf STATUS What does the "h" in the memory maps mean, and where does the final 8 in 0x0F8 fit in to this format. Also, 0x0F8 was never defined previously in the program. why was this address selected and how can you know what its value is. Another quick one: If a processor is rated at 4Mhz, why use only a 1Mhz crystal. thanks for your help.