high speed interrupt and lcd display.

i have a high speed interrupt generated from an external hardware connected to pin 13 of the arduino. i'm trying to increment and print a counter in the 16x4 lcd display. there is also a keypad that starts and stops the interrupt and also to pause and resume. im using "pulseIn" function to detect the high pulse and increment as well as print the counter. everything works fine for 3-4 times after which the lcd goes blank. can anyone explain the possible reasons? thanks in advance.

Have you forgotten something?

i have a high speed interrupt generated from an external hardware connected to pin 13

Not a pin normally associated with external interrupts (pin change only) so maybe that's your problem?

can anyone explain the possible reasons

The problem is with your hardware, wiring or program As you have provided no details of any of them it is difficult to offer any advice.

i have a high speed interrupt generated from an external hardware connected to pin 13 of the arduino.

im using "pulseIn" function to detect the high pulse

Those two statements do not belong in the same post.

AWOL:
Have you forgotten something?
Not a pin normally associated with external interrupts (pin change only) so maybe that's your problem?

could you explain? why cant pin 13 be used as an external interrupt pin? should i switch that to pin 2?

why cant pin 13 be used as an external interrupt pin?

Because it is not an external interrupt pin on most Arduinos. See attachInterrupt()

Which Arduino board are you using ?

Which Arduino board are you using ?

[/quote]

arduino uno. but i'm not using the attachInterrupt() function. just using the pulsIn function to calculate the width of the high pulse and if the width is below certain microseconds, perform the counter increment and print the value on lcd.

So where does the interrupt come into this scheme?

AWOL:
So where does the interrupt come into this scheme?

initialised pin 13 as input pin. read the pin using digitalread command. there is a sqquare pulse coming into the pin from extternal hardware. use pulsein function on this pin.

I'm a bit short on patience this morning, so I will ask just one last time:

Where does the high-speed interrupt come into this scheme?

nitialised pin 13 as input pin. read the pin using digitalread command. there is a sqquare pulse coming into the pin from extternal hardware. use pulsein function on this pin.

Are you trying to use digitalRead() and pulseIn() on the same pin ?

UKHeliBob:
Are you trying to use digitalRead() and pulseIn() on the same pin ?

no...just pulseIn. My bad..external interrupt is connected to pin 13. pulseIn command is used when the pin goes high. if the returned value is less that specific microseconds, increment as well as display a counter on the lcd screen.

We're up to reply #12 in a topic in the programming section of the forum, and we have yet to see any code or schematic.

external interrupt is connected to pin 13

Which you now know will not work

In reply #8 you said

initialised pin 13 as input pin. read the pin using digitalread command. there is a sqquare pulse coming into the pin from extternal hardware. use pulsein function on this pin.

It still sounds to me as though you are using pin 13 for two things, or at least you are trying to.

How about posting your code and a circuit diagram and details of the mysterious external device that is providing the interrupt signal

G3m:
i have a high speed interrupt generated from an external hardware connected to pin 13 of the arduino. i’m trying to increment and print a counter in the 16x4 lcd display. there is also a keypad that starts and stops the interrupt and also to pause and resume. im using “pulseIn” function to detect the high pulse and increment as well as print the counter. everything works fine for 3-4 times after which the lcd goes blank. can anyone explain the possible reasons? thanks in advance.

Oi! The issue is with line 412 of your code.

G3m:
can anyone explain the possible reasons?

Based on the available information I think your retro encabulator is detuned.

Seriesly, post the code according to forum guidelines and provide a non-fritzing, as-built schematic.