atferrari
Full Member level 4
- Joined
- Jun 29, 2004
- Messages
- 237
- Helped
- 7
- Reputation
- 14
- Reaction score
- 3
- Trophy points
- 1,298
- Location
- Buenos Aires - Argentina
- Activity points
- 1,996
pic18f + interrupt not generated
Micro family 18F
Module CCP1 in compare mode against TMR1 in timer mode.
Setting: "toggle output pin (RC2) on match" condition.
My application currently loads alternatively CCPR1H:L with HALF_T1 and HALF_T2 and restarts TMR1. (It works OK like that).
Trying to follow the frequent advice received, to leave TMR1 running alone and ADDING the next value to CCPR1H:L, here is my question:
How to add the low and high bytes of next HALF_Tx, without risking to have an undesired match BEFORE both are added? In extreme cases this actually WOULD happen in my application. Tested.
For other settings I know how to do it (changing CCP1M0) but no for "toggle on match". Any change of a single bit from CCP1M3:CCP1M0 would enter in an undesired condition, so I discarded that.
I find this problem mentioned somewhere but no solution explained for this case.
I want to retain the "toggle on match setting".:!:
Help appreciated.
Micro family 18F
Module CCP1 in compare mode against TMR1 in timer mode.
Setting: "toggle output pin (RC2) on match" condition.
My application currently loads alternatively CCPR1H:L with HALF_T1 and HALF_T2 and restarts TMR1. (It works OK like that).
Trying to follow the frequent advice received, to leave TMR1 running alone and ADDING the next value to CCPR1H:L, here is my question:
How to add the low and high bytes of next HALF_Tx, without risking to have an undesired match BEFORE both are added? In extreme cases this actually WOULD happen in my application. Tested.
For other settings I know how to do it (changing CCP1M0) but no for "toggle on match". Any change of a single bit from CCP1M3:CCP1M0 would enter in an undesired condition, so I discarded that.
I find this problem mentioned somewhere but no solution explained for this case.
I want to retain the "toggle on match setting".:!:
Help appreciated.