USB Serial Receive
Posted: Tue Jun 12, 2012 10:47 pm
I am new to Flowcode, so I appoligize this may be a dumb question.
I am attempting to create a program that uses Hyperterminal to program timing functions in a PIC18f2455. For the most part the functions are working well. I have menu options that are sent from the pic to the terminal and routine allows me to select single menu option using the USBGETSTRING function. It all works fine until I get to the enter time delay routine. Getstring only allows for one character to be entered even when I set the string length to 10. If I use the GETByte function I get the byte then can "see" when enter is pressed, however since the byte are all ascii I cannot assemble them as a string, to create a multidigit number. EX 500 which gives me 53484813. How can I either convert this back to 500, or get the GET STRING function to allow me to enter more then one character within the timeout period.
My latest attempt was to assemble the bytes into a string then figured I can convert the string to an integer.
instportconv = ToString$ (instportstrex[charcntassemble])
instportstr = instportstr + instportconv
Any suggestions.
I am attempting to create a program that uses Hyperterminal to program timing functions in a PIC18f2455. For the most part the functions are working well. I have menu options that are sent from the pic to the terminal and routine allows me to select single menu option using the USBGETSTRING function. It all works fine until I get to the enter time delay routine. Getstring only allows for one character to be entered even when I set the string length to 10. If I use the GETByte function I get the byte then can "see" when enter is pressed, however since the byte are all ascii I cannot assemble them as a string, to create a multidigit number. EX 500 which gives me 53484813. How can I either convert this back to 500, or get the GET STRING function to allow me to enter more then one character within the timeout period.
My latest attempt was to assemble the bytes into a string then figured I can convert the string to an integer.
instportconv = ToString$ (instportstrex[charcntassemble])
instportstr = instportstr + instportconv
Any suggestions.