Error Code 3 when using UART October 24, 2014 10:19AM |
Registered: 9 years ago Posts: 7 |
Re: Error Code 3 when using UART October 24, 2014 11:51AM |
Admin Registered: 11 years ago Posts: 351 |
function check() dim y = 0, x, s$[80] // all local variables should be defined first while y < 1 // MOVED dim x, s$[80] //set variables x for buffer size and s$ string ********** set_uart1 // set_uart1() is better ********** x = comread(1,s$,80,1) //read incoming data on port 1 and place in s$ comouts(2, s$) //output s$ to com2 if s$ = "HELLO" then hello wait(10) endif comouts(1, "Buffer Size = ") comouts(1, x) //output on com 1 size of buffer (variable x) comouts(1, " \r\n") wait(10) comclose(1) wend endf
Re: Error Code 3 when using UART October 24, 2014 12:38PM |
Registered: 9 years ago Posts: 7 |