The TRIS problem will be fixed by using CAPs in your defines.
DEFINE CCP2_REG PORTC
DEFINE CCP2_BIT 3
DEFINE HPWM2_TIMER 2
MPASM is case sensitive.
In your P16F1825.INC file just add CCPTMRS0 below CCPTMRS. It's OK to have more than 1 name defined for a file register.
CCPTMRS EQU H'029E'
CCPTMRS0 EQU H'029E'
Both just let the compiler know the file registers address.
Not all PIC16F1xxx types have CCPTMRS0 and CCPTMRS1. The ones that don't normally have the timer select register defined as CCPTMRS.
Bookmarks