Hi!
I was making a program with tx and rx, Uart.
In this att. program when I use this in FC9 the display is filling the display up with strange sign, run all the time. I try yo make the same examble in FC8 it work and waiting, when data is comming in it´s ok?
What am I doing wrong please?
Br Jorgen
Uart!
-
- Posts: 777
- http://meble-kuchenne.info.pl
- Joined: Thu Dec 03, 2020 8:25 pm
- Location: Denmark
- Has thanked: 670 times
- Been thanked: 174 times
Uart!
- Attachments
-
- Same FC8.fcfx
- (10.34 KiB) Downloaded 96 times
-
- RS232_ExampleRX2 Fc9.fcfx
- (13.05 KiB) Downloaded 107 times
-
- Valued Contributor
- Posts: 1462
- Joined: Wed Dec 09, 2020 9:37 pm
- Has thanked: 136 times
- Been thanked: 713 times
Re: Uart!
Hi Jorgen, another suggestion is to print in as a number instead of using PrintAscii (note that only characters >= 32 (ascii for space) will show on the display.
An interrupt to receive input would have less chances of 'missing' input.
Martin
An interrupt to receive input would have less chances of 'missing' input.
Martin
-
- Matrix Staff
- Posts: 1920
- Joined: Wed Dec 02, 2020 11:07 pm
- Has thanked: 622 times
- Been thanked: 645 times
Re: Uart!
Hi Jorgen.
I have looked into this now.
The reason is that within RS232 properties there is an option to select Return of 8bits or 16bits.
If 16bits then the valid numbers are 0 to 255, therefore 256 is returned for no data.
With the variable set as a byte type, it can't go up to 256, therefore it's rolled over to 0
If you change Return to 8 bits, then 255 will be returned for no data.
Therefore you can revert back to
I have looked into this now.
The reason is that within RS232 properties there is an option to select Return of 8bits or 16bits.
If 16bits then the valid numbers are 0 to 255, therefore 256 is returned for no data.
With the variable
Code: Select all
in
If you change Return to 8 bits, then 255 will be returned for no data.
Therefore you can revert back to
Code: Select all
If: in < 255
Martin
-
- Posts: 777
- Joined: Thu Dec 03, 2020 8:25 pm
- Location: Denmark
- Has thanked: 670 times
- Been thanked: 174 times
Re: Uart!
Hi Martin!
Well spottet
I change to 8 bit and Print number, now nothing happend before I receive data and now it work perfect.
why had I not seen it you are brilliant
Concerning the interrupt, I know this will be better. This was my first test in a project for IR remote control.
Yes, you will say, " IR remote control and RS232" make no sense
Do you know these: https://www.ebay.com/itm/303292076882?h ... SwR91dhX9T
Work perfect an very easy to use the data which coming out and can be used.
Thank´s again again again Martin & Martin
Br Jorgen
Well spottet

why had I not seen it you are brilliant

Yes, you will say, " IR remote control and RS232" make no sense

Work perfect an very easy to use the data which coming out and can be used.
Thank´s again again again Martin & Martin
Br Jorgen