Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

What exactly is setting a micro controller pin high?

Status
Not open for further replies.
No, there are specific trigger 'ranges', as with any logic family - below a certain voltage is 100% a zero, above a certain (higher) voltage it's 100% a one. Between those voltages shouldn't ever happen, and if it does the result is outside the devices specification.

PIC's usually have one or more pins with schmitt inputs, which prevent any such potential problems.
 
I want to use the PIC16f627 to make an autonomous robot taking inputs from my sensors, I just want to figure out what sort of signal I need to send to the inputs.

Sorry I'm a complete amateur at electronics, a comparator will check to see if an input is above or below a certain value, is that right?
 
A higher voltage will be bypassed by the protection diodes - BUT - if it's high current will fry the PIC.

You really need to post specific questions for more accurate answers.
 
I keep seeing it while I'm reading up on using the PICs but I'm not sure I'm right in my understanding. If the pin gets any positive voltage at all no matter how small it will be high and if there is no voltage it is set low? is that correct?

Setting a pin high or low is done in software.

i.e.
BSF porta,0 ;set pin high
BCF porta,0 ;set pin low

As an input the trigger level for a none schmitt input is around 2 volts.
Less than 2 volts is read as a zero and above 2 volts iread as a one.
 
Last edited:
Those are generalities, what exact voltage level those states are triggered at is far more complicated, temperature and manufacturing variance dependent.
 
Those are generalities, what exact voltage level those states are triggered at is far more complicated, temperature and manufacturing variance dependent.

I was being very specific to the PIC.

I design a lot of analogue equipment and put analogue signals into the PIC and for a VCC of 5 volts the trigger level is always 2 volts. This varies very little with temperature and over batches of PIC's.
I should add I have worked professionally with PIC's since 1985 and worked for a PIC consultancy for 13 years.

The PIC is happy with analogue voltages on its pins.
On many occasions a mains reference was got simply with a resistor in series with a port.

I use PIC's monitoring the output voltages of analogue amplifers and have found them to be extremely reproducable and reliable.
 
Last edited:
nigelwright7557: Picking your brains again, what is the upper and lower thresholds for the Schmitt Trigger inputs?
 
Hi,

Am I right to say that setting a pin high or low is an output then? If the chip is supplied with 5V will it send 5V out through an output? I'm sorry if these are stupid questions, I've only been playing around with PICs in my spare time for about three or four weeks now.

hi,
If the PIC program initialises a PIC pin as an OUTPUT, the program will also control the state of the pin, either HIGH +v or LOW 0V.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top