Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 05:42 01 Dec 2023 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : serial issue in picomite 5.0704

Author Message
jovian
Newbie

Joined: 16/04/2017
Location: Australia
Posts: 36
Posted: 04:13am 17 Nov 2022
Copy link to clipboard 
Print this post

Hi all

I'm banging my head with serial issues. In doing so I have come across this strange anomoly. If I short com pins Tx and Rx GP12 and GP13 and run the following code, I get exactly what I would expect, a list of ascending numbers and their corresponding ascii characters as returned.

However, if I exchange the input$ line for the one currently commented out, (changing the input buffer to one character long), I get gobbledygook.

Can anyone explain this?

Thanks
Joe

autosave

?"SERIAL TEST ";
?"V1 17 NOV 2022"

SETPIN GP13, GP12, COM1
OPEN "COM1:9600" AS #1


DO
FOR A=0 TO 255
? #1,CHR$(A)
?a,
PAUSE 200
' dat$=input$(1,#1)
dat$=input$(20,#1)
IF DAT$<>"" THEN
? dat$
DAT$=""
end if
NEXT
LOOP
 
OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 837
Posted: 04:40am 17 Nov 2022
Copy link to clipboard 
Print this post

Not thinking too deeply, it is possible that the minimum length of your transmission will be 3 characters long firstly the character that you want to send followed by a CARRAIGE RETURN (Chr$13) and a LINE FEED (CHR$10).

OA47
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 2971
Posted: 11:14am 17 Nov 2022
Copy link to clipboard 
Print this post

? #1,CHR$(A)


becomes

? #1,CHR$(A);

PETSCII ROBOTS for PicoMiteVGA
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2023