Go Down

Topic: timer1 counter with inductive proximity sensor npn no (Read 628 times) previous topic - next topic

kwasek

Hi all,
this is my first forum question... I have to build a computer that will:
- count low pulses ( from inductive proximity sensor npn no ) from 0 to 400Hz
- register pushbutton event on hardware interrupt
- send some info via serial port

the thing is that I'm afraid that if I will count low impulses with interrupts, those will cause problems with serial communication when impulses will be about 350-400Hz.

I've read somewhere that it is possible to connect external clock to timer1 and use this timer as a counter. Is it possible to connect this npn no sensor as external clock signal?

thanks in advance!

RIDDICK

1.
the serial communication on pin 0 and pin 1 is done by a dedicated circuit...
but u should keep ur interrupt handler as short as possible... e. g. just incrementing a counter or so...

2.
u could convert the frequency into a voltage and read that voltage with the ADC?
or what is a "sensor npn no"? do u have a datasheet online?
-Arne

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy