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.
OK, I've just done it. I have three timers - timer0 generate scuqare wave on pin MAT0.0 (P3.25) and play some melody, timer1 and timer2 draw snake and put random pixels. Now I have to make turning off the timers...I understand turning off is depend on bit in TCR and logical operations, but I read in documentation that, if I clear bit 1 or 2 for timer0 I won't do nothing - "Feature disabled." That while I have to change only one bit if I want to stop timer - I must disable interrupts. I think that...But I'm not sure.