View Full Version : FullDuplex Serial
10-18-2006, 03:30 AM
I have wired a bluetooth chip to my propellor board and I am trying to use it to send and receive data between it and my PC.· I can send data from the propellor and receive it fine on the PC.· But when I send data from the PC and try to reroute it back to the PC i get jibberish.· Any ideas.· Thanks in advance.
10-18-2006, 03:59 AM
You will have to provide much more information about what you've done so far including information about the Bluetooth interface, its connections and what your program looks like, particularly where the serial communication is initialized and the part that deals with the actual communication. Without more information, all we can do is say "I don't know. It ought to work".
10-18-2006, 04:21 AM
I am using the propeller demo board.· I have P4 wired to xmit and P5 wired to rcv and power and ground.·· The bluetooth device I am using is the BlueSMiRF http://www.sparkfun.com/commerce/product_info.php?products_id=582.· My init code for the serial object is
depending if I use the Simple or Full object.
I can send strings and bytes to the PC without a problem.· I put in a very simple loop
· byte Tag
··· Tag := sp.rx·· ' or rxcheck when using the full object
to echo chars sent from the PC to the propeller back to the PC.· The chars always come back as jibberish.·
I have used this same device with a PIC 16F877A, wired the same way and didn't have any problems.·
10-18-2006, 04:36 AM
I can see why the FullDuplexSerial object doesn't work. You have the receive end on the Propeller working with an inverted signal (the mode parameter is "1" when it should be "0"). The Simple_Serial object ought to work.
10-18-2006, 10:05 AM
I am running a Seetron SG12032 that requires a inverted tx.
I am using mode=%0010
10-18-2006, 10:09 AM
You're running a Seetron which does require the inverted tx, not a Bluetooth adapter which doesn't.
How's the Seetron display working?
10-18-2006, 06:52 PM
Is working fine.
10-18-2006, 09:43 PM
Thank you very much.· It works beautifully now for FullDuplex.
10-18-2006, 09:49 PM
Mike, since I am running the OS system with the simulation object, would Full Duplex give me anything I don't have now?
Don't have VGA?
10-18-2006, 10:02 PM
The FullDuplexSerial object provides these advantages over the Simple_Serial (or similar) routines in SPIN:
1) Speed. SPIN can handle 19.2KB for sure, maybe a little faster. Assembly can handle well in excess of 1MB
2) Full-Duplex. SPIN routines are half-duplex (one direction at a time). You could use two cogs in SPIN to get full duplex.
3) Buffered. The assembly routines provide full-duplex buffered (16 bytes each direction) serial I/O and run in their own cog in parallel with other operations. The SPIN routines are part of the main processing thread unless moved into their own cog.
4) The assembly routines have a few minor features (see the description of the mode value) that the SPIN routines don't have.