by on
Dorkbot

A few people including myself have had some issues with their Benito’s where the programmer sets one light on constantly and the next thing that happens is the the mac will go comatose (or to the beach if you like spinney ball metaphores). Not a very confidence inspiring behavior. To make matters worse the behavior was completely inconsistent.

For the last batch of programmers I forced myself to upgrade the original source code to the current version of Dean Camera’s LUFA library (the library formerly known as MyUSB) and went about trying to figure it out. The first thing I “fixed” in the new code was to make the leds ping pong when the device was enumerating so I could tell the difference between enumeration and data.

Previously I had thought that the issue was at the host somewhere between the deadended rxtx library used by the arduino ide to talk to the devices and the equally deadended libusb used to find them.

Once I made this work I was seeing that in some cases the RX LED was constantly on (to verify this I swapped the led pins). Then I realized that when the arduino isn’t actually talking to the system the rx pin on the benito is tristated in other words it “float”s and whatever noise comes along is then data to be transmitted. In addition to leaving the lights on this flood of data gets sent to the usb subsystem to be read by the serial device when it it opened (I haven’t verified this completely but it certainly explains what the spinney ball is about).

There are a couple of things that could be done here. You could not transmit data unless dtr was present. Or you could enable the internal pullup which solves the issue. I filed this as a bug with Dean and the next rev of the USBtoSerial demo will have a pullup on the tx pin as well.

I suppose I need to show people how to upgrade their benitos. The new firmware and source are attached. (http://www.dorkbotpdx.org/files/Benito7g0109.tgz) If you have a troublesome Benito I will be happy to upgrade it at any of the upcoming meetings.

Leave a Reply

  • (will not be published)