If you have spare i/o pins, you can tie the capture signal to another
pin for reading.
--- In lpc2000@yahoogroups.com, "moostieuk" <moostieuk@y...> wrote:
>
> You can't do this! Once the pin is set to one of the special
> functions you cannot read it's state. (Bit of a mistake imho, but
> theres probably a perfectly good explanation why this is the case)
>
> What you need to do is:
>
> Set the capture to rising edge.
>
> When the interrupt trips, start a counter and switch the capture
type
> to falling edge.
>
> When the interrupt trips save your counter, that gives you
your "mark"
> period. Set the capture type back to rising edge and reset your
counter.
>
> When the interrupt trips again, save your counter that's
your "space"
> period.
>
> Repeat!
>
> Adrian
>
> --- In lpc2000@yahoogroups.com, dasbento@a... wrote:
> > Hello,
> >
> > someone know how read pwm (i.e. detect if the value read (in CR0,
CR1
> > and CR2) is rising edge or falling edge), since I have interrupts
> > enable in both transitions. My idea is the IOPIN register read
only
> > the current state when the pins are defined as I/O but this pins
are
Show quoted textHide quoted text
> > defined as capture.
> >
> > Someone already make any thing similar???
> >
> > Thanks!!!
> > Domingos
> >
> > _________________________________________________________
> > CEAC Cursos de formação profissional - peça informações aqui.:
> > http://ceac.online.pt/