PDA

View Full Version : debugin



Darrenmac
- 30th May 2004, 00:04
I am using the dubugin command to send commands to a pic 16f628 from hyperterminal. I am currently storing each character received in a seperate variable then using if then statements checking for the commands, ( 1 character at a time). Is there a way to do this easier.

dubugin[wait("rep"),b0,b1,b2,b3,b4]

Darrenmac
- 30th May 2004, 01:03
I have modified the code to this
DebugIn [wait("rep"),STR b0\2,b1,b2]

but if i send b0 out to hyperterm via debug I only get the first character of the 2 character string
any ideas?

Darrenmac
- 30th May 2004, 01:35
After reading another thread I found a solution. While the variable B0 contains the string simply sending B0 out via debug isnt showing the string, to do this I changed it to debug b0[0],b0[1]
I assume, correct me if I am wrong that if I only send debug b0 then it assumes debug b0[0]

if any one is interested, the thread that I found this on is
http://www.picbasic.co.uk/forum/showthread.php?s=&threadid=95&highlight=strings

Darrenmac
- 30th May 2004, 02:35
have struck another problem.
I now wish to get rid of b2 and put any characters after b0 into var b1 untill a CR is received

In the PBP manual there is STR ArrayVar\n{\c} receive string of n characters optionally ended in character c
Can this be used somehow with 13 (ie CR)

any ideas?