Would you like to react to this message? Create an account in a few clicks or log in to continue.

You are not connected. Please login or register

PIC enhanced Mid-Range core and 16F1826.

2 posters

Go to page : 1, 2, 3  Next

Go down  Message [Page 1 of 3]

1PIC enhanced Mid-Range core and 16F1826. Empty PIC enhanced Mid-Range core and 16F1826. Sun Jan 02, 2022 6:43 am

arcachofo

arcachofo

Thread to discuss and report about PIC enhanced MId-Range core and 16F1826.

These will be be steps: (*) = Done:

(*)1- "Dummy" enhanced core and 16F1826:
This will be the base to start adding things.
The "Dummy" enhanced core will be a subclass of the old midrange core, so an exact copy.
From here I will add new instructions and other features.

(*)2- Implement new instructions and make the cpu functional.
- Rough implementation of new instructions is done ( not tested ).

3- Test the cpu and solve issues:
   Looks to be working, but need more testing.

4- Start to add perifericals...
(*)- Ports: done.
(*)- ADC: New variant..
(*)- Eusart: basic implementation done.
(*)- Timer0: Using existing variant.
(*)- Timer1: New variant.
(*)- Timer2: Using existing variant.
- Comparators: Need new variants.

5- Testing Perifericals:
Ports:
(*)- Basic Read/Write OK.
- PORTA5 only input.
(*)- Pullups.
- Analog Pins.
(*)- INT interrupt.
- IOC interrupt.
(*)- Clock Pins.
- Reset Pin.

Eusart:
(*)- Basic: Serial Monitor shows send & received data.
(*)- Communication betwen 2 16f1826.
- Baudrate.
- Interrupt.
- Change Pins.

ADC:
(*)- Basic reading OK
(*)- Interrupt OK
(*)- Left/Right justified OK.
(*)- Prescaler: implementation not finished.
(*)- Vref.

DAC:
(*)- Basic operation.
(*)- Voltage Output.
(*)- Vref.

TIMER0:
(*)- Basic timer operation (internal clock).
(*)- Prescaler.
(*)- Interrupt.
(*)- External clock.
- External clock edge selection.

TIMER1:
(*)- Basic timer operation (internal clock).
(*)- Prescaler.
(*)- Interrupt.
(*)- External clock.
- External clock edge selection.

TIMER2:
(*)- Basic timer operation.
(*)- Prescaler.
(*)- Interrupt.
Note: With XC8 compiler it breaks __delay_ms()
____________________________________________


Perifericals:
To find if a periferiacl is already implemented you need to use this file:
SimulIDE_1.0.0-Rxx/data/PIC/pic/types
It is still very incomplete, but I will update it soon.

In that file you can see the existing variants for each periferical.
For example ADC:
- Type 00: p16F87x.
- Type 10: p16F88x.
- Type 11: p12F675.

You can see that there are 3 variant implemented and which models use it.
So in 16F1826 datasheet go to ADC section and compare it with the datasheet of those in the list.
- You can have a look at the block diagram to have a general idea.
- Then you need to compare the registers used: register names, bit names and their functionality.

In some cases you will find one that is exactly the same (very unlikely in this case).
In most cases there is one that is similar but with some diffrences.

For exaple in this case you will find that the most similar ADC is p16F88x.
But there are some differences in ADCON0 and ADCON1.
For example:
- ADCON bits moved from ADCON0 to ADCON1 and there are 3 bits instead of 2.
- Vref selection is done with ADPREF bits instead of VCFG, and there are 5 options instead of 4.

With this information I will create a new ADC variant that will also be used in future models.



Last edited by arcachofo on Sun Dec 17, 2023 1:05 pm; edited 22 times in total (Reason for editing : Added information.)

arcachofo

arcachofo

Added PIC14 Enhanced Core basic files (new instructions not yet implemented).
And p16F1826 basic implementation.

Say hello to the newborn.
Still mostly an empty shell, but it will grow:

PIC enhanced Mid-Range core and 16F1826. Born10

MSABU



I have prepared an Interrupt XML file for the 16F1826 but I am not sure if this is what is required.
I will look into peripherals now.
Here is the Interrupt file content. I have created new names for the new Interrupts, not sure if this is the right thing to do.

Unable to display the file content as HTML formatting is not accepted.



Last edited by MSABU on Sun Jan 02, 2022 10:17 pm; edited 3 times in total (Reason for editing : Missing file)

arcachofo

arcachofo

I have prepared an Interrupt XML file for the 16F1826 but I am not sure if this is what is required.
I will look into peripherals now.
Nice!

I have created new names for the new Interrupts, not sure if this is the right thing to do.
Yes, you can use any name you want.
Then the same name should be used in perifericals.
Bit names for enable and flag must be the same that in .regs file.

Unable to display the file content as HTML formatting is not accepted.
Use the "Code" tag (icon at the top besides "Quote"):

Code:
<parts>
    <interrupts enable="GIE">
        <interrupt name="RESET"                                  priority="1" vector="0x0000"/>
        <interrupt name="INT"      enable="INTE"   flag="INTF"   priority="1" vector="0x0004"/>
        <interrupt name="T0_OVF"   enable="T0IE"   flag="T0IF"   priority="1" vector="0x0004"/>
        <interrupt name="ACOMP"    enable="CMIE"   flag="CMIF"   priority="1" vector="0x0004"/>
        <interrupt name="T1_OVF"   enable="TMR1IE" flag="TMR1IF" priority="1" vector="0x0004"/>
        <interrupt name="EEPR"     enable="EEIE"   flag="EEIF"   priority="1" vector="0x0004"/>
        <interrupt name="ADC"      enable="ADIE"   flag="ADIF"   priority="1" vector="0x0004"/>
    </interrupts>
</parts>

MSABU



I had tried it already but let's do it again.
Here is for Interupts :
Code:

<parts>
    <interrupts enable="GIE">
        <interrupt name="RESET"                                  priority="1" vector="0x0000"/>
        <interrupt name="INT"      enable="INTE"  flag="INTF"  priority="1" vector="0x0004"/>
        <interrupt name="IOCI"    enable="IOCIE"  flag="IOCIF"  priority="1" vector="0x0004"/> 
        <interrupt name="T0_OVF"  enable="TMR0IE" flag="TMR0IF" priority="1" vector="0x0004"/>
        <interrupt name="T1_GTI"  enable="TMR1GIE"flag="TMRGIF" priority="1" vector="0x0004"/>
        <interrupt name="AD_CONV"  enable="ADIE"  flag="ADIF"  priority="1" vector="0x0004"/>
        <interrupt name="USART_R"  enable="RCIE"  flag="RCIF"  priority="1" vector="0x0004"/>
        <interrupt name="USART_T"  enable="TXIE"  flag="TXIF"  priority="1" vector="0x0004"/>
        <interrupt name="SSP1"    enable="SSP1IE" flag="SSP1IF" priority="1" vector="0x0004"/>
        <interrupt name="CCP1"    enable="CCP1IE" flag="CCP1IF" priority="1" vector="0x0004"/>
        <interrupt name="T2_MATCH" enable="TMR2IE" flag="TMR2IF" priority="1" vector="0x0004"/>
        <interrupt name="T1_OVF"  enable="TMR1IE" flag="TMR1IF" priority="1" vector="0x0004"/>
        <interrupt name="OSC_FAIL" enable="OSFIE"  flag="OSFIF"  priority="1" vector="0x0004"/>
        <interrupt name="COMP2"    enable="C2IE"  flag="C2IF"  priority="1" vector="0x0004"/>
        <interrupt name="COMP1"    enable="C1IE"  flag="C1IF"  priority="1" vector="0x0004"/>
        <interrupt name="EEPR"    enable="EEIE"  flag="EEIF"  priority="1" vector="0x0004"/>
        <interrupt name="BCL1"    enable="BCL1IE" flag="BCL1IF" priority="1" vector="0x0004"/>
    </interrupts>
</parts>

MSABU



I see my mistake I was pasting after the tags and not in between.
Here is for the Peripherals :
Code:

<parts>
    <port name="PORTA" pins="8" outreg="PORTA" dirreg="!TRISA"
          inpmask="11011111" opencol="00010000"
          clockpins="PORTA6,PORTA7" resetpin="PORTA5">
    </port>
   
    <port name="PORTB" pins="8" outreg="PORTB" dirreg="!TRISB" >
        <interrupt name="PB_INT" mask="11110000"/>
        <extint    name="INT" pin="PORTB0" configbits="INTEDG"/>
    </port>
   
    <timer name="TIMER0" counter="TMR0" configregsA="OPTION">
        <prescaler values="2,4,8,16,32,64,128,256"/>
        <extclock type="PIN" source="PORTA4"/>
        <interrupt name="T0_OVF" />
    </timer>
   
    <timer name="TIMER1" counter="TMR1L,TMR1H" configregsA="T1CON">
        <prescaler values="1,2,4,8"/>
        <extclock type="PIN" source="PORTB6"/>
        <interrupt name="T1_OVF" />
    </timer>
   
    <timer name="TIMER2" counter="TMR2" configregsA="T2CON" configregsB="PR2">
        <prescaler values="1,4,16,64"/>
        <interrupt name="T2_MATCH" />
    </timer> 
   
    <ccpunit name="ECCP1" type="01" pin="PORTB3" ccpreg="CCPR1L,CCPR1H" configregsA="CCP1CON">
        <interrupt name="CCP1" />
    </ccpunit>
   
    <usart name="EUSART"  number="1" configregsA="TXSTA" configregsB="RCSTA" configregsC="BAUDCON">
        <trunit type="tx" pin="PORTB2" register="TXREG">
        </trunit>
       
        <trunit type="rx" pin="PORTB1" register="RCREG">
            <interrupt name="USART_R" />
        </trunit>
        <interrupt name="USART_T" />
    </usart>
   
    <vref name="Vref" configregsA="ADCON1" pinout="PORTA2,PORTA3">
    </vref>
   
    <acomp name="COMP01" configregsA="CM1CON0" configregsB="CM1CON1" pins="PORTA0,PORTA3,PORTA2">
        <interrupt name="ACOMP" />
    </acomp>
   
    <acomp name="COMP02" configregsA="CM2CON0" configregsB="CM2CON1" pins="PORTA1,PORTA2,PORTA4">
        <interrupt name="ACOMP" />
    </acomp>
   
    <wdt name="WatchDog" configregsA="OPTION">
        <prescaler select="" values="1,2,4,8,16,32,64,128"/>
    </wdt>
