I would like to slap my Psion 3a ( :shock: ) running a VT100 terminal emulator to a 16F872 (ok, I would be using a Max232 with the PIC to do the serial stuff). What I have in mind is to be able to check and change variables in my program from the Psion. To do so, I thought on creating a kind of parser in the code in the PIC to handle the commands: for instance, if I typed "get A" and pressed return, the output would be something like
A = 42
OK>
AFAIK, one way (conceptually speaking since I do not know if it would fly in PIC/BASIC) to achieve that is to create a buffer to hold X characters and read the last X characters comming off the serial port up to a carriage return (or whatever is put out when you hit the enter key) and then start looking for the right patterns). Is that the best way to do this in this PIC? Would it be a better way to do so? Has any of you done something similar and could show me some pointers?
Also, I was planning on doing that in PIC/BASIC as opposite to assembly because the last time I used assembly was in a ZX80. Would it be a bad idea to use BASIC?
A = 42
OK>
AFAIK, one way (conceptually speaking since I do not know if it would fly in PIC/BASIC) to achieve that is to create a buffer to hold X characters and read the last X characters comming off the serial port up to a carriage return (or whatever is put out when you hit the enter key) and then start looking for the right patterns). Is that the best way to do this in this PIC? Would it be a better way to do so? Has any of you done something similar and could show me some pointers?
Also, I was planning on doing that in PIC/BASIC as opposite to assembly because the last time I used assembly was in a ZX80. Would it be a bad idea to use BASIC?