Bitbanging a PIO on Coldfire/ucLinux
- by G Forty
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.