FullDuplexSerial Strange
Xetar
Posts: 10
The following code continuously blinks an LED on pin 14 even with a ground resistor tied to pin 11
PUB Main| data, d
' Serial.Start(31,30,%0101,9600)
Serial.Start(11,10,%0000,9600)
Serial.str(string("TEST"))
Serial.rxflush
dira[14] := 1
repeat
If Serial.rxcheck > -1
Serial.str(string("GOT IT"))
!outa[14]
else
Serial.str(string("?"))
waitcnt((clkfreq / 2) + cnt)
Serial.Stop
repeat
PUB Main| data, d
' Serial.Start(31,30,%0101,9600)
Serial.Start(11,10,%0000,9600)
Serial.str(string("TEST"))
Serial.rxflush
dira[14] := 1
repeat
If Serial.rxcheck > -1
Serial.str(string("GOT IT"))
!outa[14]
else
Serial.str(string("?"))
waitcnt((clkfreq / 2) + cnt)
Serial.Stop
repeat
Comments
I assume you've got a pulldown resistor on your receive pin and you're wondering why FDS seems to continue receiving values.
You've got FDS configured to receive in "normal" mode where the start bit of the data is a zero, the data bits are "true", and the stop bit(s) is a one.
With a pulldown resistor, FDS always sees a zero value on the receive pin and it always sees a start bit when it looks for one. All the data bits that follow are also zeros and FDS doesn't check for a valid (1) stop bit when it's supposed to be there, so it assumes it has a character which is $00 and plunks that into its buffer, then goes to look for another start bit.
Change your pulldown to a pullup (to +3.3V ... Vdd) and FDS will stop seeing characters where there aren't any.
1. I thought the serial line was suppose to hold at 0 volts, and jump up for brief amounts of time to indicate data?
2. What is FDS?
FDS = FullDuplexSerial
There is an inverted mode which is occasionally used, particularly if you're going to use a logic to RS232 driver which inverts the signal.
RS232 uses -3V to -15V for idle (1) and +3V to +15V for active (0). Look at the Wikipedia article on RS232 for details and pictures.
FDS is the buffered serial driver that's included with the Propeller Tool in its object library. It's also downloadable from the Propeller Object Exchange (OBEX).
However since the chip is apparently expecting hi, with dips in the signal, it is just constantly seeing data.
If I set my mode to %0010 then my transmissions from the chip to the computer work fine.
But i can't figure out a setup to allow the prop chip to hear the computer's signal.
What type of logic converter You use on Propeller side?
I mean
> Hardware between Propeller and DB9 on PC side.
You need signal converter as PC's DB9 use voltages between +-5 - +-15V
and that You need convert on Propeller side to Logic voltages that Propeller use ----> 3.3V - OV
Not directly BUT look on this thread Post on SerPlug.
http://forums.parallax.com/showthread.php?t=123551
SerPlug
Look on first picture.
As You can see on it to that needs more as only simple Relay
Theoretically speaking, yeah, I suppose you could. But why bother?
Do the job right the first time. There are three different ways shown at the link. I think there's a fourth somewhere in the documentation that uses only resistors. If you don't have UK spec parts (see the list at the link) use 2N3904 and 2N3906 in place of what's listed.
http://dave.fraildream.net/micro/periph/232-ttl.html