lpcware

LPC812 SCTimer

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by trimarco232 on Tue Apr 28 04:55:55 MST 2015
Hi all,
I am interested for LPC812M101FDH16 because it has sexy size and incorporates an analogic comparator.
But before beginning in the LPC world (and of course with the SCTimer), I want to tell some question, here about the SCTimer :
It supports:
– 4 inputs
– 4 outputs
– 5 match/capture registers
– 6 events
– 2 states

This what I need :
- 3 pwm outputs at ~20 kHz ;  8bits are enough for the  resolution of the duty cycle ; two of these ouputs control the drivers of an 1/2 bridge
- 1 square wawe generator 1 ~ 2 kHz,  resolution = 1µs
- 1 capture, 16 bits wide and 1/2 µs resolution

The way I have created that for other brand controller :
1 timer is configured as 8bits pwm with 3 outputs
1 othe timer that runs 16 bits up. The square output is made by an output toggle on compare match. An interruption is generated in order to update the compare register. The compare is trigered by an external source. An interruption is genrated in order to read and store the capture register.
The capture must be triggered by the output of the inside comparator, and have a digital filter.

Please, tell me just if this is possible, thank you. (If yes, I will probably post for further explanation in the future)

Outcomes