Pololu Robotics & Electronics
Menu
My account Comments or questions? About Pololu Contact Ordering information Distributors

Pololu Forum

Ttl i/o

I’m looking for an example of how to use a Maestro-24 with TTL I/O to control some 74HC chips on a breadboard. I thought libUsc would be a good starting point as I’m developing in C in Linux. My control outputs and signal inputs are very unreliable and even the Maestro quite often just gets stuck on a constant yellow LED. Only the Control Center will revive it. I can just about set outputs and then high & lows, but switching between output & inputs never works. Confusing documentation doesn’t help. SET TARGET is either 0x84 or 0x85 depending on where you look.

Hello.

I am sorry to hear you are having trouble using the Maestro. We do not have any examples for controlling an 74HC IC from the Maestro.

Regarding the Maestro’s on-board yellow LED getting stuck on, which firmware version is your Maestro running?

As for the other issues, we intended the channel mode settings to be configured in the Maestro Control Center ahead of time, so you should do that if possible. The command byte 0x85 is used for the Maestro’s native USB, and 0x84 is used for serial.

Since it sounds like there are multiple issues, I suggest focusing on getting one part figured out before moving on to the others. If you can provide more details on what exactly it is you are trying to do as well as other useful information (e.g. your full code, the exact library version you are using, detailed steps to reproduce the problem and a wiring diagram of your setup), I can better help you troubleshoot the problem and offer some suggestions.

- Amanda

Thanks for the quick reply Amanda. Firmware is
firmwareVersionMinor = 2
firmwareVersionMajor = 1
It’s a little confusing having very similar hex values for the same function name over different interfaces. But I assume I’m only using the USB interface.

When stuck on a constant yellow LED, a quick unplug/replug fixes it and as it’s not happening each time, this is ok.

I think I’ve discovered that after changing pins between In & Out, quite some time is needed before doing any other operations, so a simple sleep(1) seems effective.

A low of 0 or close to 0 and a high of 5 or close to 5v is ok and this seems to work.

In summary, I think I can trace the problems down to switching pins between In & out. This seems to take quite a long time and adding an arbitrary wait has provided a cure.

I have a control application running in a Linux system (in VM), which communicates to the Maestro to set & read pins. These are connected to a breadboard system so I can do hardware debugging from my PC. A poor mans JTAG

Thanks for the support.

Hi. A quick follow-up question.

My Maestro is now working reliably, but quite slowly.
Reading pins is slow. I presume the device needs time to sample input pins. I’m using REQUEST_GET_SERVO_SETTINGS. As I’m only sampling lows and highs, is there any way to speed this up? I understand the device wasn’t designed for high throughout, but is there any way to optimise reading? As data over USB is low volume, I assume there’s no bottleneck there.

Thanks once again

Hello.

If you are not doing so already, I recommend you use only channels 12 through 23 for all of your digital readings. Those channels are not capable of analog input, so the Maestro just does digital readings on them. The digital readings are much faster than analog readings, so the Maestro does them more often. If this doesn’t get things working fast enough, you might instead consider making your own USB adapter from one of our programmable A-Star controllers.

–David

Yes I have switched my data lines (the only ones reading & writing), from signals 0 - 15 to 8 to 23. I didn’t notice any increase in speed though. Since this is a hobby project, I’ll have to live with the slow reading.