Help with RS232C on SX28
John Whitfield
Posts: 42
I was wondering if anyone knew of a good method for doing RS232C communication using the SSX28?
Comments
Help us minimize covering all the possibilities. What are trying to do? Does it involve multi-drops (more than two devices on the network, usually a master-slave setup)? Can you do assembly, or do you prefer BASIC? Are you aware Ubicom has several Virtual Peripherals? One of these is an 8-channel UART!
Later!
kenjj
If you care to use the SX/B compiler, there is SERIN and SEROUT commands.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"SX-Video·Module" Now available from Parallax for only $28.95 http://www.parallax.com/detail.asp?product_id=30012
Product web site: www.sxvm.com
"It's not getting what you want, it's wanting what you've got."
·
http://www.parallax.com/detail.asp?product_id=28138
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
http://www.sxlist.com/techref/io/serial/RCL1.htm
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
---
James Newton, Host of SXList.com
james@sxlist.com 1-619-652-0593 fax:1-208-279-8767
SX FAQ / Code / Tutorials / Documentation:
http://www.sxlist.com Pick faster!
It seems most of the LCD control programs out there are for the hitachi compatible 4 pin and 8 pin LCDs.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
TXCHAR:
· temp1 = __PARAM1
· IF __PARAMCNT = 1 THEN
··· temp2 = 1
· ELSE
··· temp2 = __PARAM2
· ENDIF
· DO WHILE temp2 > 0
··· SEROUT Sout, Baud, temp1
··· DEC temp2
· LOOP
· RETURN
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
-John Whitfield
GND = pin 5
+11V = pin 4
input = pin 3
output = pin 2
-11V = pin 7
It is not necessary to connect the other pins when using a computer with realterm to send and receive data from the device. The only thing that is confusing is that realterm must be set to flow control rs485 to send and receive data, yet the voltages appear to be rs232C, the devices manual claims it is rs232C, and the logic analyzer only shows changes on it the input and output pins, the other voltages appear to be constant.
When no data is being sent across the input pin (3) its voltage is -11V, and when no data is being sent the output·pin (2) its voltage is -3V. I tried just setting the constant voltage pins to those voltages, and then running the input and output pins through a max233, just to·see if I can get it to work under the no flow control mode of the terminal program.·If anybody has any ideas I could really use some.
in the code you have posted, you use instructions like
not TxHigh1
not TxLow1
for negated output, and in Transmit1, you use
movb TxPin1, TxLow1.6
twice (once on the negated data, and one more time after negating TxLow1 again).
IMO, this can't work properly.
I would remove the not instructions and use
movb TxPin1, /TxLow1.6
for negating the output, instead.
In Transmit2, you only have one
movb TxOin2, TxLow.6
instruction plus not instructions before and after the movb. Again, I would remove the not instructions, and use
movb TxOin2, /TxLow.6
when yoou need inverted output.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Greetings from Germany,
G