niala72
Newbie level 6
- Joined
- May 28, 2014
- Messages
- 12
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1
- Activity points
- 115
I have developped a product with a PIC 16F505. The hardware is stable (at least 100 boards finished).
I decided to make modifications but the computer with Win2000 and the 9.60 compiler is out. Now it is XP SP3 and a new C compiler with also MPLAB v 8.91.00.00 and an ICD2.5 (ICD2 before).
After a few hours I found that the prescaler does not want to work with the timer (it worked with the old software).
I see that I can read and write to TMR0, use the same condition do {...} while (TMR0 != 0); but the timer des not increase if I use the prescaler (PSA=0), the loop does not finish.
I have switched off optimization, looked at the code produced, I do not find any explanation.
I can't debug becaus I have no ICD Header AC162059. Anyway I think the problem comes form the prescaler but why ???
Thanks for any help.
Alain
I decided to make modifications but the computer with Win2000 and the 9.60 compiler is out. Now it is XP SP3 and a new C compiler with also MPLAB v 8.91.00.00 and an ICD2.5 (ICD2 before).
After a few hours I found that the prescaler does not want to work with the timer (it worked with the old software).
Code:
OPTION = 0b11010010; before
Code:
OPTION = 0b11011010; now if I want to use the timer (no prescaler)
I see that I can read and write to TMR0, use the same condition do {...} while (TMR0 != 0); but the timer des not increase if I use the prescaler (PSA=0), the loop does not finish.
I have switched off optimization, looked at the code produced, I do not find any explanation.
I can't debug becaus I have no ICD Header AC162059. Anyway I think the problem comes form the prescaler but why ???
Thanks for any help.
Alain
Last edited by a moderator: