poor man's serial I/O
Would the following work without damaging the sx chip?
VCC=5V
tx pin o
+---- RS232 serial out (-10V/+5V)
················· ·|
············· ··[noparse][[/noparse]4.7k]
··············· ·· |
rx pin o---[noparse][[/noparse]22k]---+---- RS232 serial in (-10V/+10V)
The tx pin is input for -10V·serial output
The tx pin is·high output for·+5V serial output
(eg. tx pin switches between input and high output)
Or should I increase the 4.7k?
This is for a half duplex connection where sx initiates communication.
regards peter
Post Edited (Peter Verkaik) : 2/13/2007 11:27:32 PM GMT
VCC=5V
tx pin o
+---- RS232 serial out (-10V/+5V)
················· ·|
············· ··[noparse][[/noparse]4.7k]
··············· ·· |
rx pin o---[noparse][[/noparse]22k]---+---- RS232 serial in (-10V/+10V)
The tx pin is input for -10V·serial output
The tx pin is·high output for·+5V serial output
(eg. tx pin switches between input and high output)
Or should I increase the 4.7k?
This is for a half duplex connection where sx initiates communication.
regards peter
Post Edited (Peter Verkaik) : 2/13/2007 11:27:32 PM GMT
Comments
The protection diodes in the SX will not allow the RS232 serial out to reach -10V.
About -0.7V is as low as it will go.
Bean
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cheap used 4-digit LED display with driver IC·www.hc4led.com
Low power SD Data Logger www.sddatalogger.com
SX-Video Display Modules www.sxvm.com
Stuff I'm selling on ebay http://search.ebay.com/_W0QQsassZhittconsultingQQhtZ-1
"USA Today has come out with a new survey - apparently, three out of every four people make up 75% of the population." - David Letterman
See attached schematic.
With the given resistor values, I did not have a hardware echo when
sending data from pc to sx28.
I used a usb2ser cable for the pc com port.
Also attached my test program.
regards peter
Post Edited (Peter Verkaik) : 2/15/2007 11:16:45 AM GMT
I'm surprised the "INTERRUPT 1000" didn't mess-up your timing. Maybe because it's an empty interrupt routine. But I'm sure it slowed it down somewhat.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cheap used 4-digit LED display with driver IC·www.hc4led.com
Low power SD Data Logger www.sddatalogger.com
SX-Video Display Modules www.sxvm.com
Stuff I'm selling on ebay http://search.ebay.com/_W0QQsassZhittconsultingQQhtZ-1
"USA Today has come out with a new survey - apparently, three out of every four people make up 75% of the population." - David Letterman
I created the SX/B file using another file as framework. I just cleared the interrupt routine
and didn't give it any thought. I have removed the interrupt routine·and also tried hyperterminal.
Hyperterminal·does not receive chars correctly. At 1200 baud, no parity, 8 databits, no handshake,
I receive graphic symbols. When using the basic stamp debug window,·using the same comport
after closing hyperterminal, I receive all uppercase letters when I·type lowercase letters, as it should.
Looks like my hyperterminal timing is a bit off.
Any thoughts why I don't see·a hardware echo?·I really expected that due to
the 4k7 resistor between TXOUT and RXIN. And before you ask, the "echo off" option
in the basic stamp debug window is unchecked.
Edit: just found out why hyperterminal received corrupted chars.
When I enable the RTS line, then I also receive corrupted chars using
basic stamp debug window and another terminal program called serialsniffer.
Turning off RTS solved that issue. Unfortunately, hyperterminal simply enables
RTS when connecting and you cannot turn it off.
I suspect my cable is the real cause for this behaviour.
regards peter
Post Edited (Peter Verkaik) : 2/15/2007 5:09:37 PM GMT
I've had problems with hyperterminal at 4800 baud too. 2400 baud seems to works fine, but for me 4800 baud did not work.
If the stamp debug window works, then that means it's working. Don't trust hyperterminal.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cheap used 4-digit LED display with driver IC·www.hc4led.com
Low power SD Data Logger www.sddatalogger.com
SX-Video Display Modules www.sxvm.com
Stuff I'm selling on ebay http://search.ebay.com/_W0QQsassZhittconsultingQQhtZ-1
"USA Today has come out with a new survey - apparently, three out of every four people make up 75% of the population." - David Letterman
I just edited my prevoius post.
You are right, hyperterminal is not to be trusted.
regards peter