</parts>

MSABU



Moving on to Registers.
There is however another feature that we will have to address that is the Alternate Pin Function, not quite PPS yet but we have to account for distinct peripheral pin assignment according to the APFCON0 and APFCON1 registers.
Do you think that your model can cover this or should we create distinct USART for instance according to the register settings ?

arcachofo

arcachofo

Here is for the Peripherals :
perifericals need to be revised, and find the right variant or find the differences with existing variants.
Have a look at first post "Perifericals:"

Moving on to Registers.
registers are already done.

There is however another feature that we will have to address that is the Alternate Pin Function, not quite PPS yet but we have to account for distinct peripheral pin assignment according to the APFCON0 and APFCON1 registers.
Do you think that your model can cover this or should we create distinct USART for instance according to the register settings ?
Not sure.. I need to have a look.

arcachofo

arcachofo

Hi.
About perifericals:
Not sure how did you create it...

By now I only have Ports in my perifericals file, and I don't remember that PORTA4 was opendrain:
opencol="00010000":
Code:
    <port name="PORTA" pins="8" outreg="PORTA" dirreg="!TRISA"
          inpmask="11011111" opencol="00010000"
          clockpins="PORTA6,PORTA7" resetpin="PORTA5">
    </port>

Some data in xml code you shared might be useful, but the data must be real,
For example, PORTB NTERRUPT-ON-CHANGE is all pins, in your data is only pin 4 to 7:
interrupt name="PB_INT" mask="11110000"

Code:
    <port name="PORTB" pins="8" outreg="PORTB" dirreg="!TRISB" >
        <interrupt name="PB_INT" mask="11110000"/>
        <extint    name="INT" pin="PORTB0" configbits="INTEDG"/>
    </port>
Same thing with the rest of the data: Pins used, prescaler values, interrupt names, etc.

About "configregs" and "configbits": it depends on the variant.
Most perifericals in this device need new variants, because they are different to any one used in devices already implemented.
New variants means that I need to implement them in C++, so while they are not implemented "configregs" and "configbits" are not defined.

You can review that the data in your perifericals file is correct, but don't worry about "configregs" and "configbits" yet.

MSABU



On peripheral I just scanned thru the data-sheet and either edited or added the missing ones. I used PIC16F687 as base.
I did not do anything with
inpmask="11011111" opencol="00010000"
and
interrupt name="PB_INT" mask="11110000"
since I did not know what these represented ?

The rest of the peripheral names are accurate to the data-sheet along with PIN, pre-scaler and Interupts Reference.
I did not verify the Watchdog though.

Agreed for "configregs" and "configbits" let's define a default PIN set for the peripherals that have options. The PIN moves could come at a later stage.

arcachofo

arcachofo

On peripheral I just scanned thru the data-sheet and either edited or added the missing ones. I used PIC16F687 as base.
I did not do anything with
inpmask="11011111" opencol="00010000"
and
interrupt name="PB_INT" mask="11110000"
since I did not know what these represented ?
Ok, nice, I just was not sure about it.
inpmask: represents Pins that are only inputs.. indeed it should be named "outmask" I think.
opencol: Pins that are open collector (indeed open drain).
mask for "PB_INT" is which pins can trigger the interrrupt.

The rest of the peripheral names are accurate to the data-sheet along with PIN, pre-scaler and Interupts Reference.
I did not verify the Watchdog though.
Nice!
That's a good start point.


let's define a default PIN set for the peripherals that have options. The PIN moves could come at a later stage.
Didn't know about this feature and I don't have much time today to have a look.
But I think it's about some perifericals that can change the pins they use (for example Usart).
Related to this:
Do you think that your model can cover this or should we create distinct USART for instance according to the register settings ?
And no, better create only one usart and implement a new "property"
Something similar to ADC: we add a list of pins, them in the C++ implementation we do whatever we need.

By now, if you want, you can "invent" a new field with the names of the pins used.
This way we already have the information available.
Then while doing the C++ implementation we will define exactly how the xml should be.

arcachofo

arcachofo

One thing I forgot:

I said that registers are done, but that's not exact.
I just didn't want you to go through all the registers and create a new list.
That is done, but there is missing information:

A complete register entry is like this:
Code:
<register name="TXSTA"   addr="0x98" reset="00000010" mask="11110101"
                  bits="TX9D,TRMT,BRGH,0,SYNC,TXEN,TX9,CSRC"/>
Note the "reset" and "mask" fields.
reset: value at reset.
mask: 1 for R/W bits, 0 for only read or disabled.

When value at reset = 0, this field is not needed
When all bits are R/W, mask field is not needed.

What I already have is like this:
Code:
<register  name="TXSTA"   addr="0x019E"  reset=""  mask=""
              bits="TX9D,TRMT,BRGH,SENDB,SYNC,TXEN,TX9,CSRC" />
Getting that information is still a job to do.

I don't know if you have access to the source code.
In case you are interested, repository is here:
https://launchpad.net/simulide

I'm working in this brach:
https://launchpad.net/simulide/1.0.0

List of last changes for 1.0.0:
https://bazaar.launchpad.net/~arcachofo/simulide/1.0.0/changes


Anyway I share what I have done with registers:
(Now is me who has problems with xml...)

Ok... you can get it here:
https://bazaar.launchpad.net/~arcachofo/simulide/1.0.0/view/head:/resources/data/PIC/p16F182x/p16F182x_regs.xml

Registers file is also a memory map, with banks and mirrored registers.
There is also a file with common registers for all enhanced core devices:
https://bazaar.launchpad.net/~arcachofo/simulide/1.0.0/view/head:/resources/data/PIC/pic/pic14e_regs.xml

MSABU



I had seen the memory/bank file but kept it for the end to first verify if the right approach was indeed to edit the XMLs.
Will look into this tomorrow.

arcachofo likes this post

arcachofo

arcachofo

First blinking led:

PIC enhanced Mid-Range core and 16F1826. 182610

MSABU



Yes, congrats.

arcachofo

arcachofo

I had a look at APFCON registers...

I'm thinking about how to implement this functionality and I can't see a simple way:
- The most efficient way would be calling a function every time the register is written, and do everything there.
But this function should know about all the perifericals involved, which is not straight fordward.

- Much easier is calling a function in the periferical itself every time a relevant bit changes.
But this aproach would call all the perifericals every time the register is modified, making it much slower and unefficient.
And the parser get more complex.

In the xml files every periferical need to define the pins and bits related to this, for example:
Code:
    <usart name="EUSART"  number="1" configregsA="TXSTA" configregsB="RCSTA" configregsC="BAUDCON">
        <trunit type="tx" pins="PORTB1,PORTB2" configbits="RXDTSEL" register="TXREG">
        </trunit>
      
        <trunit type="rx" pins="PORTB2,PORTB5" configbits="TXCKSEL" register="RCREG">
            <interrupt name="USART_R" />
        </trunit>
        <interrupt name="USART_T" />
    </usart>


... Writting this i see that the only viable aproach is the second one.
xml files won't get much more complicated, just changing: pin="PORTB2" by pins="PORTB1,PORTB2" configbits="RXDTSEL".

And I can add a generic function to McuModule (the base class for all modules) and a generic function in the parser as well.

Complications comes with SPI, that has several pins.. but let's solve that later...

But I have some questions:
In your knowledge of these devices, what do you know about:
- What happens if there are more than 1 usart (or any other periferical)?
- Is always one bit to choose betwen 2 pins?

Any ideas or suggestions are also welcome.

MSABU



I was thinking along your way (2nd option) to add the various options into the peripheral XML.
I have added the Peripheral Pin selection config registers.
Code:

    <usart name="EUSART"  number="1" configregsA="TXSTA" configregsB="RCSTA" configregsC="BAUDCON" configregsD="RXDTSEL" configregsE="TXCKSEL">
        <trunit type="tx" pin="PORTB2,PORTB5" register="TXREG">
        </trunit>
        
        <trunit type="rx" pin="PORTB1,PORTB2" register="RCREG">
            <interrupt name="USART_R" />
        </trunit>
        <interrupt name="USART_T" />
    </usart>

So far I have only seen one bit selecting between 2 pins. This applies however to both Rx and TX so 4 combinations.
Regarding more than one USART I do not have much experience but I have looked into the 16F15324. Beeing part  of the newest 8 bits PIC however they have introduced the PPS concept where the peripheral can be remapped to any PIN of any port, another level of complications.
I think that we should stay with one USART at this stage.
Will post shortly my register XML.

