![]() | ![]() | ![]() |
| | |||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
| | LinkBack | Thread Tools | Display Modes |
| | #1 (permalink) |
| Experienced Member | Hi all, i am using a comparator ic and LM393 ,configured it as windows detector circuit with the output go to LED and pic uC pin. But i could not read any high logic from the ic output pin when the pin is goes high. i am using a 1k pull up resistor for the power (12v) to LED which is parallel to uC pin as well which i want the uC to detect it is logic high. Any problem with my configuration? |
| | |
| | #2 (permalink) |
| Experienced Member Join Date: Oct 2006 Location: Colombo
Posts: 946
| Remove the comparator part from the uC & check the comparator whether it is working correctly? Can you see the LED goes on when input logic = 1 (in between your range)? What input did you feed the input?Inverting pin or for the non inverting pin? Note that its output open collector type.
__________________ Gayan Forum Supporter Last edited by Gayan Soyza; 30th April 2008 at 09:07 AM. |
| | |
| | #6 (permalink) |
| Super Moderator Join Date: Nov 2003 Location: Derbyshire, UK
Posts: 22,790
| Use a transistor to feed the LED. Or, more crudely, put a resistor in series with the LED - but this will still restrict the output of the comparator from going fully high, and reduce the LED's brightness. |
| | |
| | #7 (permalink) | |
| Experienced Member Join Date: Jan 2007 Location: U.K.
Posts: 3,791
| Quote:
Just noticed he is using a +12V supply to the LM393...
__________________ Eric "Good enough is Perfect" PIC tutorials: Nigel's site: http://www.winpicprog.co.uk/ Gramo's site: http://www.digital-diy.net/ | |
| | |
| | #13 (permalink) | |
| Experienced Member Join Date: Jan 2007 Location: U.K.
Posts: 3,791
| Quote:
You could do it this way. I have modified the top LED, I'm assuming a Red LED about Vfwd=2V The LM393 is open collector output, also the PIC analog is a high impedance.
__________________ Eric "Good enough is Perfect" PIC tutorials: Nigel's site: http://www.winpicprog.co.uk/ Gramo's site: http://www.digital-diy.net/ | |
| | |
| | #15 (permalink) |
| Experienced Member | Can i put it this way? so that i can adjust untill the voltage to my uC is about 5V at the same time i also can light on my LED. Or any better idea i can use? at the moment i have 10k adj resistor and 1k resisitor. Last edited by mesamune80; 5th May 2008 at 02:59 AM. |
| | |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |
| | ||||
| Thread | Thread Starter | Forum | Replies | Latest |
| LCD Display | karenhornby | Electronic Projects Design/Ideas/Reviews | 27 | 22nd February 2008 07:42 PM |
| Using Oscilloscopes | mechie | Electronic Theory | 9 | 29th November 2007 09:49 PM |
| Output = Input - Problems | adamthole | Micro Controllers | 20 | 24th April 2007 04:09 AM |
| uuffff how doess this stupid ting work lol | cyprio7 | General Electronics Chat | 7 | 9th October 2005 06:56 PM |
| convert input resistance to different output, but how?! | pcoghlan | Electronic Projects Design/Ideas/Reviews | 7 | 9th July 2004 10:00 PM |