Hello,
I do not know if this is a bug.
If I make an emulated RS323 transmission, the transmission is OK
if I do the same thing with the management "hardward" time left for the transmission is too short and the transmission is false.
The solution is added after the emission of a character corresponding to a delay time of transmission.
In the example this is a loop that sends 0, 1, 2, 3, 4, 5, 6, .... 0xFF
I'm testing with a PIC 16F1847
RS232 bug or not ?
Moderator: Benj
-
- Posts: 594
- Joined: Thu Sep 17, 2009 7:52 am
- Location: Belgium
- Has thanked: 63 times
- Been thanked: 102 times
Re: RS232 bug or not ?
Could you post your Flowcode file so I can take a look at it ?
It might be an error setting it's baudrate.
- Nicolas
It might be an error setting it's baudrate.
- Nicolas
-
- Posts: 594
- Joined: Thu Sep 17, 2009 7:52 am
- Location: Belgium
- Has thanked: 63 times
- Been thanked: 102 times
Re: RS232 bug or not ?
If you ever have that problem again, post your Flowcode file so we can take a look at it.
I personally never had any issues with the RS232 component.
- Nicolas
I personally never had any issues with the RS232 component.
- Nicolas
- cubitus54
- Flowcode v5 User
- Posts: 110
- Joined: Wed Jun 19, 2013 7:18 am
- Has thanked: 7 times
- Been thanked: 32 times
Re: RS232 bug or not ?
Hello,
I still have a problem of time lag.
UART with hardware
The first CH07 pulse indicates the beginning of sending words on the line, the second pulse CH07 indicates the end of the shipment. (Ch0 is ACK receiver)
The problem is that sends continuous while the instruction is completed.
With the management software, no problem.
In addition, I can not handle receiving ACK ...
The function that generates the frame to call "pixel"
I still have a problem of time lag.
UART with hardware
The first CH07 pulse indicates the beginning of sending words on the line, the second pulse CH07 indicates the end of the shipment. (Ch0 is ACK receiver)
The problem is that sends continuous while the instruction is completed.
With the management software, no problem.
In addition, I can not handle receiving ACK ...
The function that generates the frame to call "pixel"
- Attachments
-
- rs232_soft (1).gif (12.31 KiB) Viewed 5090 times
Flowcode V6.1.2.0(11 05 2015)
-
- Valued Contributor
- Posts: 2045
- Joined: Wed Aug 27, 2008 10:31 pm
- Location: Netherlands
- Has thanked: 553 times
- Been thanked: 1081 times
Re: RS232 bug or not ?
What you are seeing is normal behavior. The hardware continues to send data after the routine has finished because the routine puts the byte to send in the hardware UART and returns while the UART is still sending that byte. The software UART has to set/reset the output signals in software, so it can not return before every bit has been handled.
Regarding the ACK:
Your flowchart is currently set to software UART. This means the controller monitors the signal level of the input. However, due to the delay of 8 milliseconds in pixel, the monitoring begins far too late.
At 9600 bps there is one data byte (1 start bit, 8 data bits and 1 stop bit) every 1,04 milliseconds. As the response is almost immediate after the last byte has been transmitted your receive misses the incoming data by about 7 milliseconds.
Regarding the ACK:
Your flowchart is currently set to software UART. This means the controller monitors the signal level of the input. However, due to the delay of 8 milliseconds in pixel, the monitoring begins far too late.
At 9600 bps there is one data byte (1 start bit, 8 data bits and 1 stop bit) every 1,04 milliseconds. As the response is almost immediate after the last byte has been transmitted your receive misses the incoming data by about 7 milliseconds.
“Integrity is doing the right thing, even when no one is watching.”
― C.S. Lewis
― C.S. Lewis