One more question I keep forgetting to ask is does your model handles the internal individual pull-ups ?

MSABU



Here is what I have prepared for the Register File.
I am only showing Bank 1 for validation purposes but since there are a lot of registers (7 to 8 Banks) and this is very time consuming I want to double check that this is what to do.
Code:

<parts>
    <!-- BANK 0 -->
    <regblock name="SFR0" start="0x000" end="0x01F" >
        <register name="PORTA"  addr="0x00C" bits="RA0,RA1,RA2,RA3,RA4,RA5,RA6,RA7"/>
        <register name="PORTB"  addr="0x00D" bits="RB0,RB1,RB2,RB3,RB4,RB5,RB6,RB7"/>
        <register name="PIR1"    addr="0x011" bits="TMR1IF,TMR2IF,CCP1IF,SSP1IF,TXIF,RCIF,ADIF,TMR1GIF"/>
        <register name="PIR2"    addr="0x012" bits="0,0,0,BCL1IF,EEIF,C1IF,C2IF,OSFIF"/>
        <register name="TMR0"    addr="0x015" bits=""/>
        <register name="TMR1L"  addr="0x016" bits=""/>
        <register name="TMR1H"  addr="0x017" bits=""/>
        <register name="T1CON"  addr="0x018" bits="TMR1ON,0,NOT_T1SYNC,T1OSCEN,T1CKPS,T1CKPS1,TMR1CS0,TMR1CS1"/>
        <register name="T1GCON"  addr="0x019" bits="T1GSS0,T1GSS1,T1GVAL,T1GGO_NOT_DONE,T1GSPM,T1GTM,T1GPOL,TMR1GE"/>
        <register name="T2CON"  addr="0x01C" bits="T2CKPS0,T2CKPS1,TMR2ON,T2OUTPS0,T2OUTPS1,T2OUTPS2,T2OUTPS3,0"/>
        <register name="CPSCON0" addr="0x01C" bits="T0XCS,CPSOUT,CPSRNG0,CPSRNG1,0,0,0,CPSON"/>
        <register name="CPSCON1" addr="0x01C" bits="CPSCH0,CPSCH1,CPSCH2,CPSCH3,0,0,0,0"/>

arcachofo

arcachofo

I have added the Peripheral Pin selection config registers.
Code:
<usart name="EUSART"  number="1" configregsA="TXSTA" configregsB="RCSTA" configregsC="BAUDCON" configregsD="RXDTSEL" configregsE="TXCKSEL">
        <trunit type="tx" pin="PORTB2,PORTB5" register="TXREG">
        </trunit>
        
        <trunit type="rx" pin="PORTB1,PORTB2" register="RCREG">
            <interrupt name="USART_R" />
        </trunit>
        <interrupt name="USART_T" />
    </usart>
Yes, this is more o less the idea I had.

A few things here about how this is currently implemented:
For registers we should use "configregs" and for bits "configbits"
By now only configregA to C are used, I could add more if necesary, but I don't want to bloat it.

In this case the usart module has 2 "submodules" one for Tx, one for Rx, so it's better to use these directly and add the "configbits"  there:
Code:
    <usart name="EUSART"  number="1" configregsA="TXSTA" configregsB="RCSTA" configregsC="BAUDCON">
        <trunit type="tx" pins="PORTB1,PORTB2" configbits="RXDTSEL" register="TXREG">
        </trunit>
      
        <trunit type="rx" pins="PORTB2,PORTB5" configbits="TXCKSEL" register="RCREG">
            <interrupt name="USART_R" />
        </trunit>
        <interrupt name="USART_T" />
    </usart>

I have looked into the 16F15324. Beeing part  of the newest 8 bits PIC however they have introduced the PPS concept where the peripheral can be remapped to any PIN of any port, another level of complications.
But this one has the same instruction set or is yet another core?
By now we should focus on 16F1xxx family, but is good to think ahead...

One more question I keep forgetting to ask is does your model handles the internal individual pull-ups ?
There is support for individual pull-ups, not for configuration from register, but it can be handled with "configregs".
So you can just add a "configregsA" with the register for pullups.

Here is what I have prepared for the Register File.
I am only showing Bank 1 for validation purposes but since there are a lot of registers (7 to 8 Banks) and this is very time consuming I want to double check that this is what to do.
Sorry, that's exactly what I wanted to avoid...

Here I had no time to get into this topic:
arcachofo wrote:
Moving on to Registers.
registers are already done.

And here I tried to explain:
arcachofo wrote:I said that registers are done, but that's not exact.
I just didn't want you to go through all the registers and create a new list.
That is done, but there is missing information:
....
....
....
Ok... you can get it here:
https://bazaar.launchpad.net/~arcachofo/simulide/1.0.0/view/head:/resources/data/PIC/p16F182x/p16F182x_regs.xml

The register list is already done, the missing part is reset values and mask.
Read this post: https://simulide.forumotion.com/t405-pic-enhanced-mid-range-core-and-16f1826#2048

And have a look at this:
https://bazaar.launchpad.net/~arcachofo/simulide/1.0.0/view/head:/resources/data/PIC/p16F182x/p16F182x_regs.xml
That is the complete list of registers and memory map with all 8 banks and mirrored registers.

Sorry for my bad explanations.

MSABU



Thks for explanation I see my confusion between configreg and configbit.
Impressive what you have done with the registers. Will look into the reset values and mask then.
and pull-up registers.
Regarding 16F15324 that is a new animal with distinct instruction set indeed so let's forget it for the time being. Was just the example I found with 2 USARTS.

MSABU



What I had missed is how launchpad works. I am able to follow the revision architecture now so will use this as a reference and update from there.
Thks again.

arcachofo

arcachofo

Impressive what you have done with the registers.
I have this part semi-automated, so I only have to divide in banks, mirrored sections of RAM, etc.

Indeed what is impressive is that you came with interrupts and perifericals files out of the nothing.
Without receiving any guidance or explanations.

MSABU



I have updated your p16F182x_regs.xml (791) file with the reset register values.
However I do not know what needs to go in masks and I did not know what to write for the undefined Reset value per thereunder :
x = unknown, u = unchanged, q = value depends on condition, - = unimplemented
Here is the file content :
Code:

<parts>
<!-- BANK 0 -->
  <regblock name="SFR0" start="0x0000" end="0x001F" >
    <register  name="PORTA"  addr="0x00C"  reset="xxxxxxxx" mask="" bits="RA0,RA1,RA2,RA3,RA4,RA5,RA6,RA7" />
    <register  name="PORTB"  addr="0x00D"  reset="xxxxxxxx" mask="" bits="RB0,RB1,RB2,RB3,RB4,RB5,RB6,RB7" />
    <register  name="PIR1"    addr="0x011"  reset="00000000" mask="" bits="TMR1IF,TMR2IF,CCP1IF,SSP1IF,TXIF,RCIF,ADIF,TMR1GIF" />
    <register  name="PIR2"    addr="0x012"  reset="00000--0" mask="" bits="0,0,0,BCL1IF,EEIF,C1IF,C2IF,OSFIF" />
    <register  name="TMR0"    addr="0x015"  reset="xxxxxxxx" mask="" bits="" />
    <register  name="TMR1L"  addr="0x016"  reset="xxxxxxxx" mask="" bits="" />
    <register  name="TMR1H"  addr="0x017"  reset="xxxxxxxx" mask="" bits="" />
    <register  name="T1CON"  addr="0x018"  reset="000000-0" mask="" bits="TMR1ON,0,T1SYNC,T1OSCEN,T1CKPS0,T1CKPS1,TMR1CS0,TMR1CS1" />
    <register  name="T1GCON"  addr="0x019"  reset="00000x00" mask="" bits="T1GSS0,T1GSS1,T1GVAL,T1GGO,T1GSPM,T1GTM,T1GPOL,TMR1GE" />
    <register  name="TMR2"    addr="0x01A"  reset="00000000" mask="" bits="" />
    <register  name="PR2"    addr="0x01B"  reset="11111111" mask="" bits="" />
    <register  name="T2CON"  addr="0x01C"  reset="-0000000" mask="" bits="T2CKPS0,T2CKPS1,TMR2ON,T2OUTPS0,T2OUTPS1,T2OUTPS2,T2OUTPS3,0" />
    <register  name="CPSCON0" addr="0x01E"  reset="0---0000" mask="" bits="T0XCS,CPSOUT,CPSRNG0,CPSRNG1,0,0,0,CPSON" />
    <register  name="CPSCON1" addr="0x01F"  reset="----0000" mask="" bits="CPSCH0,CPSCH1,CPSCH2,CPSCH3,0,0,0,0" />
  </regblock>
  <datablock name="GPR0" start="0x0020" end="0x006F"/>
  <datablock name="RAM0" start="0x0070" end="0x007F"/>
   
