Hi,
TMR3 seems to share it's clock pin with TMR1 and I haven't really looked into what effects that has but here's what I'd try:
I've set the bits one by one here so that it's easier to see what each one does. Note that I haven't tested this so it's perfectly normal if it doesn't work...Code:TRISA.4 = 1 'TMR0 CKI Pin as input TRISC.0 = 1 'TMR3 (and TMR1) CKI Pin as input 'From Datasheet Section 11 T0CON.7 = 1 'TMR0 is ON T0CON.6 = 0 'TMR0 is 16 bits T0CON.5 = 1 'TMR0 clock source is EXTERNAL... T0CON.4 = 0 '...and counts on rising edge T0CON.3 = 1 'NO prescaler is assigned T0CON.2 = 0 'Prescaler 1:1 T0CON.1 = 0 'Prescaler 1:1 T0CON.0 = 0 'Prescaler 1:1 'From Datasheet Section 14 T3CON.7 = 0 'Disables 16bit read/write T3CON.6 = 0 'TMR1 is clock for both CCP's (together with BIT 3) T3CON.5 = 0 'Prescaler 1:1 T3CON.4 = 0 'Prescaler 1:1 T3CON.3 = 0 'TMR1 is clock for both CCP's (together with BIT 5) T3CON.2 = 1 'Don't sync with internal clock. T3CON.1 = 1 'TMR3 clock source is EXTERNAL T3CON.0 = 1 'TMR3 is ON
/Henrik Olsson.




Bookmarks