chipKIT® Development Platform

Inspired by Arduino™

Configuring Fubarino Mini Serial Comms to 7O1

Created Fri, 01 Dec 2017 12:37:46 +0000 by JRVeale


JRVeale

Fri, 01 Dec 2017 12:37:46 +0000

I'm working on a project that requires one of my serial channels to be configured as 7O1. The project was originally developed on an Arduino Mega where this was a simple case of Serial1.begin(19200,SERIAL_7O1);. I'm now moving the project on to use a Fubarino Mini (having never used one before) and find that attempting to configure the Serial channel in this way throws an error (that SERIAL_7O1 was not declared).

Does the Fubarino Mini not natively allow serial configurations other than 8N1 or am I missing an easy way to configure this? If not, are there any simple workarounds?

Thanks


majenko

Fri, 01 Dec 2017 13:08:18 +0000

The PIC32 UART hardware doesn't natively support 7O1 communications. That's not to say it's not possible though - you just need to do it manually.

7O1 is 8 bits of data where one of them is odd parity. So you can use 8N1 communication and manually set the 8th bit to be the correct parity. A bit of a hassle, yes, but could be done with a simple wrapper.

Ideally I'd like to implement it in the HardwareSerial class sometime (if you're feeling adventurous you could have a go...) but that'd be for another day for me, since I have higher priority jobs right now...


JRVeale

Fri, 01 Dec 2017 13:12:03 +0000

Thanks for the reply - that all makes sense to me.

Sadly that level of adventure is a bit beyond me for the present.

Better news for me is that the dodgy bit of kit I'm communicating with is not limited to 7O1 as I thought it was, so all's well that ends well.