<!-- BANK 1 -->
  <regblock name="SFR1" start="0x0080" end="0x009F">
    <mapped                  addr="0x0080" mapto="0x00"/><!-- INDF0 -->
    <mapped                    <regblock name="SFR1" start="0x0080" end="0x009F">
        <mapped                  addr="0x80" mapto="0x00"/><!-- INDF -->     
        <mapped                  addr="0x82" mapto="0x02"/><!-- PCL -->
        <mapped                  addr="0x83" mapto="0x03"/><!-- STATUS -->
        <mapped                  addr="0x84" mapto="0x04"/><!-- FSR -->
        <mapped                  addr="0x8A" mapto="0x0A"/><!-- PCLATH -->
        <mapped                  addr="0x8B" mapto="0x0B"/><!-- INTCON -->
     
        <register name="PR2"    addr="0x92" reset="11111111" bits="" />
        <register name="TXSTA"  addr="0x98" reset="00000010" mask="11110101" bits="TX9D,TRMT,BRGH,0,SYNC,TXEN,TX9,CSRC"/>           
        <register name="SPBRG"  addr="0x99" bits=""/>
        <register name="EEDATA" addr="0x9A" bits=""/>
        <register name="EEADR"  addr="0x9B" bits=""/>
        <register name="EECON1" addr="0x9C" bits="RD,WR,WREN,WRERR"/>
        <register name="EECON2" addr="0x9D" bits=""/>
        <register name="VRCON"  addr="0x9F" mask="11101111" bits="VR0,VR1,VR2,VR3,0,VRR,VROE,VREN"/>
    </regblock>
    <datablock name="GPR1" start="0x00A0" end="0x00EF"/>
    <datablock name="RAM1" start="0x00F0" end="0x00FF" mapto="0x0070"/>  addr="0x0081" mapto="0x01"/><!-- INDF1 -->
    <mapped                  addr="0x0082" mapto="0x02"/><!-- PCL -->
    <mapped                  addr="0x0083" mapto="0x03"/><!-- STATUS -->
    <mapped                  addr="0x0084" mapto="0x04"/><!-- FSR0L -->
    <mapped                  addr="0x0085" mapto="0x05"/><!-- FSR0H -->
    <mapped                  addr="0x0086" mapto="0x06"/><!-- FSR1L -->
    <mapped                  addr="0x0087" mapto="0x07"/><!-- FSR1H -->
    <mapped                  addr="0x0088" mapto="0x08"/><!-- BSR -->
    <mapped                  addr="0x0089" mapto="0x09"/><!-- WREG -->
    <mapped                  addr="0x008A" mapto="0x0A"/><!-- PCLATH -->
    <mapped                  addr="0x008B" mapto="0x0B"/><!-- INTCON -->
   
    <register  name="TRISA"  addr="0x008C"  reset="11111111"  mask="" bits="TRISA0,TRISA1,TRISA2,TRISA3,TRISA4,TRISA5,TRISA6,TRISA7" />
    <register  name="TRISB"  addr="0x008D"  reset="11111111"  mask="" bits="TRISB0,TRISB1,TRISB2,TRISB3,TRISB4,TRISB5,TRISB6,TRISB7" />
    <register  name="PIE1"    addr="0x0091"  reset="00000000"  mask="" bits="TMR1IE,TMR2IE,CCP1IE,SSP1IE,TXIE,RCIE,ADIE,TMR1GIE" />
    <register  name="PIE2"    addr="0x0092"  reset="00000--0"  mask="" bits="0,0,0,BCL1IE,EEIE,C1IE,C2IE,OSFIE" />
    <register  name="OPTION_REG" addr="0x0095" reset="11111111" mask="" bits="PS0,PS1,PS2,PSA,T0SE,T0CS,INTEDG,WPUEN" />
    <register  name="PCON"    addr="0x0096"  reset="00--11qq"  mask="" bits="NOT_BOR,NOT_POR,NOT_RI,NOT_RMCLR,0,0,STKUNF,STKOVF" />
    <register  name="WDTCON"  addr="0x0097"  reset="--010110"  mask="" bits="SWDTEN,WDTPS0,WDTPS1,WDTPS2,WDTPS3,WDTPS4,0,0" />
    <register  name="OSCTUNE" addr="0x0098"  reset="--000000"  mask="" bits="TUN0,TUN1,TUN2,TUN3,TUN4,TUN5,0,0" />
    <register  name="OSCCON"  addr="0x0099"  reset="00111-00"  mask="" bits="SCS0,SCS1,0,IRCF0,IRCF1,IRCF2,IRCF3,SPLLEN" />
    <register  name="OSCSTAT" addr="0x009A"  reset="10q00q00"  mask="" bits="HFIOFS,LFIOFR,MFIOFR,HFIOFL,HFIOFR,OSTS,PLLR,T1OSCR" />
    <register  name="ADRESL"  addr="0x009B"  reset="xxxxxxxx"  mask="" bits="" />
    <register  name="ADRESH"  addr="0x009C"  reset="xxxxxxxx"  mask="" bits="" />
    <register  name="ADCON0"  addr="0x009D"  reset="-0000000"  mask="" bits="ADON,GO,CHS0,CHS1,CHS2,CHS3,CHS4,0" />
    <register  name="ADCON1"  addr="0x009E"  reset="0000-000"  mask="" bits="ADPREF0,ADPREF1,ADNREF,0,ADCS0,ADCS1,ADCS2,ADFM" />
  </regblock>
  <datablock name="GPR1" start="0x00A0" end="0x00EF"/>
  <datablock name="RAM1" start="0x00F0" end="0x00FF" mapto="0x0070"/>
   
<!-- BANK 2 -->
  <regblock name="SFR2" start="0x0100" end="0x011F">
    <mapped                  addr="0x0080" mapto="0x00"/><!-- INDF0 -->
    <mapped                  addr="0x0081" mapto="0x01"/><!-- INDF1 -->
    <mapped                  addr="0x0082" mapto="0x02"/><!-- PCL -->
    <mapped                  addr="0x0083" mapto="0x03"/><!-- STATUS -->
    <mapped                  addr="0x0084" mapto="0x04"/><!-- FSR0L -->
    <mapped                  addr="0x0085" mapto="0x05"/><!-- FSR0H -->
    <mapped                  addr="0x0086" mapto="0x06"/><!-- FSR1L -->
    <mapped                  addr="0x0087" mapto="0x07"/><!-- FSR1H -->
    <mapped                  addr="0x0088" mapto="0x08"/><!-- BSR -->
    <mapped                  addr="0x0089" mapto="0x09"/><!-- WREG -->
    <mapped                  addr="0x008A" mapto="0x0A"/><!-- PCLATH -->
    <mapped                  addr="0x008B" mapto="0x0B"/><!-- INTCON -->
   
    <register  name="LATA"    addr="0x010C"  reset="xx-xxxxx"  mask="" bits="LATA0,LATA1,LATA2,LATA3,LATA4,0,LATA6,LATA7" />
    <register  name="LATB"    addr="0x010D"  reset="xxxxxxxx"  mask="" bits="LATB0,LATB1,LATB2,LATB3,LATB4,LATB5,LATB6,LATB7" />
    <register  name="CM1CON0" addr="0x0111"  reset="0000-100"  mask="" bits="C1SYNC,C1HYS,C1SP,0,C1POL,C1OE,C1OUT,C1ON" />
    <register  name="CM1CON1" addr="0x0112"  reset="0000--00"  mask="" bits="C1NCH0,C1NCH1,0,0,C1PCH0,C1PCH1,C1INTN,C1INTP" />
    <register  name="CM2CON0" addr="0x0113"  reset="0000-100"  mask="" bits="C2SYNC,C2HYS,C2SP,0,C2POL,C2OE,C2OUT,C2ON" />
    <register  name="CM2CON1" addr="0x0114"  reset="0000--00"  mask="" bits="C2NCH0,C2NCH1,0,0,C2PCH0,C2PCH1,C2INTN,C2INTP" />
    <register  name="CMOUT"  addr="0x0115"  reset="------00"  mask="" bits="MC1OUT,MC2OUT,0,0,0,0,0,0" />
    <register  name="BORCON"  addr="0x0116"  reset="1------q"  mask="" bits="BORRDY,0,0,0,0,0,0,SBOREN" />
    <register  name="FVRCON"  addr="0x0117"  reset="0qrr0000"  mask="" bits="ADFVR0,ADFVR1,CDAFVR0,CDAFVR1,TSRNG,TSEN,FVRRDY,FVREN" />
    <register  name="DACCON0" addr="0x0118"  reset="000-00-0"  mask="" bits="DACNSS,0,DACPSS0,DACPSS1,0,DACOE,DACLPS,DACEN" />
    <register  name="DACCON1" addr="0x0119"  reset="---00000"  mask="" bits="DACR0,DACR1,DACR2,DACR3,DACR4,0,0,0" />
    <register  name="SRCON0"  addr="0x011A"  reset="00000000"  mask="" bits="SRPR,SRPS,SRNQEN,SRQEN,SRCLK0,SRCLK1,SRCLK2,SRLEN" />
    <register  name="SRCON1"  addr="0x011B"  reset="00000000"  mask="" bits="SRRC1E,SRRC2E,SRRCKE,SRRPE,SRSC1E,SRSC2E,SRSCKE,SRSPE" />
    <register  name="APFCON0" addr="0x011D"  reset="00000000"  mask="" bits="CCP1SEL,P1CSEL,P1DSEL,0,0,SS1SEL,SDO1SEL,RXDTSEL" />
    <register  name="APFCON1" addr="0x011E"  reset="-------0"  mask="" bits="TXCKSEL,0,0,0,0,0,0,0" />
  </regblock>
  <datablock name="GPR2" start="0x0120" end="0x016F"/>
  <datablock name="RAM2" start="0x0170" end="0x017F" mapto="0x0070"/>
   
