Content originally posted in LPCWare by starblue on Fri Nov 07 01:42:26 MST 2014
Quote: Bela
1.: There's only one IT vector for Timer0. How can my code detect if this IT is due to one of the match registers?
Look at the bits in T0IR.
Quote: Bela
2.: I couldn't find out how could I write a value into Timer0/Match0 and Match1 register? [...] But if I try LPC_TIMER0-> here just MR is valid. In the user manual I see 4 match registers for each of the timers, not only one. I don't understand, how could I access one out of the 4.
Typically this would be an array, i.e. use LPC_TIMER0->MR[0] (I havent't checked, though).
Quote: Bela
3.: How could I set and/or clear the P0.22 bit?
In general, read the .h file defining these things, and figure out how it relates to the register description in the user manual.