hi all.
I am looking to decode a serial code stream from an old Laserdisc Player controller. I have written a lengthy program already that uses the 'serin' command, its a dirty and imprecise way of doing it, and ultimately its useless and i need to stop and do it properly...
Thing is, i can't get the PICaxe to read the stream in and get the information out of it that i need. I'm using a 28X2..
Briefly, I have this serial command line hooked to an input on the picaxe (say C.2), it sits at 5v most the time, and goes low (to gnd) when its sending the info.
Each command is sent in a series of 11 low-going pulses. Each pulse is 260usec, that seperate the data. So the space between two pulses indicates a 1 or 0. A small space (1.05 mSec) between two pulses indicates a 0. A large space (2.1 mSec) between two pulses indicates a 1.
My initial attempts have been to have this serial input set as a low-going interrupt, which would run a series of 'pulsin' commands set on rising end-triggers.
The idea being that the interupt is triggered when the first pulse is detected, then we measure the time it takes for the next 10 high-going pulses... the resulting bunch of captured signals should show a pattern of long and short counts from which i can decode the meaning..
Except i think that invoking the 'pulsin' command each time is in fact taking its sweet time to do so and its missing the data anyway.
Can anyone suggest anything for reading this fairly quick serial stream? I'm sure im approaching it wrong..
Oh, i did switch to using a 16mhz external resonator as running at 8mhz i think it was just too slow..
many thanks in advance!
I am looking to decode a serial code stream from an old Laserdisc Player controller. I have written a lengthy program already that uses the 'serin' command, its a dirty and imprecise way of doing it, and ultimately its useless and i need to stop and do it properly...
Thing is, i can't get the PICaxe to read the stream in and get the information out of it that i need. I'm using a 28X2..
Briefly, I have this serial command line hooked to an input on the picaxe (say C.2), it sits at 5v most the time, and goes low (to gnd) when its sending the info.
Each command is sent in a series of 11 low-going pulses. Each pulse is 260usec, that seperate the data. So the space between two pulses indicates a 1 or 0. A small space (1.05 mSec) between two pulses indicates a 0. A large space (2.1 mSec) between two pulses indicates a 1.
My initial attempts have been to have this serial input set as a low-going interrupt, which would run a series of 'pulsin' commands set on rising end-triggers.
The idea being that the interupt is triggered when the first pulse is detected, then we measure the time it takes for the next 10 high-going pulses... the resulting bunch of captured signals should show a pattern of long and short counts from which i can decode the meaning..
Except i think that invoking the 'pulsin' command each time is in fact taking its sweet time to do so and its missing the data anyway.
Can anyone suggest anything for reading this fairly quick serial stream? I'm sure im approaching it wrong..
Oh, i did switch to using a 16mhz external resonator as running at 8mhz i think it was just too slow..
many thanks in advance!