Monday, 13 July 2009

Full Duplex - With interrupts

I've now got Serial I/O working fine on one channel. I've made two ring buffers for receive and transmit and the interrupt service routine services the SIO and places stuff in the buffers. I can transfer huge files looped back through a simple program without losing a byte so it should do for now - though it is slow. I think I need to look at how it prioritises TX and RX as with the processor running at 1MHz and a baud rate of 19200 it doesn't quite give the throughput I'd hoped for more like 1000 cps. Still it will do for now if it is reliable.

For handshaking I've now tied the DCDA line low, ignore the RTS line and instead use DTRA on the SIO as a RTS/RTE this is controlled by the interrupt routine which turns DTRA high when there are only a few bytes left in the ring buffer and reenables it when the buffer is emptied.

Now to write a simple monitor so I can upload code without having to pop the Flash ROM out every five minutes - I'm bound to drop it in a cup of coffee or bend the pins sooner or later....

1 comment:

  1. looks like you might need to expand that motherboard out hehehehehe