LPC1768 - Edge Trigger Pulses Over Count

Status
Not open for further replies.

nmit.201

Newbie level 2
Joined
Apr 21, 2011
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,309
Hi,

I have interfaced a pressure sensor which outputs a pulsed output whenever it senses any pressure.(Sensor output is amplified and is compared against a reference voltage and then fed to micro controller)

Sensor is fairly simple, and I have connected this to interrupt pin on LPC1768. I have configured it as an input pin with edge trigger enabled.

But I see number of counts counted inside the interrupt wrong. It is over counting these pulses and I am unable to find the reason for this, even after adding a small debounce for about 10ms this situation remains. Always count is higher than what it was supposed to be.

On a negative edge trigger ISR, Interrupts are disable, pending interrupts cleared, and a hardware timer is used as debounce which re-enabled back interrupt after debounce time.

Saw the output on a oscilloscope and pulses looks correct.

Any pointers?

Regards, Manjunath
 

Hi,

You said you made everything correct.... but we can not verify this.

If you want us to help ... you need to give us the chance to help you by giving us informations we can verify.
* Sensor type and manufacturer
* used supply voltages
* schematic
* code
* expected values - and where does this expectation come from (datasheets, measurement device...)
* measured values
* scope pictures (with all the informations: measurement point at the schematic, X and Y setup...)

***
Sensor output is amplified and is compared against a reference voltage
For me this sounds as you need to measure duty cycle instead of pulse count.


Klaus
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…