![]() | ![]() | ![]() |
| | |||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
| | Thread Tools | Display Modes |
| | (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? |
| | |
| | (permalink) |
| Experienced Member | 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. |
| | |
| | (permalink) |
| Experienced Member | ya,my LED lit but i could not get any signal to my uC pin. my circuit is look like this with the VrefA and VrefB to my pic uC pin (input pin) Is there anything i need to add so that my uC can detect logic 1 and 0 respectively? |
| | |
| | (permalink) |
| Super Moderator | Remove the LED's, they are stopping the outputs going high!. |
| | |
| | (permalink) |
| Experienced Member | i see ,thanks nigel ,but i need some indication for that? (high and low limit indication) can i do it in a different way? or any alternative for that? |
| | |
| | (permalink) |
| Super Moderator | 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. |
| | |
| | (permalink) | |
| Experienced Member | Quote:
Just noticed he is using a +12V supply to the LM393...
__________________ Eric "Good enough is Perfect" PIC tutorials: Gramo's: www.digital-diy.net/ Bill's: www.blueroomelectronics.com/ | |
| | |
| | (permalink) |
| Experienced Member | It seem like i got not much choices,either a transistor or a dim LED =_=" what transistor is suitable for this i can use 2N222? |
| | |
| | (permalink) |
| Experienced Member | anything wrong with 12V? @_@" |
| | |
| | (permalink) | |
| Super Moderator | Quote:
| |
| | |
| | (permalink) |
| Experienced Member | okay i'll try it out ,thanks guys. |
| | |
| | (permalink) |
| Experienced Member | Or you can use 3.3V 250mW zener diode in series with each LED.
__________________ L.Chung |
| | |
| | (permalink) | |
| Experienced Member | 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: Gramo's: www.digital-diy.net/ Bill's: www.blueroomelectronics.com/ Last edited by ericgibbs; 7th July 2008 at 11:23 AM. | |
| | |
| | (permalink) |
| Experienced Member | Thanks for all the replies,really thanks for all of you. i think i might choose either zener or voltage divider method to power up both my LED and also signal to my uC. =) |
| | |
| | (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:48 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:55 PM |
| convert input resistance to different output, but how?! | pcoghlan | Electronic Projects Design/Ideas/Reviews | 7 | 9th July 2004 09:59 PM |