I have managed to make a really cool design that is perfect for testing the PIC16F877-20/P is getting what I send it. it simply echo's back to the PC what Is recieved at 19,200 on a 20MHZ clock.
ok, so this is great and runs sweat, even have several subroutines to act upon the data/codes I send the PIC.
Now I have a short and simple problem and am sure the answer will be very obvious so here goes.
HSERIN [WAIT("*TEST"),STR in_ctl\11\"*"]
in-ctl is an array that can contain upto 24 characters, the question is how can I know if it only has 6, 7 10 20 etc...
input string examples:
TESTABCDEF! in-ctl contains 7 characters
TESTABCDEFGHI! in-ctl contains 10 characters
TESTABC! in-ctl contains 3 characters
I want to do this so I can have a loop similar in practice to this syntax:
AR = arreycount(in-ctl)
do
.
. some code
.
X=X+1
loop until X = AR
Andy
Bookmarks