DEBUGIN, DEBUG miscommunication?
lednakashim
Posts: 2
I'm trying to get a simple echo program working to debug the communication errors in my larger program.
For slow single digit input this program works, but when I try to copy and paste a paragraph into the terminal I get out a lot of garbage.
Using a terminal (termite) if I transmit the following text
My serial settings look like:
' {$STAMP BS2} ' {$PBASIC 2.5} val Byte Word MAIN: DEBUGIN val DEBUG val GOTO MAIN
For slow single digit input this program works, but when I try to copy and paste a paragraph into the terminal I get out a lot of garbage.
Using a terminal (termite) if I transmit the following text
Lorem ipsum dolor sit amet, vidisse mandamus eum cu, no nec graece iracundia. Eu mea quod wisi, stet deleniti te mei. Modo praesent qui eu, quando luptatum conclusionemque quo cu. Graeci verear adipisci id per, option complectitur ius ea.I get out
L[0F]re-@ip[03]um dolkr it[00]am!t,[00]pi$iss m!nd[01]Úu#@e5Ò caX [0E]Ò nAc [03]äa%Æe ÒraÆunia* E!@m%a q!Þd[00]îi#i, [01]te @d[05]Ðe.Òti@te Úe)T M)do prAÂseÔt [02]ui eu,@q5Ând[0B] l[01]pt[01]èu-@coÔcl[01]si/je-Âue@qu+@ceT G`Âe#Ò [06]ÂreÂr [01]Èi iscÒ i p[05]ä, pt Þn[00]com le#èi$qr us@ea*þ
My serial settings look like:
Comments
Regarding the errors, remember that the BS2 is not very fast. DEBUGIN and DEBUG operate at 9600 Baud and the setup time for each of those statements is at least several hundred microseconds, enough for the DEBUGIN to miss a character often which is what you're seeing. You're probably not going to get this sort of loop to work over 2400 Baud which you can use by using SERIN and SEROUT instead of DEBUGIN and DEBUG. SERIN and SEROUT can be used with port 16 which is the PC port although data sent from the PC to the BS2 will be echoed back to the PC just like with DEBUGIN and DEBUG.
For example,