<parts>
  <port name="PORTA" pins="8" outreg="PORTA" dirreg="!TRISA"
                     clockpins="PORTA6,PORTA7" >
  </port>

  <port name="PORTB" pins="8" outreg="PORTB" dirreg="!TRISB"
                     pullups="WPUB" >
                     
    <interrupt name="PB_INT" mask="IOCB"/>
    <extint    name="INT" pin="PORTB0" configbits="INTEDG"/>
  </port>

  <port name="PORTC" pins="8" outreg="PORTC" dirreg="!TRISC"/>

  <timer name="TIMER0" type="800" configregsA="OPTION"
                       counter="TMR0"
                       clockpin="PORTA4"
                       interrupt="T0_OVF"
                       prescalers="2,4,8,16,32,64,128,256"/>

  <timer name="TIMER1" type="160" configregsA="T1CON"
                       counter="TMR1L,TMR1H"
                       clockpin="PORTC0"
                       interrupt="T1_OVF"
                       prescalers="1,2,4,8"/>

  <timer name="TIMER2" type="820" configregsA="T2CON" configregsB="PR2"
                       counter="TMR2"
                       interrupt="T2_MATCH"
                       prescalers="1,4,16,16"/>

  <ccpunit name="CCP+1" type="00" configregsA="CCP1CON"
                        ccpreg="CCPR1L,CCPR1H"
                        pin="PORTC2"
                        interrupt="CCP1" />

  <ccpunit name="CCP2"  type="00" configregsA="CCP2CON"
                        ccpreg="CCPR2L,CCPR2H"
                        pin="PORTC1"
                        interrupt="CCP2" />

  <usart name="USART0"  number="1" configregsA="TXSTA" configregsB="RCSTA"
                        interrupt="USART_T">

    <trunit type="tx" pin="PORTC6" register="TXREG"/>
    <trunit type="rx" pin="PORTC7" register="RCREG" interrupt="USART_R" />
  </usart>

  <vref name="Vref" configregsA="VRCON" pinout="PORTA2"/>

  <comp name="COMP" type="11" configregsA="CM1CON0"  configregsC="SRCON"
                    interrupt="ACOMP1"
                    pins="PORTA0,PORTA1,PORTB3,PORTB1,PORTA3,PORTA4" />

  <comp name="COMP" type="12" configregsA="CM2CON0" configregsB="CM2CON1" configregsC="SRCON"
                    interrupt="ACOMP2"
                    pins="PORTA0,PORTA1,PORTB3,PORTB1,PORTA2,PORTA5" />
</parts>
