RS232 on the STAMP PDB
Aristotle
Posts: 9
I have been trying (for some time now) to connect an old TRS-80 Model 100 PC running the old DOS Microsoft BASIC to a STAMP using the on-board DP9 RS232 DCE (with MAX232). I have the PDB and the PC connected via a NULL modem (DB25 on the PC side, DB9 on the Stamp PDB side). I have PIN 6 connected to the TX pin. Here is my simple code:
' {$STAMP BS2sx}
' {$PBASIC 2.5}
TXpin PIN 6
BaudMode CON 25597 ' 2400, 7, E, 1, Inverted (for the BS2sx)
serDataOut VAR Byte
Main:
' -- Sending to the RS TRS-80 --
FOR idx = 1 TO 20
serDataOut = "A"
SEROUT TXpin, BaudMode, [serDataOut]
PAUSE 2000
NEXT
END
- On the PC side, I have setup the serial port to receive at 2400 baud/7 bits/Even Parity/1 stop bit/Disable Line Status.
- On the Stamp side, I use 2400/7/E/Inverted.
The PC is sitting there receiving nothing, while the Stamp transmits "A" 20 times.
Any suggestions as to what I am missing?
Thank you,
A.
' {$STAMP BS2sx}
' {$PBASIC 2.5}
TXpin PIN 6
BaudMode CON 25597 ' 2400, 7, E, 1, Inverted (for the BS2sx)
serDataOut VAR Byte
Main:
' -- Sending to the RS TRS-80 --
FOR idx = 1 TO 20
serDataOut = "A"
SEROUT TXpin, BaudMode, [serDataOut]
PAUSE 2000
NEXT
END
- On the PC side, I have setup the serial port to receive at 2400 baud/7 bits/Even Parity/1 stop bit/Disable Line Status.
- On the Stamp side, I use 2400/7/E/Inverted.
The PC is sitting there receiving nothing, while the Stamp transmits "A" 20 times.
Any suggestions as to what I am missing?
Thank you,
A.
Comments
Can you post the code your using on the TRS-80? I don't think the Stamp is at fault here.
'
I had a TRS-80 back-in-the-day. I used 9600 Baud 8 N 1. But you can use the other.
'
Details,details,details..........
[If your trs80 requires handshaking, that's another matter (just jumper it.)]
10 OPEN "COM:67E1D" FOR INPUT AS 1
20 INPUT #1, A$
30 PRINT A$
40 GOTO 20
Where:
6 = 2,400 baud
7 = 7 bit
E = Even Parity
1 = 1 stop bit
D = Disable Line Status (not sure what that means, but I tried E=enable too).
Thank you.
Thank you. That is useful information! I wasn't sure how to treat that. But I tried non-inverted too.
' {$STAMP BS2sx}
' {$PBASIC 2.5}
TXpin PIN 6
BaudMode CON 17405 ' 2400, 8, N, 1, Inverted (for the BS2sx)
Main:
' -- Sending to the RS TRS-80 --
FOR idx = 1 TO 20
SEROUT TXpin, BaudMode, [idx, CR]
PAUSE 500
NEXT
END
The PAUSE 500 is needed, because the TRS-80 cannot catch up, if it receives without a break.
Thank you both. Now on to controlling the Boe-Bot with an old TRS-80!
N.B. -- use/keep that 22K resistor between the Stamp and the trs80, that -V will be winding out that I/O clamping diode.
Thank you for pointing that out. I would not have thought of that. I already added the resistor and it works just great.