[time-nuts] Linux code for Prologix GPIB/USB

Ulrich Bangert df6jb at ulrich-bangert.de
Mon Feb 26 12:00:47 EST 2007


Hal,

> Baud rate doesn't make much sense on a USB connection, but 
> mine blinks if I set it wrong.

At the end of the USB cable there is a FTDI chip that (in conjunction
with the appropiate driver) emulates a serial port. This serial port in
turn is connected to the serial port of an AVR type of microcontroller.
Because this microcontroller expects a certain setting of serial
transmission parameters you have to set them correct, otherwise it will
not understand your commands. 

> I found it also went into blinking-LED mode if I sent it 
> another command too quickly and didn't have flow control 
> working.  It works fine without flow control as long as 
> you pause before sending it another command.  At least 
> for what I'm doing.

I have been thinking exactly this way too, at least for some weeks. Then
it turned out that we never know exactly whether the micro is really
ready to receive the next char (yes, it is character sensitive, not only
command sensitive) without using the hardware handshake. If possible at
all, use hardware handshake with the Prologix interface.

I have only very limited Linux experience and even less with Windows
emulation under Linux. But if you could get my EZGPIB tool
http://www.ulrich-bangert.de/EZGPIB.Zip running in a Windows emulation
it would surely help you a lot since it frees you from low level serial
programming.

Best regards
Ulrich Bangert, DF6JB

> -----Ursprüngliche Nachricht-----
> Von: time-nuts-bounces at febo.com 
> [mailto:time-nuts-bounces at febo.com] Im Auftrag von Hal Murray
> Gesendet: Sonntag, 25. Februar 2007 22:17
> An: time-nuts at febo.com
> Betreff: Re: [time-nuts] Linux code for Prologix GPIB/USB
> 
> 
> A followup to my request from a month ago...
> 
> > Does anybody have some simple starter code I can try?  My straw man 
> > would be  to read the version string or address switches.
> 
> > I'm usually good at this sort of code.  I'm probably overlooking 
> > something  simple.  (Or it will be simple after I know what it is.)
> 
> It's working fine now, at least for the simple things I'm doing.
> 
> A couple of notes in case somebody finds this thread.
> 
> The Prologix documentation says it goes into blinking-LED 
> mode if you get the 
> baud rate wrong.  Baud rate doesn't make much sense on a USB 
> connection, but 
> mine blinks if I set it wrong.  When it's in that mode, it 
> won't talk to 
> anything.  You have to power cycle it.
> 
> I found it also went into blinking-LED mode if I sent it 
> another command too 
> quickly and didn't have flow control working.  It works fine 
> without flow 
> control as long as you pause before sending it another 
> command.  At least for 
> what I'm doing.
> 
> I'm using a 2.6.19 kernel.  The flow control code for various 
> USB serial 
> modules has been split out to a shared module - 
> SERIAL_GENERIC.  That wasn't 
> getting loaded on my setup (FC-6).  I don't know if that's a 
> quirk in FC or 
> something I broke or ...  I fixed it by making a new kernel 
> with that module 
> included as part of the kernel rather than as a module.  
> There is probably 
> some way with modules magic to get it loaded first.
> 
> If you want to debug blink mode, I suggest a printf before 
> each write to the 
> device, and a long pause after each write so you can see if 
> that's where it 
> starts blinking.
> 
> I put a copy of the sort of code I was looking for as probe.c on
>   http://www.megapathdsl.net/~hmurray/hacks/
> 
> 
> -- 
> These are my opinions, not necessarily my employer's.  I hate spam.
> 
> 
> 
> 
> _______________________________________________
> time-nuts mailing list
> time-nuts at febo.com 
> https://www.febo.com/cgi-> bin/mailman/listinfo/time-nuts
> 




More information about the time-nuts mailing list