BS2p40 Controlling Test EQ over RS232 using SEROUT
JPL
Posts: 8
PC <=> BS2p40 <=> Keithley PicoAmmeter
I am using the Parallax Professional Development board. The normal/main/programmable serial port is connected to the PC. I am using Pins 0-3 to connect to the dev board's RS-232 port which offers an IC to handle the voltage changes.
I am unable to send ANY information to or from the meter. Via hyperterminal I can configure, test, and read data from the device. Below is a simple program I've written. When I connect a 2nd serial cable to the port to display in a 2nd hyperterminal window I see what I expect. However when I connect it back to the Keithley nothing happens, not even an error on the Keithley display.
My question is, what am I doing wrong? Pin 0 of the dev. board is connected to "RX" and pin 2 is connected to "TX". CTS, and RTS are no connected.
Keithley setup:
RS-232
Baudrate: 1200
Flow: None
Parity: None
Bits: 8
TX Term: LFCR
Program:
I am using the Parallax Professional Development board. The normal/main/programmable serial port is connected to the PC. I am using Pins 0-3 to connect to the dev board's RS-232 port which offers an IC to handle the voltage changes.
I am unable to send ANY information to or from the meter. Via hyperterminal I can configure, test, and read data from the device. Below is a simple program I've written. When I connect a 2nd serial cable to the port to display in a 2nd hyperterminal window I see what I expect. However when I connect it back to the Keithley nothing happens, not even an error on the Keithley display.
My question is, what am I doing wrong? Pin 0 of the dev. board is connected to "RX" and pin 2 is connected to "TX". CTS, and RTS are no connected.
Keithley setup:
RS-232
Baudrate: 1200
Flow: None
Parity: None
Bits: 8
TX Term: LFCR
Program:
' {$STAMP BS2p} ' {$PBASIC 2.5} '-------------[I/O Begin]----------- '-------------[I/O End]------------- '-------------[Variables/Constants Begin]---------- idx VAR Word current VAR Word deci VAR Word exponent VAR Word '-------------[Variables/Constants End]------------ '-------------[Main Program Begin]----------- main: Do DEBUG CR,LF,"Sending Read Command " SEROUT 2, 2063,100, [":READ?",LF,CR] ' :READ? Command to read current DEBUG CR,LF,"Sent!" ' Example of current readout: +1.234567E-09A SERIN 0, 2063, 10000, readerror, [WAIT("+"), DEC current, WAIT("."), DEC5 deci, WAIT("E-"), DEC exponent] DEBUG CR,LF,DEC current,".",DEC deci,"E-",DEC exponent LOOP readerror: DEBUG CR,LF,"Read Error!!!" GOTO main END '-------------[Main Program End]------------- '-------------[End of File]-------------
Comments