hitech timer0 interupt and counter help

Thread Starter

anoopmb25

Joined Jan 15, 2011
17
i am using pic18f2550 mcu

how can i set __config as internal oscillator 8 bit ,clock 8mhz and ra6 as i/o port

dont need to use usb

how can i calculate TMR0L reset value for using it as a interupt counter pls help

i have the following code is it correct

__CONFIG(1, USBPLL & IESODIS & FCMDIS & INTIO);
// Config word 2
__CONFIG(2, VREGEN & PWRTDIS & BORDIS & WDTDIS);
// Config word 3
__CONFIG(3, PBDIGITAL & LPT1DIS & MCLREN);
// Config word 4
__CONFIG(4, XINSTDIS & STVRDIS & LVPDIS & ICPORTDIS & DEBUGEN);
// Config word 5, 6 and 7 (protection configuration)
__CONFIG(5, UNPROTECT);
__CONFIG(6, UNPROTECT);
__CONFIG(7, UNPROTECT);

pls help me
 
Top