<!-- BANK 3 -->
  <regblock name="SFR3" start="0x0180" end="0x019F">
    <mapped                  addr="0x0080" mapto="0x00"/><!-- INDF0 -->
    <mapped                  addr="0x0081" mapto="0x01"/><!-- INDF1 -->
    <mapped                  addr="0x0082" mapto="0x02"/><!-- PCL -->
    <mapped                  addr="0x0083" mapto="0x03"/><!-- STATUS -->
    <mapped                  addr="0x0084" mapto="0x04"/><!-- FSR0L -->
    <mapped                  addr="0x0085" mapto="0x05"/><!-- FSR0H -->
    <mapped                  addr="0x0086" mapto="0x06"/><!-- FSR1L -->
    <mapped                  addr="0x0087" mapto="0x07"/><!-- FSR1H -->
    <mapped                  addr="0x0088" mapto="0x08"/><!-- BSR -->
    <mapped                  addr="0x0089" mapto="0x09"/><!-- WREG -->
    <mapped                  addr="0x008A" mapto="0x0A"/><!-- PCLATH -->
    <mapped                  addr="0x008B" mapto="0x0B"/><!-- INTCON -->

    <register  name="ANSELA"  addr="0x018C"  reset="---11111"  mask="" bits="ANSA0,ANSA1,ANSA2,ANSA3,ANSA4,0,0,0" />
    <register  name="ANSELB"  addr="0x018D"  reset="1111111-"  mask="" bits="0,ANSB1,ANSB2,ANSB3,ANSB4,ANSB5,ANSB6,ANSB7" />
    <register  name="EEADRL"  addr="0x0191"  reset="00000000"  mask="" bits="" />
    <register  name="EEADRH"  addr="0x0192"  reset="-0000000"  mask="" bits="" />
    <register  name="EEDATL"  addr="0x0193"  reset="xxxxxxxx"  mask="" bits="" />
    <register  name="EEDATH"  addr="0x0194"  reset="--xxxxxx"  mask="" bits="" />
    <register  name="EECON1"  addr="0x0195"  reset="0000x000"  mask="" bits="RD,WR,WREN,WRERR,FREE,LWLO,CFGS,EEPGD" />
    <register  name="EECON2"  addr="0x0196"  reset="00000000"  mask="" bits="" />
    <register  name="RCREG"  addr="0x0199"  reset="00000000"  mask="" bits="" />
    <register  name="TXREG"  addr="0x019A"  reset="00000000"  mask="" bits="" />
    <register  name="SPBRGL"  addr="0x019B"  reset="00000000"  mask="" bits="" />
    <register  name="SPBRGH"  addr="0x019C"  reset="00000000"  mask="" bits="" />
    <register  name="RCSTA"  addr="0x019D"  reset="0000000x"  mask="" bits="RX9D,OERR,FERR,ADDEN,CREN,SREN,RX9,SPEN" />
    <register  name="TXSTA"  addr="0x019E"  reset="00000010"  mask="" bits="TX9D,TRMT,BRGH,SENDB,SYNC,TXEN,TX9,CSRC" />
    <register  name="BAUDCON" addr="0x019F"  reset="01-00-00"  mask="" bits="ABDEN,WUE,0,BRG16,SCKP,0,RCIDL,ABDOVF" />
  </regblock>
  <datablock name="GPR3" start="0x01A0" end="0x01EF"/>
  <datablock name="RAM3" start="0x01F0" end="0x01FF" mapto="0x0070"/>
 
<!-- BANK 4 -->
  <regblock name="SFR4" start="0x0200" end="0x021F">
    <mapped                  addr="0x0080" mapto="0x00"/><!-- INDF0 -->
    <mapped                  addr="0x0081" mapto="0x01"/><!-- INDF1 -->
    <mapped                  addr="0x0082" mapto="0x02"/><!-- PCL -->
    <mapped                  addr="0x0083" mapto="0x03"/><!-- STATUS -->
    <mapped                  addr="0x0084" mapto="0x04"/><!-- FSR0L -->
    <mapped                  addr="0x0085" mapto="0x05"/><!-- FSR0H -->
    <mapped                  addr="0x0086" mapto="0x06"/><!-- FSR1L -->
    <mapped                  addr="0x0087" mapto="0x07"/><!-- FSR1H -->
    <mapped                  addr="0x0088" mapto="0x08"/><!-- BSR -->
    <mapped                  addr="0x0089" mapto="0x09"/><!-- WREG -->
    <mapped                  addr="0x008A" mapto="0x0A"/><!-- PCLATH -->
    <mapped                  addr="0x008B" mapto="0x0B"/><!-- INTCON -->

    <register  name="WPUA"    addr="0x020C"  reset="--1-----"  mask="" bits="0,0,0,0,0,WPUA5,0,0" />
    <register  name="WPUB"    addr="0x020D"  reset="11111111"  mask="" bits="WPUB0,WPUB1,WPUB2,WPUB3,WPUB4,WPUB5,WPUB6,WPUB7" />
    <register  name="SSP1BUF"  addr="0x0211"  reset="xxxxxxxx"  mask="" bits="" />
    <register  name="SSP1ADD"  addr="0x0212"  reset="00000000"  mask="" bits="" />
    <register  name="SSP1MSK"  addr="0x0213"  reset="11111111"  mask="" bits="" />
    <register  name="SSP1STAT" addr="0x0214"  reset="00000000"  mask="" bits="BF,UA,R_W,S,P,D_A,CKE,SMP" />
    <register  name="SSP1CON1" addr="0x0215"  reset="00000000"  mask="" bits="SSPM0,SSPM1,SSPM2,SSPM3,CKP,SSPEN,SSPOV,WCOL" />
    <register  name="SSP1CON2" addr="0x0216"  reset="00000000"  mask="" bits="SEN,RSEN,PEN,RCEN,ACKEN,ACKDT,ACKSTAT,GCEN" />
    <register  name="SSP1CON3" addr="0x0217"  reset="00000000"  mask="" bits="DHEN,AHEN,SBCDE,SDAHT,BOEN,SCIE,PCIE,ACKTIM" />
  </regblock>
  <datablock name="GPR4" start="0x0220" end="0x0250"/>
  <datablock name="RAM4" start="0x0270" end="0x027F" mapto="0x0070"/>
   
<!-- BANK 5 -->
  <regblock name="SFR5" start="0x0280" end="0x029F">
    <mapped                  addr="0x0080" mapto="0x00"/><!-- INDF0 -->
    <mapped                  addr="0x0081" mapto="0x01"/><!-- INDF1 -->
    <mapped                  addr="0x0082" mapto="0x02"/><!-- PCL -->
    <mapped                  addr="0x0083" mapto="0x03"/><!-- STATUS -->
    <mapped                  addr="0x0084" mapto="0x04"/><!-- FSR0L -->
    <mapped                  addr="0x0085" mapto="0x05"/><!-- FSR0H -->
    <mapped                  addr="0x0086" mapto="0x06"/><!-- FSR1L -->
    <mapped                  addr="0x0087" mapto="0x07"/><!-- FSR1H -->
    <mapped                  addr="0x0088" mapto="0x08"/><!-- BSR -->
    <mapped                  addr="0x0089" mapto="0x09"/><!-- WREG -->
    <mapped                  addr="0x008A" mapto="0x0A"/><!-- PCLATH -->
    <mapped                  addr="0x008B" mapto="0x0B"/><!-- INTCON -->
   
    <register  name="CCPR1L"  addr="0x0291" reset="xxxxxxxx"  mask="" bits="" />
    <register  name="CCPR1H"  addr="0x0292" reset="xxxxxxxx"  mask="" bits="" />
    <register  name="CCP1CON" addr="0x0293" reset="00000000"  mask="" bits="CCP1M0,CCP1M1,CCP1M2,CCP1M3,DC1B0,DC1B1,P1M0,P1M1" />
    <register  name="PWM1CON" addr="0x0294" reset="00000000"  mask="" bits="P1DC0,P1DC1,P1DC2,P1DC3,P1DC4,P1DC5,P1DC6,P1RSEN" />
    <register  name="CCP1AS"  addr="0x0295" reset="00000000"  mask="" bits="PSS1BD0,PSS1BD1,PSS1AC0,PSS1AC1,CCP1AS0,CCP1AS1,CCP1AS2,CCP1ASE" />       
    <register  name="PSTR1CON" addr="0x0296" reset="---00001"  mask="" bits="STR1A,STR1B,STR1C,STR1D,STR1SYNC,0,0,0" />
  </regblock>
  <datablock name="RAM5" start="0x02F0" end="0x02FF"  mapto="0x0070"/>
   
<!-- BANK 6 -->
  <regblock name="SFR6" start="0x0300" end="0x031F">
    <mapped                  addr="0x0080" mapto="0x00"/><!-- INDF0 -->
    <mapped                  addr="0x0081" mapto="0x01"/><!-- INDF1 -->
    <mapped                  addr="0x0082" mapto="0x02"/><!-- PCL -->
    <mapped                  addr="0x0083" mapto="0x03"/><!-- STATUS -->
    <mapped                  addr="0x0084" mapto="0x04"/><!-- FSR0L -->
    <mapped                  addr="0x0085" mapto="0x05"/><!-- FSR0H -->
    <mapped                  addr="0x0086" mapto="0x06"/><!-- FSR1L -->
    <mapped                  addr="0x0087" mapto="0x07"/><!-- FSR1H -->
    <mapped                  addr="0x0088" mapto="0x08"/><!-- BSR -->
    <mapped                  addr="0x0089" mapto="0x09"/><!-- WREG -->
    <mapped                  addr="0x008A" mapto="0x0A"/><!-- PCLATH -->
    <mapped                  addr="0x008B" mapto="0x0B"/><!-- INTCON -->
  </regblock>
  <datablock name="RAM6" start="0x0370" end="0x037F"  mapto="0x0070"/>
 
