Hi, I have little problems with timers in LPC1768. I need to start timer2 because I use timer0 and timer1. When I want to configure and start timer2 all program doesn't start and I see nothing reaction - white display and no reaction. I have question: can I use more timers than 2? How many timers can I use ? And the second problem - I'd like to turn off one of the timers. How can I do it ? I understand that I must change pins on TCR register, but when I set bit 0 or 1 from documentation I turned off timer but I can't turn on again...I can turn off only once. I don't understand it.
LPC_TIM1->TCR |= 1 << 0; - start timer LPC_TIM1->TCR |= 0 << 0; - turn off timer ? It doesn't work...
I also tried LPC_TIM1->TCR |= 1 << 1 but then timer didn't start again when I set LPC_TIM1->TCR |= 1 << 0 again. I think that you understand what I mean. Thanks for help.
You use whatever operator gives the result that you require!
And, of course, you need the appropriate operands to go with that operator!
We're talking basic logic here; not even specific to 'C' - let alone Keil or LPC1768
"What about using a few timers ?"
What about it?
"For example using 3 timers at once?"
You just do the same thing - three times!
Perhaps this will help: www.kpsec.freeuk.com/gates.htm
aka "Boolean algebra"