Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Re: EMO-EM3 outputs

2006-03-17 by Karl Olsen

--- In lpc2000@yahoogroups.com, "alvingoesdown" <alvingoesdown@...> 
wrote:

> The External Match Register Uses the EMO-EM3 as outputs bits 0,1,2,3
> The documentation states These bits reflect the state of the
> outputs, If thats the case then you should not write to these bits 
> correct????
> So the LSB 0-3 should not be written to in the external match
> register correct.??? I'm lost on this one?? 
> Anybody got any idea on how or just what the purpose of these bits
> are other than just an output pin that goes high, low, or toggle????
> I can see reading these bits for status of the output, but writting
> to these bits I don't understand unless it's an enable, but if thats
> the case, then how can you read the output status???

When a pin is configured as MATx.x, you can actually control it by 
writing to its EMx bit.  You can e.g. set it high by writing 1 to the 
EMx bit, and configure the EMCx bits and a match register to clear it 
at a specific timer value.

I have used this when I needed an extra PWM output and had already 
used the PWM timer: In a jitter-free FIQ handler (see msg 12652), 
configure EMR to set MATx.x high now and low on a MRx match.  It 
works nicely, but you are right that the MATx.x outputs are not that 
useful.  In the LPC2101/2/3, a PWM feature is added so you can use 
the MATx.x pins as real hardware PWM outputs.

Karl Olsen

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.