Full Duplex Serial (128byte buffer) - comm parameter settings
wplum
Posts: 6
Looking for tested OBJ for Full Duplex Serial (128byte buffer) with parameters for word length, parity, stop bits. Thanks.
Comments
PropWare contains an unbuffered implementation in C++ that fits your other criteria.
Sorry... I know you were probably hoping for Spin
I posted a version FullDuplexSerial_rr004 in obex that has variable buffer length to 256 (in powers of 2) so you can easily change to 128.
You can find it for example in this post.
Andy
Andy - Thanks for your posting. This should get the polled method of getting data working... if only somehow the parity (E) can be ignored on the prop receiving data.
Any other lights going on for resolution of this problem.
Hardware UART? is there an SPI, I2C chip available?
WPlum
Sorry my previous post was a bit missleading. If you set my object to 9 bits, with Even parity and 2400 Baud then you should be able to communicate with your serial device.
On transmitted bytes (from the Propeller side) the E-parity is inserted automatically so the Serial device is happy. On received bytes the Assembly driver receives 9 bits, but does not check the parity and also does not pass it to the Spin Rx methodes. In fact the parity is just ignored, but the Serial device does not know this and should not have any problems with that.
The reason to not pass the received parity to Spin is that it would need a 9 data bit wide buffer. But we only could make 16 bit wide buffers with 7 bits wasted. Because the receive buffer can be made very big, I dont have implemented wider buffers. And what can Spin do if the parity was wrong? To handle it right the Serial device needs to be informed and it has to resend the byte, but that is only possible withcomplicated protocols. So for a simple object it's the best to not test the parity on received bytes.
Andy
I came on the forum today just to look for a large buffer FDS object, and you're already helping someone with it. Thanks! It's going into my project!
I guess if this was easy someone else would be doing it.
What Browser / Platform do you use?
I have attached now also a ZIP - hope this works.
Andy
http://david.zemon.name/downloads/FD_Serial_Conf.spin
My only guess is that you have something disabled in your browser that keeps for the forum software from resolving the link correctly.
this is a issue with the forum. I complained about this a couple of month ago.
all download links appear with the filename attachment.php on IE as browser.
Since nobody at parallax appears to use Windows and IE it just gets ignored.
Solution is to type in the correct filename and extension while saving the file. Then the download works fine.
Enjoy!
Mike
Changed from IE11 to Firefox and problem not... FD_Serial_Conf.spin downloaded as one would expect. Problem is with Parallax forum & IE11. Just the kind of issues we need eh?
Onward we charge!
Thanks to all (Moderator taking notes?)