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.

cant design a thermistor as an interrupt source

Status
Not open for further replies.
First I am a digital person. So ANYTHING I saw about analog should be taken with a pound of salt.

I am talking transistor(s) on the input pin, inside the PIC. The current draw we are talking about is internal to the PIC. It does not flow through the pin but is affected by the voltage on the pin.

EDIT: Digital circuits are created from analog devices. But the digital circuits do not function well if used in an analog way. They expect inputs to be hi or lo. The inbetween area should be advoided.

EDIT2: Pullup and down resistors only work if all devices on the line are tristated. They do not work with an analog voltage on the line.
 
Last edited:
First I am a digital person. So ANYTHING I saw about analog should be taken with a pound of salt.
I am talking transistor(s) on the input pin, inside the PIC. The current draw we are talking about is internal to the PIC. It does not flow through the pin but is affected by the voltage on the pin.

EDIT: Digital circuits are created from analog devices. But the digital circuits do not function well if used in an analog way. They expect inputs to be hi or lo. The inbetween area should be advoided.
But that was my question, why does it draw internally too much current?
and what if i defined it as tristate?


EDIT2: Pullup and down resistors only work if all devices on the line are tristated. They do not work with an analog voltage on the line.

You mean that when setting something as pull-up, the other side must be tristate, but can't it be also normally High (active LOW)?
 
But that was my question, why does it draw internally too much current?
and what if i defined it as tristate?

When you set a port pin as an input it is tristated (not driving the line).(edited)

I did not find documentation supporting the statment that input pins in the undefined voltage region draw more current. Microchip makes many different processors. It could possbily vary from one to the other. I looked at the 16F and 18F only. Without specifing a microprocessor we can only speak about what we generaly do.

Suppose it is not true and you connect a voltage source that varies from 0 to +5 to the input.

Microchip say this about input voltage levels.
The Input Low Voltage (VIL) is the maximum voltage level that will be read as a logic ’0’.
The Input High Voltage (VIH) is the minimum voltage level that will be read as a logic ’1’.
I could not find info on what the input will read if the voltage is in the undefined region between VIL and VIH. But the input is digitial, when you read the bit it must be a 1 or a 0.

A 0 may be seen between 0V and VIH.
A 1 may be seen between VIL and +5V.

The problem is that the majority of the band between 0 and +5V we do not know if it will read 0 or 1. (possibly because it is a no no). Even if there is no harm the value read on the input is meaningless, or nearly so.

Digital inputs are expected to rapidly change between hi and lo states. By definition the inputs should see voltages in the undefined region only during the rapid transitions.

By placing an analog input on a digital pin you are asking the input to operate outside the design parameters. Perhaps it does no harm, or maybe it is like driving a car as fast as it will go for hours on end.

As I said in an earlier post. I am a digitial guy, software engineer by training. The EE's here know better then I do.

3v0
 
Last edited:
As you may know input and tristate are the same. When you set a port as an input it is tristated (not driving the line).

I am not so sure I agree with that statement. Tristate usually refers to an output device such as a buffer. When tri stated the output no longer drivers the line as it goes into a high Z state.

I agree that inputs do not drive a line but they are still able to respond to a signal, where tristate essentially disables an output. My 2 cents :)
 
I am not so sure I agree with that statement. Tristate usually refers to an output device such as a buffer. When tri stated the output no longer drivers the line as it goes into a high Z state.

I agree that inputs do not drive a line but they are still able to respond to a signal, where tristate essentially disables an output. My 2 cents :)

You are correct. I removed the line. The following one stands alone and is clearer.

When you set a port pin as an input it is tristated (not driving the line).
 
Last edited:
Status
Not open for further replies.

Latest threads

Back
Top