Problems usin SW Chanel of CAL Uart

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 8.

Moderator: Benj

Post Reply
CSM2711
Posts: 47
Joined: Mon Apr 16, 2018 10:28 am
Location: Germany
Has thanked: 1 time
Been thanked: 9 times
Contact:

Problems usin SW Chanel of CAL Uart

Post by CSM2711 »

Hello,

I have some problem by using the Software chanel of CAL Uart on my PIC16F1827.
When I use the Hardware chanel everthing works fine, after selecting sofware chanel (same Pins) the uart want work.
Does everyone has an Idea?

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: Problems usin SW Chanel of CAL Uart

Post by medelec35 »

Could it be that the UART data is being sent, but the baud is a bit out of tolerance for the terminal?
Do you have a scope to verify this?
Can you post your flowchart, so we can see if anything looks amiss?
Martin

CSM2711
Posts: 47
Joined: Mon Apr 16, 2018 10:28 am
Location: Germany
Has thanked: 1 time
Been thanked: 9 times
Contact:

Re: Problems usin SW Chanel of CAL Uart

Post by CSM2711 »

ok , i have tes with a small testprogramm, it looks like something is wrong with the timitng ......
i will try to measure it.....
Attachments
rs232_1827_on.fcfx
(16.55 KiB) Downloaded 150 times

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: Problems usin SW Chanel of CAL Uart

Post by medelec35 »

I just Send an upper case U and the baud = 1/off (or on) pulse duration.
What you can do if timing is out, is use custom baud and adjust value as necessary.
Martin

CSM2711
Posts: 47
Joined: Mon Apr 16, 2018 10:28 am
Location: Germany
Has thanked: 1 time
Been thanked: 9 times
Contact:

Re: Problems usin SW Chanel of CAL Uart

Post by CSM2711 »

you are absolutly right, it seems to be a problem with the timing.
But why?
Attachments
cal_uart.JPG
cal_uart.JPG (52.21 KiB) Viewed 2961 times

CSM2711
Posts: 47
Joined: Mon Apr 16, 2018 10:28 am
Location: Germany
Has thanked: 1 time
Been thanked: 9 times
Contact:

Re: Problems usin SW Chanel of CAL Uart

Post by CSM2711 »

But the question is, is there any way to get the right timing? And whats the reason for the difference?

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: Problems usin SW Chanel of CAL Uart

Post by medelec35 »

Hi,
CSM2711 wrote:But the question is, is there any way to get the right timing?
I did state how I achieve the correct timing in the above post:
medelec35 wrote:I just Send an upper case U and the baud = 1/off (or on) pulse duration.
What you can do if timing is out, is use custom baud and adjust value as necessary.
So just sendString "U"
All the bits will be then the same duration, so you can measure just one pulse width.
For example, if you require a baud of 9600, If the width of a single pulse is 109.9uS
Then baud = 1/109.8 x 10E-6 = 9107 so you know you need to increase the custom baud rate.
CSM2711 wrote:And whats the reason for the difference?
When you select channel that will be by far the best option.
That is because interrupts are used internally with a dedicated baud generator to generate to correct timing.
With software, the data is bitbanged.

The advantages of using Channel:
Far more accurate.
Interrupts don't interfere like it does with software mode.
You can use RX interrupt to capture incoming data, you can't with software.

I always select Channel over Software if I have a choice.
Martin

Post Reply