LPC812 SCTimer

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPC812 SCTimer

957 Views
lpcware
NXP Employee
NXP Employee
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)
Labels (1)
0 Kudos
8 Replies

821 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by trimarco232 on Wed Apr 29 03:07:05 MST 2015


Quote:
TSSOP20 is just 1.3mm longer than TSSOP16


right !


Quote:
is it really that tight on your board?


you can see the attached drawings, I didn't design it yet, but an other version will be smaller (not so wide), and I want to use the same schematic for all versions


Quote:

Quote:


    Is there a way to avoid the 4th ?



I don't think so, unless maybe when your period is exactly 2^16 clock cycles, which is not the case.



You are probably right. So it might be a walk around : two of the pwm outputs drives a 1/2 bridge connected to a little dc motor. The upper transistor is to control the speed, the lower is to control  the brake. That means the pwms are never used at same time. Mi idea is to use the same pwm to drive once the upper, once the lower, just redirecting the pwm through the switch matrix ...


0 Kudos

821 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by starblue on Wed Apr 29 00:24:49 MST 2015

Quote: trimarco232

well, I assume that the 4 compare match registers you refer to are the 3 pwm duty cycles and the 4th for the max of the the PWM?

Yes.
Quote:
Is there a way to avoid the 4th ?

I don't think so, unless maybe when your period is exactly 2^16 clock cycles, which is not the case.


Quote:

Quote:
the LPC82x, it has a bigger SCT


price is not an issue, but the 16TSSOP size is the best for my project, because I have no more room on my PCB, and my skills don't allow me to solder TQFP packages


It is available as TSSOP20 and HVQFN33, not TQFP. HVQFN33 is about the same size as TSSOP16, but I would also consider it difficult to solder (I haven't tried QFN yet, TQFP is fine with me).

TSSOP20 is just 1.3mm longer than TSSOP16, is it really that tight on your board?
0 Kudos

821 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by trimarco232 on Tue Apr 28 14:21:20 MST 2015

Quote:
So my vias under LQFPs are illegal


:bigsmile:
writing : " tracks trough pass and vias under the chip" I though "both of then"


Quote:
Nice harangue


not only : an nxp's college has big succes with an TSSOP20 chip. But it has no analog comparator and I need one.
0 Kudos

821 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Tue Apr 28 13:53:37 MST 2015

Quote: trimarco232
but SSOP packages have other advantages, like allowing tracks trough pass and vias under the chip...



:O So my vias under LQFPs are illegal  :quest:


Quote: trimarco232
nxp says :
" these packages help to streamline prototyping, ease of assembly, and simplify high-volume, low-cost manufacturing. Further, the LPC800 TSSOP packages are designed for scalability by mapping power, ground and analog functions to identical locations so designers can move from TSSOP16 to TSSOP20 packages with minimal effort "



Nice harangue, unfortunately they don't manufacture a lot of chips in TSSOP  :((

(Or did I overlook the LPC1549 TSSOP48  :D  )
0 Kudos

821 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by trimarco232 on Tue Apr 28 13:19:10 MST 2015
of course R2D2, thanks !
but SSOP packages have other advantages, like allowing tracks trough pass and vias under the chip
and nxp says :
" these packages help to streamline prototyping, ease of assembly, and simplify high-volume, low-cost manufacturing. Further, the LPC800 TSSOP packages are designed for scalability by mapping power, ground and analog functions to identical locations so designers can move from TSSOP16 to TSSOP20 packages with minimal effort "
0 Kudos

821 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Tue Apr 28 11:33:06 MST 2015

Quote: trimarco232
...and my skills don't allow me to solder TQFP packages



:O  :((  :quest:

Then it's time to learn it:

https://www.youtube.com/watch?v=TJAByNlfkyE
0 Kudos

821 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by trimarco232 on Tue Apr 28 11:20:59 MST 2015
Hi starblue,
thank you

well, I assume that the 4 compare match registers you refer to are the 3 pwm duty cycles and the 4th for the max of the the PWM ? Is there a way to avoid the 4th ?


Quote:
the LPC82x, it has a bigger SCT


price is not an issue, but the 16TSSOP size is the best for my project, because I have no more room on my PCB, and my skills don't allow me to solder TQFP packages
0 Kudos

821 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by starblue on Tue Apr 28 06:30:39 MST 2015
My guess is that you will run out of match/capture registers: 4 match registers for the PWM, 1 match register for the square wave and 1 capture register is one too many. Edit: Maybe it is possible to do it because the registers are split into two 16-bit halves, but it is not clear to me.

You could take a look at the LPC82x, it has a bigger SCT, is also available in small packages and not much more expensive.
0 Kudos