Bitbanging a PIO on Coldfire/ucLinux
Posted
by G Forty
on Stack Overflow
See other posts from Stack Overflow
or by G Forty
Published on 2010-03-21T22:43:30Z
Indexed on
2010/03/21
22:51 UTC
Read the original article
Hit count: 367
Here's the problem: I need to program some hardware via 2 pins of the PIO (1 clock, 1 data). Timing constraints are tight - 10ms clock cycle time. All this, of course, whilst I maintain very high level services (CAN bus, TCP/IP). The downstream unit also ACKS by asserting a PIO pin, configured as an input, high. So this loop has to both read and write. I need to send 16 bits in the serial stream.
Is there an established way to do this sort of thing or should I simply get the hardware guys to add a PIC or somesuch.
I'd much prefer to avoid exotics like RTAI extensions at this stage. I did once see a reference to user-mode IO which implied a possible interrupt driven driver but lost track of it.
Any pointers welcomed.
© Stack Overflow or respective owner