Handling asynchronous data input

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 4.
To post in this forum you must have a registered copy of Flowcode 4 or higher. To sign up for this forum topic please use the "Online Resources" link in the Flowcode Help Menu.

Moderator: Benj

Post Reply
dswheeley
Posts: 10
Joined: Tue Mar 20, 2012 9:35 am
Contact:

Handling asynchronous data input

Post by dswheeley »

Hi, Happy New Year to all.

I am a hardware engineer, and have been using Flowcode V4 for a couple of years. I now need to tackle a new concept for me and I'm looking for some advice.

Essenitally I have an RF receive module from which I need to accept data and handle within a PIC. The RF module will provide asynchronous data at the same data rate at which it receives it. This rate will vary from about 3kps to about 20kbps. The data format (i.e. start, stop and parity bits) will not vary. There will be several data bytes which I will need to store separately and process.

What is the best way to handle this data with the varying data rate? I'm looking at using the PIC16F688 with the Enhanced USART, but can switch to another device if it would make things simpler. As I stated I am a hardware engineer and need to use Flowcode V4 to program the PIc as I'm not familiar with C or other languages.

Thanks in advance for your help, regards.
Darren.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Handling asynchronous data input

Post by Benj »

Hi Darren,

The auto baud functionality is not currently supported by Flowcode.

I think for this to work you need to receive the hex value 0x55 to setup the auto baud, if you can guarantee that this is the first byte when changing baud then you might be ok with just setting up the auto baud functionality using a C code icon to tweak the register values.

Otherwise you might be better off using a software approach and always sampling at the max baud rate and then in software trying to figure out what the baud was. This will be tricky but might be possible.

dswheeley
Posts: 10
Joined: Tue Mar 20, 2012 9:35 am
Contact:

Re: Handling asynchronous data input

Post by dswheeley »

Hi Ben,

I had been hoping to use the auto baud function so the fact that its not currently supported is going to be a bit of an issue. I'll probably take your advice and try to do it and sample at max baud rate then go from there.

Thanks for the input, much appreciated.

Cheers, Darren.

Post Reply