Friends,
i am having problems when i interface my comparator LM324 which is taking inputs from infrared sensors and giving output to the microcontroller. what happens is that without microcontroller the comparator gives good output like 3.6V and 0 V for a high and a low respectively . but when we interface it with a controller i dont know what happens . some people are suggesting that you should have a pull up or pull down resistor at comparator's output. which one should i have pull up or down and why should i have it and we also know that there are internal pull ups in 89c51 so dont they function properly ?
The LM324 is an opamp not a comparator and does need a pullup resistor. You don't say what problem you get when you connect it to the microcontroller but the most likely problem is incorrect configuration of the microcontroller IO ports.
That's right. I started visiting this forum regularly less than a month ago. But in that short time, I'm surprised to see many OPs ask questions with an incomplete background info or indeed none at all, making it difficult or impossible for others to even start to help diagnose the problem.
That's right. I started visiting this forum regularly less than a month ago. But in that short time, I'm surprised to see many OPs ask questions with an incomplete background info or indeed none at all, making it difficult or impossible for others to even start to help diagnose the problem.
Just for knowledge, I still use LM324 to drive MCU pins as of AT89C51 (AT89C2051... etc) in my new designs, ususally without a pull-up or pull-down resistor.