![]() |
Forum Index : Microcontroller and PC projects : serial issue in picomite 5.0704
Author | Message | ||||
jovian Regular Member ![]() Joined: 16/04/2017 Location: AustraliaPosts: 63 |
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: AustraliaPosts: 982 |
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: NetherlandsPosts: 5030 |
? #1,CHR$(A) becomes ? #1,CHR$(A); PicomiteVGA PETSCII ROBOTS |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |