Quantcast
Channel: MCS Electronics Forum
Viewing all articles
Browse latest Browse all 20596

BASCOM-AVR : INPUT funcion, Very strange behaviour in serialmatch interru : REPLY

$
0
0
[quote:9ed7d8af05="sunmat"]After several hours testing, I will conclude this with information that there is a bug in serial input procedure.[/quote:9ed7d8af05] After two minutes of checking the code I did conclude that the bug sits in front of your screen. [quote:9ed7d8af05][code:1:9ed7d8af05]1234567890# 1234567890 ... 0A 31 32 33 34 35 36 37 38 39 30 0D 0A [/code:1:9ed7d8af05] So it is clearly visible missing and corrupting data, since each line start and ends with 0A, and missing 23 (#)[/quote:9ed7d8af05] You believe that because of your limited understanding. The charmatch is set to 10, that's LF, so after the first line the first thing Input() gets is this LF, which is the first char out of possible 11 chars, limited by the dimensioning of the string. Input() does not overwrite a string, so there's only space for 10 more In the following another 10 chars are input, which are 1,2,...0, then the string is full, no more chars are added. That's where you assume data corruption and missing #, sic. Btw., the last 0D 0A comes from your Print() and is not part of the input string. Here I stopped thinking about the rest of your nonsense...

Viewing all articles
Browse latest Browse all 20596

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>