Registers 20M2 20X2

depeet

New Member
I stumbled upon PeekSFR and PokeSFR which can be very useful in some programs I want to write. The only problem is that I can't find a summary of registers, like timers, I could peek. Does someone have a registerlist of the 20M2 and 20x2
 

AllyCat

Senior Member
Hi,

Welcome to the forum.

All the SFRs are documented in the "base" PIC data sheet, linked from the "Chip Labels" page. For M2 chips, the top 3 bits of the peek/poke address byte indicate the Bank number and the other 5 bits are the register number within the bank. Beware that the first 12 bytes in each bank cannot be accessed and will instantly reset the PICaxe.

There are other "complications", for example Timer 1 is used by the PICaxe operating system and others for PWM outputs. Also, many of the M2 pins are "remapped" (to ports B and C) whilst the base PIC uses (parts of) ports A, B and C. But some of us do use the SFRs quite regularly, so you should be able to get help from the forum for any specific requirements.

Cheers, Alan.
 

inglewoodpete

Senior Member
I stumbled upon PeekSFR and PokeSFR which can be very useful in some programs I want to write. The only problem is that I can't find a summary of registers, like timers, I could peek. Does someone have a registerlist of the 20M2 and 20x2
Long time forum member westaust55 did a lot of research a few years ago and created a memory map with SFRs included. I think this version (#9a) is up to date.
 
Top