DigitalInOut quirk?

14 Mar 2011

Hey all. I finally got around to publishing my n64 interface code:

Import programN64ControllerInterface

N64 controller interface for the mbed.

When I was debugging I noticed that the output() and input() functions for the DigitalInOut took a fair bit of time (relatively speaking) to excecute. The delay was just long enough to cause the fist bit of the bit-stream to go unnoticed by the code. After an hour or so of frustration (maybe I should have caught it sooner?) I tired omitting the inout.input() function and everything started to work, to my surprise!

I've left the two lines commented out in the published code. As it is, the program works just fine. I was just wondering what input() and output() methods really do underneath. It seems you can use a DigitalInOut without calling DigitalInOut.output(); or DigitalInOut.input(); anywhere.