4 Channel Timer/Counter
Re: 4 Channel Timer/Counter
I have code for a Coridium SuperPro board from a previous project. I used the SuperPro on that project because I needed a DAC output. I could save some money, by using a ProPlus on this project. Will my setup code be different from the SuperPro? It may be worth the extra money, if I can reuse some code.
Re: 4 Channel Timer/Counter
Hi, - what code size are you anticipating ??
Super has - 128k user code space (10,000 Instructions)
16k user data
Plus has - 20k user code space (1600 Instructions)
5k user data
*
Plus has no +5v available
Plus has no DAC
*
no apparent special files in Basiclib, no #ifdef for the different chips in LPC17xx.bas
pin assignments are the same (an issue I had between two different chipset namings - NXP improvement)
?
Same amount of Timers ?? I didn't look at the spec sheets!
*
Looks like a go from here -- Olzeke51
Super has - 128k user code space (10,000 Instructions)
16k user data
Plus has - 20k user code space (1600 Instructions)
5k user data
*
Plus has no +5v available
Plus has no DAC
*
no apparent special files in Basiclib, no #ifdef for the different chips in LPC17xx.bas
pin assignments are the same (an issue I had between two different chipset namings - NXP improvement)
?
Same amount of Timers ?? I didn't look at the spec sheets!
*
Looks like a go from here -- Olzeke51
Re: 4 Channel Timer/Counter
I'll stick with the SuperPro. The money savings for the ProPlus is not worth the risk that I'll need something that isn't available with the ProPlus for a single quantity. If I ever have a market for this, I can look at the ProPlus again.
Re: 4 Channel Timer/Counter
I need 4 Match Pins. P1.28 is Mat0.0, P1.25 is Mat1.0, P0.10 is Mat 3.0, but there is no Arduino compatible pin for Match2 Register.
How can I get 4 Match Register output pins?
How can I get 4 Match Register output pins?
Re: 4 Channel Timer/Counter
I'm only going to use 2 Match pins. I'll use P1.28, and P0.10. I'll multiplex the outputs and double the duty cycle of MR0.0, and MR3.0.
I need to use Timer1 as a Capture Timer. I want to start Timer1 on the falling edge of P1.18, and capture TC1 on the rising edge of P1.18. Should I just poll & clear TC on the falling edge, then Interrupt on the rising edge & reset?
Can I poll P1.18, when it's used as a Capture pin?
I need to use Timer1 as a Capture Timer. I want to start Timer1 on the falling edge of P1.18, and capture TC1 on the rising edge of P1.18. Should I just poll & clear TC on the falling edge, then Interrupt on the rising edge & reset?
Can I poll P1.18, when it's used as a Capture pin?
Re: 4 Channel Timer/Counter
You can always read the state of an input even if it is used as special purpose pin.
You should be able to use the capture hardware to reset the timer or do it on an interrupt.
You should be able to use the capture hardware to reset the timer or do it on an interrupt.
Re: 4 Channel Timer/Counter
There are many more match pins, you can jumper over to them to connect to Arduino pins for a shield.
Re: 4 Channel Timer/Counter
I need a Low True output on Match 0.0 (P1.28), and Match 3.0, (P0.10).
How can I make the External Match Outputs Low true?
How long does the Match Pin stay true?
Should I set Tx_MCR to 0x040 to stop the timer, until I start it again, so the Match Pin stays True?
How can I make the External Match Outputs Low true?
How long does the Match Pin stay true?
Should I set Tx_MCR to 0x040 to stop the timer, until I start it again, so the Match Pin stays True?
Re: 4 Channel Timer/Counter
I don't really know what you are trying to do, but most of the time I reset the counter on a match, if you need to change the next match time then you should generate an interrupt on match as well and reprogram the registers.
As for the match output pin, you can use the match to set the pin high or low or to toggle or do nothing. It will stay in that state until the next match.
As for the match output pin, you can use the match to set the pin high or low or to toggle or do nothing. It will stay in that state until the next match.
Re: 4 Channel Timer/Counter
I generate an Interrupt on Match & set Tx_MCR to 0x40 to stop the timer. The external match pin should stay True until I reset the timer elsewhere in the program.
I'm still not sure how to get the External Match pin to go Low True on a match. Do I have to output a Zero in my interrupt routine?
I'm still not sure how to get the External Match pin to go Low True on a match. Do I have to output a Zero in my interrupt routine?