Shop OBEX P1 Docs P2 Docs Learn Events
multiple serial inputs on one port — Parallax Forums

multiple serial inputs on one port

justin weberjustin weber Posts: 36
edited 2006-01-21 15:00 in BASIC Stamp
To my knowledge the "progamming" port is 12V, same as the PC. Then there are 2 pins for TxD, RxD on the I/O lines that do +5V serial. I need three serial devices hooked up to this second channel. Can I use a 74139 chip 1 of 4 multiplexer and 3 74245 octal bus transcievers to make a serial bus? I would connect A and B on the 139 chip to two I/O pins on the stamp. Then Y0,Y1,Y2 would "strobe" the 245's at the CS pin 19 when the stamp is ready to talk to them. Could I simply connect the respective serial device to each of the 245 and only use two of the pins on the input side and connect the RX and TX from the output side of the octal bus drive directly to the STAMP serial port. I am confused because it looks like 8 bits are needed, but I only would need to connect two wires to each IC for input. I would simply connect each of the 245 outputs to a TX bus and a RX bus and connect those busses directly to the Stamp pins. I know I can build a 2 device switch using only one I/O line for select and using 74hc00,74hc02, but I need three. The devices are a socketmodem(look on halted.com - it's $4.95 each, not $56 like the CH1786A), video card from microlabs, and a ps/2 to serial mouse adapter from multilabs. On the other side, can anybody tell me if they think I would spend all the processing time switching between these devices and waiting for them to respond. I am actually trying to create a 2 player "TV" game using a modem. I want to just use a CB220(cube loc 220) it says it is pin compatible with the BS2 but includes AD conversion on chip and an attenuator. The same problem exists and the BASIC is different. There is no SEROUT on the CB220, so the instructions for using the ezVid 2.0 card from multilabs would be complicated. It does have a OpenCom statement for 0 being the 12V programmer port and 1 for the 5V serial on two I/O lines. the 220 is $34 dollars and they offer the programming board with a rs232 port for $5. It also executes at 36k instructions/sec at 18.xMhz. Can any body help clear up how I would create a serial bus to act like a N way multiplexer? thanks for any info.

Comments

  • PJAllenPJAllen Banned Posts: 5,065
    edited 2006-01-21 01:41
    That's a lot to decipher, J.W.· However, any/all of the STAMP's I/O pins can be programmed/used for SERIN/SEROUT (P0-P15) as well as the "SIN" and "SOUT" (Programming) pins.· I think it's best to use P0-P15 and interface between them and RS-232 using a MAX232,·leaving the latter two for programming (Editor interface) only.
  • justin weberjustin weber Posts: 36
    edited 2006-01-21 09:49
    So I'm to assume that any of the stamp i/o pins can be used as serial, but only two of them are set up to recieve the 5v TTL levels. For more ports I would need to add a max232 chip? Or if I get serial "modules" I would would be able to directly connect tx and rx to the pins and use the serin, serout statements because I wouldn't need to worry about harmful voltages like the 12V PC port? Sorry the above post made sense to me while I was looking at a schematic for a two joystick input, but I quess that it would be confusing for anybody else. my bad.
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2006-01-21 15:00
    No, all of the STAMP I/Os (P0-P15) are TTL, likewise the STAMP Programming pins (SIN & SOUT).· They all do serial --·TTL serial.· If you want the STAMP serial to conform to RS-232 levels (to communicate with PCs and/or other RS-232 [noparse][[/noparse]+-12V] devices) then you will need/require a MAX232 to interface between them.
    justin weber said...
    ...if I get serial "modules" I would would be able to directly connect tx and rx to the pins and use the serin, serout statements because I wouldn't need to worry about harmful voltages like the 12V PC port?
    Yes, exactly.
Sign In or Register to comment.