<!-- BANK 7 -->
  <regblock name="SFR7" start="0x0380" end="0x039F">
    <mapped                  addr="0x0080" mapto="0x00"/><!-- INDF0 -->
    <mapped                  addr="0x0081" mapto="0x01"/><!-- INDF1 -->
    <mapped                  addr="0x0082" mapto="0x02"/><!-- PCL -->
    <mapped                  addr="0x0083" mapto="0x03"/><!-- STATUS -->
    <mapped                  addr="0x0084" mapto="0x04"/><!-- FSR0L -->
    <mapped                  addr="0x0085" mapto="0x05"/><!-- FSR0H -->
    <mapped                  addr="0x0086" mapto="0x06"/><!-- FSR1L -->
    <mapped                  addr="0x0087" mapto="0x07"/><!-- FSR1H -->
    <mapped                  addr="0x0088" mapto="0x08"/><!-- BSR -->
    <mapped                  addr="0x0089" mapto="0x09"/><!-- WREG -->
    <mapped                  addr="0x008A" mapto="0x0A"/><!-- PCLATH -->
    <mapped                  addr="0x008B" mapto="0x0B"/><!-- INTCON -->
   
    <register  name="IOCBP"  addr="0x0394"  reset="00000000"  mask="" bits="IOCBP0,IOCBP1,IOCBP2,IOCBP3,IOCBP4,IOCBP5,IOCBP6,IOCBP7" />
    <register  name="IOCBN"  addr="0x0395"  reset="00000000"  mask="" bits="IOCBN0,IOCBN1,IOCBN2,IOCBN3,IOCBN4,IOCBN5,IOCBN6,IOCBN7" />
    <register  name="IOCBF"  addr="0x0396"  reset="00000000"  mask="" bits="IOCBF0,IOCBF1,IOCBF2,IOCBF3,IOCBF4,IOCBF5,IOCBF6,IOCBF7" />
    <register  name="CLKRCON" addr="0x039A"  reset="00110000"  mask="" bits="CLKRDIV0,CLKRDIV1,CLKRDIV2,CLKRDC0,CLKRDC1,CLKRSLR,CLKROE,CLKREN" />
    <register  name="MDCON"  addr="0x039C"  reset="0010---0"  mask="" bits="MDBIT,0,0,MDOUT,MDOPOL,MDSLR,MDOE,MDEN" />
    <register  name="MDSRC"  addr="0x039D"  reset="x---xxxx"  mask="" bits="MDMS0,MDMS1,MDMS2,MDMS3,0,0,0,MDMSODIS" />
    <register  name="MDCARL"  addr="0x039E"  reset="xxx-xxxx"  mask="" bits="MDCL0,MDCL1,MDCL2,MDCL3,0,MDCLSYNC,MDCLPOL,MDCLODIS" />
    <register  name="MDCARH"  addr="0x039F"  reset="xxx-xxxx"  mask="" bits="MDCH0,MDCH1,MDCH2,MDCH3,0,MDCHSYNC,MDCHPOL,MDCHODIS" />
  </regblock>
  <datablock name="RAM7" start="0x03F0" end="0x03FF"  mapto="0x0070"/>
</parts>

MSABU



Sorry I missed your earlier explanations :

Arcachofo wrote:
reset: value at reset.
mask: 1 for R/W bits, 0 for only read or disabled.

When value at reset = 0, this field is not needed
When all bits are R/W, mask field is not needed.

Will edit register file accordingly.

MSABU



Here is the register file with most of the mask values updated.
Code:

<parts>
<!-- BANK 0 -->
  <regblock name="SFR0" start="0x0000" end="0x001F" >
    <register  name="PORTA"  addr="0x00C"  reset="xxxxxxxx" mask="11011111" bits="RA0,RA1,RA2,RA3,RA4,RA5,RA6,RA7" />
    <register  name="PORTB"  addr="0x00D"  reset="xxxxxxxx" mask="11111111" bits="RB0,RB1,RB2,RB3,RB4,RB5,RB6,RB7" />
    <register  name="PIR1"    addr="0x011"  reset="" mask="11001111" bits="TMR1IF,TMR2IF,CCP1IF,SSP1IF,TXIF,RCIF,ADIF,TMR1GIF" />
    <register  name="PIR2"    addr="0x012"  reset="00000--0" mask="11111000" bits="0,0,0,BCL1IF,EEIF,C1IF,C2IF,OSFIF" />
    <register  name="TMR0"    addr="0x015"  reset="xxxxxxxx" mask="" bits="" />
    <register  name="TMR1L"  addr="0x016"  reset="xxxxxxxx" mask="" bits="" />
    <register  name="TMR1H"  addr="0x017"  reset="xxxxxxxx" mask="" bits="" />
    <register  name="T1CON"  addr="0x018"  reset="000000-0" mask="" bits="TMR1ON,0,T1SYNC,T1OSCEN,T1CKPS0,T1CKPS1,TMR1CS0,TMR1CS1" />
    <register  name="T1GCON"  addr="0x019"  reset="00000x00" mask="" bits="T1GSS0,T1GSS1,T1GVAL,T1GGO,T1GSPM,T1GTM,T1GPOL,TMR1GE" />
    <register  name="TMR2"    addr="0x01A"  reset="" mask="" bits="" />
    <register  name="PR2"    addr="0x01B"  reset="11111111" mask="" bits="" />
    <register  name="T2CON"  addr="0x01C"  reset="-0000000" mask="" bits="T2CKPS0,T2CKPS1,TMR2ON,T2OUTPS0,T2OUTPS1,T2OUTPS2,T2OUTPS3,0" />
    <register  name="CPSCON0" addr="0x01E"  reset="0---0000" mask="" bits="T0XCS,CPSOUT,CPSRNG0,CPSRNG1,0,0,0,CPSON" />
    <register  name="CPSCON1" addr="0x01F"  reset="----0000" mask="" bits="CPSCH0,CPSCH1,CPSCH2,CPSCH3,0,0,0,0" />
  </regblock>
  <datablock name="GPR0" start="0x0020" end="0x006F"/>
  <datablock name="RAM0" start="0x0070" end="0x007F"/>
   
<!-- BANK 1 -->
  <regblock name="SFR1" start="0x0080" end="0x009F">
    <mapped                  addr="0x0080" mapto="0x00"/><!-- INDF0 -->
    <mapped                    <regblock name="SFR1" start="0x0080" end="0x009F">
        <mapped                  addr="0x80" mapto="0x00"/><!-- INDF -->     
        <mapped                  addr="0x82" mapto="0x02"/><!-- PCL -->
        <mapped                  addr="0x83" mapto="0x03"/><!-- STATUS -->
        <mapped                  addr="0x84" mapto="0x04"/><!-- FSR -->
        <mapped                  addr="0x8A" mapto="0x0A"/><!-- PCLATH -->
        <mapped                  addr="0x8B" mapto="0x0B"/><!-- INTCON -->   

    </regblock>
    <datablock name="GPR1" start="0x00A0" end="0x00EF"/>
    <datablock name="RAM1" start="0x00F0" end="0x00FF" mapto="0x0070"/>  addr="0x0081" mapto="0x01"/><!-- INDF1 -->
    <mapped                  addr="0x0082" mapto="0x02"/><!-- PCL -->
    <mapped                  addr="0x0083" mapto="0x03"/><!-- STATUS -->
    <mapped                  addr="0x0084" mapto="0x04"/><!-- FSR0L -->
    <mapped                  addr="0x0085" mapto="0x05"/><!-- FSR0H -->
    <mapped                  addr="0x0086" mapto="0x06"/><!-- FSR1L -->
    <mapped                  addr="0x0087" mapto="0x07"/><!-- FSR1H -->
    <mapped                  addr="0x0088" mapto="0x08"/><!-- BSR -->
    <mapped                  addr="0x0089" mapto="0x09"/><!-- WREG -->
    <mapped                  addr="0x008A" mapto="0x0A"/><!-- PCLATH -->
    <mapped                  addr="0x008B" mapto="0x0B"/><!-- INTCON -->
   
    <register  name="TRISA"  addr="0x008C"  reset="11111111"  mask="11011111" bits="TRISA0,TRISA1,TRISA2,TRISA3,TRISA4,TRISA5,TRISA6,TRISA7" />
    <register  name="TRISB"  addr="0x008D"  reset="11111111"  mask="11111111" bits="TRISB0,TRISB1,TRISB2,TRISB3,TRISB4,TRISB5,TRISB6,TRISB7" />
    <register  name="PIE1"    addr="0x0091"  reset=""  mask="11111111" bits="TMR1IE,TMR2IE,CCP1IE,SSP1IE,TXIE,RCIE,ADIE,TMR1GIE" />
    <register  name="PIE2"    addr="0x0092"  reset="00000--0"  mask="11111001" bits="0,0,0,BCL1IE,EEIE,C1IE,C2IE,OSFIE" />
    <register  name="OPTION_REG" addr="0x0095" reset="11111111" mask="11111111" bits="PS0,PS1,PS2,PSA,T0SE,T0CS,INTEDG,WPUEN" />
    <register  name="PCON"    addr="0x0096"  reset="00--11qq"  mask="11001111" bits="NOT_BOR,NOT_POR,NOT_RI,NOT_RMCLR,0,0,STKUNF,STKOVF" />
    <register  name="WDTCON"  addr="0x0097"  reset="--010110"  mask="00111111" bits="SWDTEN,WDTPS0,WDTPS1,WDTPS2,WDTPS3,WDTPS4,0,0" />
    <register  name="OSCTUNE" addr="0x0098"  reset="--000000"  mask="00111111" bits="TUN0,TUN1,TUN2,TUN3,TUN4,TUN5,0,0" />
    <register  name="OSCCON"  addr="0x0099"  reset="00111-00"  mask="11111011" bits="SCS0,SCS1,0,IRCF0,IRCF1,IRCF2,IRCF3,SPLLEN" />
    <register  name="OSCSTAT" addr="0x009A"  reset="10q00q00"  mask="00000000" bits="HFIOFS,LFIOFR,MFIOFR,HFIOFL,HFIOFR,OSTS,PLLR,T1OSCR" />
    <register  name="ADRESL"  addr="0x009B"  reset="xxxxxxxx"  mask="11111111" bits="" />
    <register  name="ADRESH"  addr="0x009C"  reset="xxxxxxxx"  mask="11111111" bits="" />
    <register  name="ADCON0"  addr="0x009D"  reset="-0000000"  mask="01111111" bits="ADON,GO,CHS0,CHS1,CHS2,CHS3,CHS4,0" />
    <register  name="ADCON1"  addr="0x009E"  reset="0000-000"  mask="11110111" bits="ADPREF0,ADPREF1,ADNREF,0,ADCS0,ADCS1,ADCS2,ADFM" />
  </regblock>
  <datablock name="GPR1" start="0x00A0" end="0x00EF"/>
  <datablock name="RAM1" start="0x00F0" end="0x00FF" mapto="0x0070"/>
   
