Configuring Fubarino Mini Serial Comms to 7O1

Post Reply
JRVeale
Posts: 2
Joined: Fri Dec 01, 2017 1:25 pm

Configuring Fubarino Mini Serial Comms to 7O1

Post by JRVeale » Fri Dec 01, 2017 1:37 pm

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

User avatar
majenko
Site Admin
Posts: 2179
Joined: Wed Nov 09, 2011 7:51 pm
Location: UK
Contact:

Re: Configuring Fubarino Mini Serial Comms to 7O1

Post by majenko » Fri Dec 01, 2017 2:08 pm

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...
Why not visit my shop? http://majenko.co.uk/catalog
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".

JRVeale
Posts: 2
Joined: Fri Dec 01, 2017 1:25 pm

Re: Configuring Fubarino Mini Serial Comms to 7O1

Post by JRVeale » Fri Dec 01, 2017 2:12 pm

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.

Post Reply