TMR0 Bug 16F887?

Moderator: Benj

Post Reply
medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

TMR0 Bug 16F887?

Post by medelec35 »

When Enable Timer0 and set properties to interrupt on Transition on T0CKI pin. With O/P on RA4=0. interrupt Timer0 macro constantly accessed as though setting are set on internal osc.

Settings: High to low transition
Prescaler = 1:1
Clock speed = 4MHz
Martin

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: TMR0 Bug 16F887?

Post by Benj »

Hello Medelec

Do you have any circuitry connected to the T0CKI pin. When you activate this as the timer clock source I think the chip may automatically make this pin an input and therefore if you do not have anything connected the pin is free to float. Try tying the pin to VDD or Ground and see if the problem remains.

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: TMR0 Bug 16F887?

Post by medelec35 »

Sorry was not too clear. I am only refering to Flowcode simlator, not got to hardware stage yet. Perhaps I should of wrote more than 'macro constantly accessed'.
Martin

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: TMR0 Bug 16F887?

Post by Benj »

Hi Medelec

Ok I see that fair enough then. I think the simulator simply assumes that the timer will be running. I know this is not ideal and have added it to our bugs list.

Post Reply