<!-- BANK 2 -->
  <regblock name="SFR2" start="0x0100" end="0x011F">
    <mapped                  addr="0x0080" mapto="0x00"/><!-- INDF0 -->
    <mapped                  addr="0x0081" mapto="0x01"/><!-- INDF1 -->
    <mapped                  addr="0x0082" mapto="0x02"/><!-- PCL -->
    <mapped                  addr="0x0083" mapto="0x03"/><!-- STATUS -->
    <mapped                  addr="0x0084" mapto="0x04"/><!-- FSR0L -->
    <mapped                  addr="0x0085" mapto="0x05"/><!-- FSR0H -->
    <mapped                  addr="0x0086" mapto="0x06"/><!-- FSR1L -->
    <mapped                  addr="0x0087" mapto="0x07"/><!-- FSR1H -->
    <mapped                  addr="0x0088" mapto="0x08"/><!-- BSR -->
    <mapped                  addr="0x0089" mapto="0x09"/><!-- WREG -->
    <mapped                  addr="0x008A" mapto="0x0A"/><!-- PCLATH -->
    <mapped                  addr="0x008B" mapto="0x0B"/><!-- INTCON -->
   
    <register  name="LATA"    addr="0x010C"  reset="xx-xxxxx"  mask="11011111" bits="LATA0,LATA1,LATA2,LATA3,LATA4,0,LATA6,LATA7" />
    <register  name="LATB"    addr="0x010D"  reset="xxxxxxxx"  mask="11111111" bits="LATB0,LATB1,LATB2,LATB3,LATB4,LATB5,LATB6,LATB7" />
    <register  name="CM1CON0" addr="0x0111"  reset="0000-100"  mask="" bits="C1SYNC,C1HYS,C1SP,0,C1POL,C1OE,C1OUT,C1ON" />
    <register  name="CM1CON1" addr="0x0112"  reset="0000--00"  mask="" bits="C1NCH0,C1NCH1,0,0,C1PCH0,C1PCH1,C1INTN,C1INTP" />
    <register  name="CM2CON0" addr="0x0113"  reset="0000-100"  mask="" bits="C2SYNC,C2HYS,C2SP,0,C2POL,C2OE,C2OUT,C2ON" />
    <register  name="CM2CON1" addr="0x0114"  reset="0000--00"  mask="" bits="C2NCH0,C2NCH1,0,0,C2PCH0,C2PCH1,C2INTN,C2INTP" />
    <register  name="CMOUT"  addr="0x0115"  reset="------00"  mask="" bits="MC1OUT,MC2OUT,0,0,0,0,0,0" />
    <register  name="BORCON"  addr="0x0116"  reset="1------q"  mask="" bits="BORRDY,0,0,0,0,0,0,SBOREN" />
    <register  name="FVRCON"  addr="0x0117"  reset="0qrr0000"  mask="" bits="ADFVR0,ADFVR1,CDAFVR0,CDAFVR1,TSRNG,TSEN,FVRRDY,FVREN" />
    <register  name="DACCON0" addr="0x0118"  reset="000-00-0"  mask="" bits="DACNSS,0,DACPSS0,DACPSS1,0,DACOE,DACLPS,DACEN" />
    <register  name="DACCON1" addr="0x0119"  reset="---00000"  mask="" bits="DACR0,DACR1,DACR2,DACR3,DACR4,0,0,0" />
    <register  name="SRCON0"  addr="0x011A"  reset=""  mask="" bits="SRPR,SRPS,SRNQEN,SRQEN,SRCLK0,SRCLK1,SRCLK2,SRLEN" />
    <register  name="SRCON1"  addr="0x011B"  reset=""  mask="" bits="SRRC1E,SRRC2E,SRRCKE,SRRPE,SRSC1E,SRSC2E,SRSCKE,SRSPE" />
    <register  name="APFCON0" addr="0x011D"  reset=""  mask="" bits="CCP1SEL,P1CSEL,P1DSEL,0,0,SS1SEL,SDO1SEL,RXDTSEL" />
    <register  name="APFCON1" addr="0x011E"  reset="-------0"  mask="" bits="TXCKSEL,0,0,0,0,0,0,0" />
  </regblock>
  <datablock name="GPR2" start="0x0120" end="0x016F"/>
  <datablock name="RAM2" start="0x0170" end="0x017F" mapto="0x0070"/>
   
<!-- BANK 3 -->
  <regblock name="SFR3" start="0x0180" end="0x019F">
    <mapped                  addr="0x0080" mapto="0x00"/><!-- INDF0 -->
    <mapped                  addr="0x0081" mapto="0x01"/><!-- INDF1 -->
    <mapped                  addr="0x0082" mapto="0x02"/><!-- PCL -->
    <mapped                  addr="0x0083" mapto="0x03"/><!-- STATUS -->
    <mapped                  addr="0x0084" mapto="0x04"/><!-- FSR0L -->
    <mapped                  addr="0x0085" mapto="0x05"/><!-- FSR0H -->
    <mapped                  addr="0x0086" mapto="0x06"/><!-- FSR1L -->
    <mapped                  addr="0x0087" mapto="0x07"/><!-- FSR1H -->
    <mapped                  addr="0x0088" mapto="0x08"/><!-- BSR -->
    <mapped                  addr="0x0089" mapto="0x09"/><!-- WREG -->
    <mapped                  addr="0x008A" mapto="0x0A"/><!-- PCLATH -->
    <mapped                  addr="0x008B" mapto="0x0B"/><!-- INTCON -->

    <register  name="ANSELA"  addr="0x018C"  reset="---11111"  mask="00011111" bits="ANSA0,ANSA1,ANSA2,ANSA3,ANSA4,0,0,0" />
    <register  name="ANSELB"  addr="0x018D"  reset="1111111-"  mask="11111110" bits="0,ANSB1,ANSB2,ANSB3,ANSB4,ANSB5,ANSB6,ANSB7" />
    <register  name="EEADRL"  addr="0x0191"  reset=""  mask="" bits="" />
    <register  name="EEADRH"  addr="0x0192"  reset="-0000000"  mask="" bits="" />
    <register  name="EEDATL"  addr="0x0193"  reset="xxxxxxxx"  mask="" bits="" />
    <register  name="EEDATH"  addr="0x0194"  reset="--xxxxxx"  mask="" bits="" />
    <register  name="EECON1"  addr="0x0195"  reset="0000x000"  mask="" bits="RD,WR,WREN,WRERR,FREE,LWLO,CFGS,EEPGD" />
    <register  name="EECON2"  addr="0x0196"  reset=""  mask="" bits="" />
    <register  name="RCREG"  addr="0x0199"  reset=""  mask="" bits="" />
    <register  name="TXREG"  addr="0x019A"  reset=""  mask="" bits="" />
    <register  name="SPBRGL"  addr="0x019B"  reset=""  mask="11111111" bits="" />
    <register  name="SPBRGH"  addr="0x019C"  reset=""  mask="11111111" bits="" />
    <register  name="RCSTA"  addr="0x019D"  reset="0000000x"  mask="11111000" bits="RX9D,OERR,FERR,ADDEN,CREN,SREN,RX9,SPEN" />
    <register  name="TXSTA"  addr="0x019E"  reset="00000010"  mask="11111101" bits="TX9D,TRMT,BRGH,SENDB,SYNC,TXEN,TX9,CSRC" />
    <register  name="BAUDCON" addr="0x019F"  reset="01-00-00"  mask="00011011" bits="ABDEN,WUE,0,BRG16,SCKP,0,RCIDL,ABDOVF" />
  </regblock>
  <datablock name="GPR3" start="0x01A0" end="0x01EF"/>
  <datablock name="RAM3" start="0x01F0" end="0x01FF" mapto="0x0070"/>
 
