questions about one wire RS232

Status
Not open for further replies.

Dr_Doggy

Well-Known Member
I got my gps from parallax, here is the tech data iv been reading:

NEW LINK! :

https://www.google.ca/url?sa=t&sour...sg=AFQjCNG7eRPmwN8t49mA5V6C6bOZn2yclw&cad=rja

RAW mode works good but there is alot of data, so I am trying to get smart mode to work with the pic.

so basically what i get is that I pull the smart pin high, then send "!GPS", then a byte # from 0-9, to the device @4800baud 1 s/s no parity, non-inv, I'v read the rs232 tutorials but get the inversions confused, maybe this is my problem.......

based on those requirements my TX line should be high while idle, start bit is bit-off, 8data bits 1 = on, stop bit is on, ( right:"??? )

THE data in my code works to RX data from midpoint to end (if in raw mode), but as I add the "senddata" subroutines in smart mode I get no responses.......



;Chip Settings
#chip 16F886,8
#config MCLRE=OFF, OSC=INTOSCIO

'portc.3 = raw (off = auto;;on = manual(smartmode))
'portc.4 = datapin
'portb.7 data TO pickit
'portb.6 data FROM pickit
'portb0-3 led indicators
Set PORTB.3 On
Set PORTC.3 On
Dir PORTC.4 Out
Set PORTC.4 On
Wait 3 s
BEGINING:
SENDDATA 21
SENDDATA 47
SENDDATA 50
SENDDATA 53
SENDDATA 0
Dir PORTC.4 In
MIDPOINT:
If PORTC.4 = 1 Then
Set PORTB.7 On
Set PORTB.2 On
Else
Set PORTB.7 Off
Set PORTB.2 Off
End If
Goto MIDPOINT

Sub SENDDATA (In VALUE)
Set PORTC.4 Off
Wait 200 us
Repeat 8
Rotate VALUE Right
If STATUS.C = 1 Then
Set PORTC.4 On
Else
Set PORTC.4 Off
End If
Wait 200 us
End Repeat
Set PORTC.4 On
Wait 200 us
Exit Sub
End Sub
 
Last edited:
The datasheet you referenced is a broken link there's nothing to look at. I think you may be confused about the signaling protocols going on here. There is no such thing as one wire RS232, they're VERY different from an electrical perspective.

If you can post a valid link to the PDF in question we might be able to help.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…