Hi E,Morning C,
If you can get a Ring Buffer working, what will be its purpose/advantage in your project program.?
E
Hi E,hi C,
From what I recall about your project, I would say using a ring buffer is pointless, it will increase the complexity of the program and gobble up memory, which is already tight.
E
What is the error?Hi,
I'm still trying to get my program to work. First I'm trying a LINEAR one.
Here it is so far, but it gives errors, that are either my poor programming, or a recurring LEFT STRING, MID STRING problem, I had previously.
Will someone run this through a simulator please, to see if the error still happens, please?
I had to turn OFF/ON the INTERRUPT, and recall, I was advised not to, but it wouldn't do anything otherwise.
ENTER into UART:
$GPRMC,123519,A,4807.038,N,01131.000,W,022.4,084.4,230394,003.1,W*6A?
$QEIDEG,111,W$QEIDEG,222,W $QEIDEG,333,W
$REMOTE,12,20,50,W
C
Hi J,What is the error?
For example all the "REM":s come from Leftstr(...,3) .Hi
Hi J,
The PARSE is giving incorrect readings, Here's what most of them should be:
C
Hi S,Setting PIE1.RCIE=0 does not stop the UART from receiving characters, and eventually causing an overflow if data does come into the UART. The PIR1.RCIF flag still gets set as well, regardless of the RCIE setting. You have to turn off RXSTA.CREN=0 to prevent the UART from processing data and causing an overflow error.
Or, if you are leaving the UART enabled and are going to enable RCIE=1 again, first clear the RX data and error registers, and flags first.
Hi J,For example all the "REM":s come from Leftstr(...,3) .
Look at the manual what Leftstr does.
Hi D,Is the 3x confusing you?
Hi J,The leftmost characters in a string, characters in the middle of a string or the rightmost characters in a string. Each will return different results.
I tested PICBASIC v.7.85 ( pic12f683 ) and found no faults in Leftstr, Rightstr.Hi,
After testing RIGHT and LEFTSTRING, I think there is either a fault in Oshonsoft, or maybe my programming, but I find that MIDSTRING seems to work ok.
I removed CASE and COMMAS and re-wrote the INTERRUPT/PARSE program.
It works mostly, but I think it gives error in certain circumstances. It's a bit difficult for me to actually find where the errors are produced. Anyway, I'll keep trying.
Here is the program:
C.