<!-- BANK 4 -->
  <regblock name="SFR4" start="0x0200" end="0x021F">
    <mapped                  addr="0x0080" mapto="0x00"/><!-- INDF0 -->
    <mapped                  addr="0x0081" mapto="0x01"/><!-- INDF1 -->
    <mapped                  addr="0x0082" mapto="0x02"/><!-- PCL -->
    <mapped                  addr="0x0083" mapto="0x03"/><!-- STATUS -->
    <mapped                  addr="0x0084" mapto="0x04"/><!-- FSR0L -->
    <mapped                  addr="0x0085" mapto="0x05"/><!-- FSR0H -->
    <mapped                  addr="0x0086" mapto="0x06"/><!-- FSR1L -->
    <mapped                  addr="0x0087" mapto="0x07"/><!-- FSR1H -->
    <mapped                  addr="0x0088" mapto="0x08"/><!-- BSR -->
    <mapped                  addr="0x0089" mapto="0x09"/><!-- WREG -->
    <mapped                  addr="0x008A" mapto="0x0A"/><!-- PCLATH -->
    <mapped                  addr="0x008B" mapto="0x0B"/><!-- INTCON -->

    <register  name="WPUA"    addr="0x020C"  reset="--1-----"  mask="00100000" bits="0,0,0,0,0,WPUA5,0,0" />
    <register  name="WPUB"    addr="0x020D"  reset="11111111"  mask="11111111" bits="WPUB0,WPUB1,WPUB2,WPUB3,WPUB4,WPUB5,WPUB6,WPUB7" />
    <register  name="SSP1BUF"  addr="0x0211"  reset="xxxxxxxx"  mask="" bits="" />
    <register  name="SSP1ADD"  addr="0x0212"  reset=""  mask="" bits="" />
    <register  name="SSP1MSK"  addr="0x0213"  reset="11111111"  mask="" bits="" />
    <register  name="SSP1STAT" addr="0x0214"  reset=""  mask="" bits="BF,UA,R_W,S,P,D_A,CKE,SMP" />
    <register  name="SSP1CON1" addr="0x0215"  reset=""  mask="" bits="SSPM0,SSPM1,SSPM2,SSPM3,CKP,SSPEN,SSPOV,WCOL" />
    <register  name="SSP1CON2" addr="0x0216"  reset=""  mask="" bits="SEN,RSEN,PEN,RCEN,ACKEN,ACKDT,ACKSTAT,GCEN" />
    <register  name="SSP1CON3" addr="0x0217"  reset=""  mask="" bits="DHEN,AHEN,SBCDE,SDAHT,BOEN,SCIE,PCIE,ACKTIM" />
  </regblock>
  <datablock name="GPR4" start="0x0220" end="0x0250"/>
  <datablock name="RAM4" start="0x0270" end="0x027F" mapto="0x0070"/>
   
<!-- BANK 5 -->
  <regblock name="SFR5" start="0x0280" end="0x029F">
    <mapped                  addr="0x0080" mapto="0x00"/><!-- INDF0 -->
    <mapped                  addr="0x0081" mapto="0x01"/><!-- INDF1 -->
    <mapped                  addr="0x0082" mapto="0x02"/><!-- PCL -->
    <mapped                  addr="0x0083" mapto="0x03"/><!-- STATUS -->
    <mapped                  addr="0x0084" mapto="0x04"/><!-- FSR0L -->
    <mapped                  addr="0x0085" mapto="0x05"/><!-- FSR0H -->
    <mapped                  addr="0x0086" mapto="0x06"/><!-- FSR1L -->
    <mapped                  addr="0x0087" mapto="0x07"/><!-- FSR1H -->
    <mapped                  addr="0x0088" mapto="0x08"/><!-- BSR -->
    <mapped                  addr="0x0089" mapto="0x09"/><!-- WREG -->
    <mapped                  addr="0x008A" mapto="0x0A"/><!-- PCLATH -->
    <mapped                  addr="0x008B" mapto="0x0B"/><!-- INTCON -->
   
    <register  name="CCPR1L"  addr="0x0291" reset="xxxxxxxx"  mask="" bits="" />
    <register  name="CCPR1H"  addr="0x0292" reset="xxxxxxxx"  mask="" bits="" />
    <register  name="CCP1CON" addr="0x0293" reset=""  mask="" bits="CCP1M0,CCP1M1,CCP1M2,CCP1M3,DC1B0,DC1B1,P1M0,P1M1" />
    <register  name="PWM1CON" addr="0x0294" reset=""  mask="" bits="P1DC0,P1DC1,P1DC2,P1DC3,P1DC4,P1DC5,P1DC6,P1RSEN" />
    <register  name="CCP1AS"  addr="0x0295" reset=""  mask="" bits="PSS1BD0,PSS1BD1,PSS1AC0,PSS1AC1,CCP1AS0,CCP1AS1,CCP1AS2,CCP1ASE" />       
    <register  name="PSTR1CON" addr="0x0296" reset="---00001"  mask="" bits="STR1A,STR1B,STR1C,STR1D,STR1SYNC,0,0,0" />
  </regblock>
  <datablock name="RAM5" start="0x02F0" end="0x02FF"  mapto="0x0070"/>
   
<!-- BANK 6 -->
  <regblock name="SFR6" start="0x0300" end="0x031F">
    <mapped                  addr="0x0080" mapto="0x00"/><!-- INDF0 -->
    <mapped                  addr="0x0081" mapto="0x01"/><!-- INDF1 -->
    <mapped                  addr="0x0082" mapto="0x02"/><!-- PCL -->
    <mapped                  addr="0x0083" mapto="0x03"/><!-- STATUS -->
    <mapped                  addr="0x0084" mapto="0x04"/><!-- FSR0L -->
    <mapped                  addr="0x0085" mapto="0x05"/><!-- FSR0H -->
    <mapped                  addr="0x0086" mapto="0x06"/><!-- FSR1L -->
    <mapped                  addr="0x0087" mapto="0x07"/><!-- FSR1H -->
    <mapped                  addr="0x0088" mapto="0x08"/><!-- BSR -->
    <mapped                  addr="0x0089" mapto="0x09"/><!-- WREG -->
    <mapped                  addr="0x008A" mapto="0x0A"/><!-- PCLATH -->
    <mapped                  addr="0x008B" mapto="0x0B"/><!-- INTCON -->
  </regblock>
  <datablock name="RAM6" start="0x0370" end="0x037F"  mapto="0x0070"/>
 
<!-- BANK 7 -->
  <regblock name="SFR7" start="0x0380" end="0x039F">
    <mapped                  addr="0x0080" mapto="0x00"/><!-- INDF0 -->
    <mapped                  addr="0x0081" mapto="0x01"/><!-- INDF1 -->
    <mapped                  addr="0x0082" mapto="0x02"/><!-- PCL -->
    <mapped                  addr="0x0083" mapto="0x03"/><!-- STATUS -->
    <mapped                  addr="0x0084" mapto="0x04"/><!-- FSR0L -->
    <mapped                  addr="0x0085" mapto="0x05"/><!-- FSR0H -->
    <mapped                  addr="0x0086" mapto="0x06"/><!-- FSR1L -->
    <mapped                  addr="0x0087" mapto="0x07"/><!-- FSR1H -->
    <mapped                  addr="0x0088" mapto="0x08"/><!-- BSR -->
    <mapped                  addr="0x0089" mapto="0x09"/><!-- WREG -->
    <mapped                  addr="0x008A" mapto="0x0A"/><!-- PCLATH -->
    <mapped                  addr="0x008B" mapto="0x0B"/><!-- INTCON -->
   
    <register  name="IOCBP"  addr="0x0394"  reset=""  mask="" bits="IOCBP0,IOCBP1,IOCBP2,IOCBP3,IOCBP4,IOCBP5,IOCBP6,IOCBP7" />
    <register  name="IOCBN"  addr="0x0395"  reset=""  mask="" bits="IOCBN0,IOCBN1,IOCBN2,IOCBN3,IOCBN4,IOCBN5,IOCBN6,IOCBN7" />
    <register  name="IOCBF"  addr="0x0396"  reset=""  mask="" bits="IOCBF0,IOCBF1,IOCBF2,IOCBF3,IOCBF4,IOCBF5,IOCBF6,IOCBF7" />
    <register  name="CLKRCON" addr="0x039A"  reset="00110000"  mask="" bits="CLKRDIV0,CLKRDIV1,CLKRDIV2,CLKRDC0,CLKRDC1,CLKRSLR,CLKROE,CLKREN" />
    <register  name="MDCON"  addr="0x039C"  reset="0010---0"  mask="" bits="MDBIT,0,0,MDOUT,MDOPOL,MDSLR,MDOE,MDEN" />
    <register  name="MDSRC"  addr="0x039D"  reset="x---xxxx"  mask="" bits="MDMS0,MDMS1,MDMS2,MDMS3,0,0,0,MDMSODIS" />
    <register  name="MDCARL"  addr="0x039E"  reset="xxx-xxxx"  mask="" bits="MDCL0,MDCL1,MDCL2,MDCL3,0,MDCLSYNC,MDCLPOL,MDCLODIS" />
    <register  name="MDCARH"  addr="0x039F"  reset="xxx-xxxx"  mask="" bits="MDCH0,MDCH1,MDCH2,MDCH3,0,MDCHSYNC,MDCHPOL,MDCHODIS" />
  </regblock>
  <datablock name="RAM7" start="0x03F0" end="0x03FF"  mapto="0x0070"/>
</parts>

Sponsored content



Back to top  Message [Page 1 of 3]

Go to page : 1, 2, 3  Next

Permissions in this forum:
You cannot reply to topics in this forum