I need coding help with the analysis of an arbitrary waveform. As usual for me, it was not difficult to prep the waveform in hardware so it is presented in a clean ttl level (0 to 5 V) format to be analyzed by a 28X2 PICAXE running at 64 MHz. However, after that things fall apart.
I'm attempting to verify that the incoming waveform looks like a short pulse burst at approximately 150 kHz that is followed by a dead time of approximately 10 seconds, then repeats. In order to verify this I'd like to be able to read the frequency and duration of the pulse burst and the duration of the logic low dead time to within about 5% and display that info on a serial LCD.
I have a 16 MHz xtal that I will carefully trim so I have an accurate 64 MHz clock to do the counting and timing with.
While I'm a pretty good hardware tech, my coding skills are very weak so far, and this difficult piece of code is clearly beyond me at this point. I've been reading up on interrupts and setting counters, as I expect that's what will need to be done in order to pull out the necessary info to send to the display.
If one of the forum's coding experts could walk me through the process of how to do this analysis (assuming a 64MHz PICAXE is even fast enough to do the job) it would be much appreciated, as I'd like to be able to do more such analysis on my own in the future.
EDIT: PICAXE choice updated from 20X2 to 28X2 per comment #2 below.
I'm attempting to verify that the incoming waveform looks like a short pulse burst at approximately 150 kHz that is followed by a dead time of approximately 10 seconds, then repeats. In order to verify this I'd like to be able to read the frequency and duration of the pulse burst and the duration of the logic low dead time to within about 5% and display that info on a serial LCD.
I have a 16 MHz xtal that I will carefully trim so I have an accurate 64 MHz clock to do the counting and timing with.
While I'm a pretty good hardware tech, my coding skills are very weak so far, and this difficult piece of code is clearly beyond me at this point. I've been reading up on interrupts and setting counters, as I expect that's what will need to be done in order to pull out the necessary info to send to the display.
If one of the forum's coding experts could walk me through the process of how to do this analysis (assuming a 64MHz PICAXE is even fast enough to do the job) it would be much appreciated, as I'd like to be able to do more such analysis on my own in the future.
EDIT: PICAXE choice updated from 20X2 to 28X2 per comment #2 below.
Last edited: