Pages: [1]   Go Down
Author Topic: timer1 counter with inductive proximity sensor npn no  (Read 593 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!

Brunsbüttel, SH, F.Rep.GERM
Offline Offline
God Member
Karma: 4
Posts: 596
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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...

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?


Pages: [1]   Go Up
Jump to: