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

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

$
0
0
When using "Input" command, the ending chars on sending and receiving side must be the same. A terminal sends CRLF on the end of the message. (CR = ascii 13 , LF = ascii 10) So when receiving from a terminal, you have to use Config input = CRLF. Command "Print" sends CRLF as well (on my Bascom 1.11.9.1 demo) But for connection between two Avr's I use this for sure: [code:1:477317baa3] '''''''' 'SENDER '''''''' Dim Str1 As String * 12 Str1 = "ABC#" Do ' force to send only CR on the end Print Str1 ; : Printbin 13 ' sends 41 42 43 35 13 Wait 2 ' A B C # CR Loop End '-------------------------------------- '''''''' 'RECEIVER '''''''' Dim Str1 As String * 12 ' set input for CR Config Input = Cr , Echo = Noecho Do If Ischarwaiting() = 1 Then Input Str1 Noecho ' str1 = "ABC#" End If Loop End [/code:1:477317baa3]

Viewing all articles
Browse latest Browse all 20599

Trending Articles



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