Re: Is it possible to interpret non-standard serial data with PicBasic (sample attach
This, to me, is the classic problem of how to tell (program) your micro controller to recognize and interpret the pattern.
The human brain combined with an eyeball can recognize it... now you just need to figure out how to translate that into code.
I would start by watching for the start pulse, which is longer than the other pulses. Then keep track of the width of the following pulses (or the width of the "low" part. Then watch for one or more extended "low" pulses.
Since you only need to differentiate between 0 and any other number/key press, then just watch for an extended "low" in a given time period after the extended "high" start pulse. If in the given time period you do not get any extended "low" pulses then the digit is "0" other wise if you get an extended "low" pulse then the keypress was non-zero.
Since the quantity of pulses in each character is always 34 then you should be able to just set up a counter to increment whenever the pulse is low and stop incrementing when the pulse goes back high. Then if the counter has incremented above a certain threshold then that particular "low" pulse was a "wide" one and indicates a non zero digit. (I hope that makes sense)
I believe it is easily do-able. you just need to distill it down to how to detect the extended low pulse that indicates a non-zero digit pressed.
that is how I would attack the challenge.
Last edited by Heckler; - 8th July 2016 at 15:13.
Dwight
These PIC's are like intricate puzzles just waiting for one to discover their secrets and MASTER their capabilities.
Bookmarks