Basic help with Full-Duplex Serial Driver v1.2
BrainBlank
Posts: 3
I am trying to use the built in USB port on the Propeller Proto Board USB.
Here is my .spin program:
OBJ
Com : "FullDuplexSerial"
PUB Main
Com.start(31, 30, %0000, 9_600)
repeat 'Echo forever
Com.tx($00)
Com.stop
Doing this sends 0x80 over and over to the receiving terminal on the PC.
What am I missing?
Some more info.
To test that the port was actually working and normal data could be recieved I loaded the FemtoBasic_PropTerminal. This works great. Even using something other than the PropTerminal that is able to not assert DTR.
Here is my .spin program:
OBJ
Com : "FullDuplexSerial"
PUB Main
Com.start(31, 30, %0000, 9_600)
repeat 'Echo forever
Com.tx($00)
Com.stop
Doing this sends 0x80 over and over to the receiving terminal on the PC.
What am I missing?
Some more info.
To test that the port was actually working and normal data could be recieved I loaded the FemtoBasic_PropTerminal. This works great. Even using something other than the PropTerminal that is able to not assert DTR.
Comments
Use the crystal on the Protoboard by including this in your program:
CON
_clkmode = xtal1 + pll16x
_xinfreq = 5_000_000
CON
_clkmode = xtal1 + pll16x
_xinfreq = 5_000_000
Did you properly indent the com statemnts after the repeat?
I hope this helps!
Since I am kinda new to the Prop I was not aware of these things.
Here is my updated code for anyone else who wants to see a working sample:
A delay or count is needed. This little repeat can execute quite a few times before the first byte is sent at 9600. You might be blowing the buffer.
Just for fun, try a sequence of different bytes, maybe $00 to $0F and see what that sends. It might help you find out if something else is writting into the transmit buffer. If one or two of the sent bytes are wrong but the rest are right then it's a good indicator of memory problems.