Microcontroller input pins

Thread Starter

gusmas

Joined Sep 27, 2008
239
orite i have a comparator that gives out a 4Volts signal when it is high, now i need to take that output to a microcontrolle(8051) will the microcontroller recognise that as a digital one or as a zero
 

rjenkins

Joined Nov 6, 2005
1,013
Many ICs use 'TTL' thresholds which take anything above 2V as a logic 1, so you should be OK with a direct connection.

CMOS style input switch at about 1/3 and 2/3 supply, so again OK at 4V.

If the comparator o/p goes below 0V when low, connect a series resistor to the MPU input to prevent damaging currents. 10K should be OK.
 

MikeML

Joined Oct 2, 2009
5,444
Answer your own question: download the data sheet for the 8051. Read the section on the specs for ViH and ViL for a port pin. It is all in the data sheet.
 

t06afre

Joined May 11, 2009
5,934
It will be logical one. also remember that the input shall always be lower then the supply voltage. If you use a supply voltage (on the microchip) in range 5 to 4 every things is OK. But if you use say 3.3 volt as supply voltage you may damage your UC
 

Thread Starter

gusmas

Joined Sep 27, 2008
239
ok so just a series resistor(10k) from the output of the comparator to the input pin of the microcontroller, that will prevent any damaging to the microcontroller?
 
Top