The string function in Oshonsoft is non existent.. You need to use a circular buffer..
Create an input buffer that is longer than the incoming string...
Also create two variables to monitor the input
Set an interrupt with the hardware serial port
Once you have received the character you waited for... You can then parse the string...
Create an input buffer that is longer than the incoming string...
Also create two variables to monitor the input
Code:
dim inpbuffer(40) as byte
dim inptr as word
dim outptr as word
Set an interrupt with the hardware serial port
Code:
On Interrupt
Save System
If RCSTA.OERR = True Then
RCSTA.CREN = 0
RCSTA.CREN = 1
Goto fin
Endif
inpbuffer(inptr) = RCREG
inptr = inptr + 1
If inptr = 39 Then inptr = 0
If inbuff(inptr) = 0x2e Then outptr = inptr ; set the Character recognition here
fin:
Resume
Once you have received the character you waited for... You can then parse the string...