PDA

View Full Version : measure time betwen pulses? Heat?


DonR
07-12-05, 10:16 PM
Hello,
Please forgive the newbie questions. There will surely be more.

So happy, I finally figured out how to make LEDs blink in Isomax - sounds simple, but there are a few procedures that can't be ignored. The examples in the docs don't work if you do it wrong (duh) and it's not exactly fool-resistant.

And, before I start, the tiny regulators on the PlugaPod get quite warm in operation (no peripherals) - would it make sense to use the development board regulators for now, since they appear to be rated higher? I know, no damage either way, just wondering...


Anyway...
Flush with success, I now want to be able to count the 'time' between two pulses on an input pin, and I'm looking for hints on the best way to accomplish that.

Wat I want to try is to be able to count and display (somewhere) how short of a time I can move a wire onto a pin (first pulse starts), then off (first pulse ends, start counting) then back on again (second pulse starts, stop counting) and display.

I was thinking of something like TCFTICKS, but I can't see how to reset that to zero after taking a measurement, at least not without starting Isomax again. Maybe a loop variable, changing state when the first pulse ends and reading the value at the start of the second pulse? 100 Hz is too coarse for the final product, but OK for now. Maybe SET-PWM-IN and GET-PWM-IN ?? For display, I haven't a clue, I am just getting the concept of the stack and feel confident I could pop something off the stack and use it, but not sure how to 'display' it (say, to NMITerm)

Any suggestions to head me off in a good direction would be welcome.

The ultimate application has a series of three 0.15 msec pulses, varying from 0.7 to about 2 mSec apart, every 10 msec or so, and I need to read the time between pulses 1 and 2 and between 2 and 3, and then act upon those values (no need to see them). But, that comes much later - right now I'm still trying to get my head around Isomax.

Thanks,
Don R

Dave
07-13-05, 10:39 AM
There are a couple of related code examples that might be a place to start. The simplest reads an accellerometer pulse here : http://www.newmicros.com/isopod/appnotes/adxl202.txt
to find out the width of a pulse output.
The second also involves an accellerometer, but shows more timer interaction :
http://www.newmicros.com/isopod/appnotes/Memsic_Tilt_Sensor.txt
which shows methods of setting up timers. It might be helpfull to read through the DSP56F8xx user manual in the timer section to see how these settings can be used for rising and trailing edge detection, to get the type of timing being looked for.
Additionally, the Polaroid and Devantech sonar examples also make use of pulse timing, and may be closest to what is trying to be done.

nmitech
07-13-05, 10:47 AM
Don,

This appnote has the example for pulse measuring. Please see the PWM INPUT section for detail,
http://www.newmicros.com/store/product_manual/IOglossary.pdf
You can also find many related posts by searching the forum with the word "measure".


For display, I haven't a clue, I am just getting the concept of the stack and feel confident I could pop something off the stack and use it, but not sure how to 'display' it (say, to NMITerm)

. ( display a signed integer )
U. (display a unsigned integer )


And, before I start, the tiny regulators on the PlugaPod get quite warm in operation (no peripherals) - would it make sense to use the development board regulators for now, since they appear to be rated higher? I know, no damage either way, just wondering...

Higher voltage will power the circuit. Kinda like connecting two batteries in parallel. I think it's ok.