ZaeemAhmad
Junior Member level 2
Opto-Switch Interfacing
Hello,
I am basically trying to interface a through-hole IR opto-switch sensor (**broken link removed**) with Atmel 89S51 uC for counting purposes (i.e. I intend it to generate clock pulses when something opaque passes through its slit). I want to connect it to Timer 0 of uC.
1. What circuit should I use to bias the sensor and what components should I place between sensor output and timer 0 input pin?
2. Should I make P3.4 (T0 Pin) high during programming (as it is input), as it will receive external clock signals?
3. Can I output from Port 3 simultaneously while inputting clock signal at Timer 0 (P3.4)?
Thanks!
Hello,
I am basically trying to interface a through-hole IR opto-switch sensor (**broken link removed**) with Atmel 89S51 uC for counting purposes (i.e. I intend it to generate clock pulses when something opaque passes through its slit). I want to connect it to Timer 0 of uC.
1. What circuit should I use to bias the sensor and what components should I place between sensor output and timer 0 input pin?
2. Should I make P3.4 (T0 Pin) high during programming (as it is input), as it will receive external clock signals?
3. Can I output from Port 3 simultaneously while inputting clock signal at Timer 0 (P3.4)?
Thanks!
Last edited: