Hi, Out of curiosity, I thought I read it somewhere but alas my smoke have left my ears...
is it possible to change the high & low logic input threshold on any of the atmega's ???
t
Very slightly, by varying the supply voltage.
Check the data sheets.
What are you trying to do? What threshold(s) do you want?
There is a good chance you can use an analog input (and choose the threshold in software). That's probably what you read. For example, if the analog value is greater than 100 do this, otherwise do that (or do nothing, etc.).
Or, you may be able to use an op-amp as a [u]comparator[/u] (with a couple of resistors to set the reference/threshold voltage).
P.S
...the high & low logic input threshold.
FYI - This might be confusing, but the although the spec has a high threshold and a low threshold, the chip actually has only one threshold... Let's say I set the threshold at 2V. Any input voltage greater-than or equal to 2V is high, and anything less than 2V is low. The problem is, these are analog voltages and there is uncertanty... It might switch at 1.9V or 2.1V. One chip might be a little high, and another chip might be a little low... So, I write a spec that says anything above 2.5V will always be high, and anything less than 1.5V will always be low. With anything in-between, we can't be sure. Now, all of my chips meet the specs (or they are rejected and sold on eBay ).
The output specs of the chip I connect have to be even more strict. If that chip always puts-out more than 3V when high and less than 1V when low, we have eliminated any uncertanty and the chips will always work together!
The ATMEGA328P also includes a comparator, a device that you define the transition voltage on one pin and it compares that transition voltage to the voltage present at another pin.
DVDdoug:
What are you trying to do? What threshold(s) do you want?There is a good chance you can use an analog input (and choose the threshold in software). That's probably what you read. For example, if the analog value is greater than 100 do this, otherwise do that (or do nothing, etc.).
Or, you may be able to use an op-amp as a [u]comparator[/u] (with a couple of resistors to set the reference/threshold voltage).
P.S
...the high & low logic input threshold.
FYI - This might be confusing, but the although the spec has a high threshold and a low threshold, the chip actually has only one threshold... Let's say I set the threshold at 2V. Any input voltage greater-than or equal to 2V is high, and anything less than 2V is low. The problem is, these are analog voltages and there is uncertanty... It might switch at 1.9V or 2.1V. One chip might be a little high, and another chip might be a little low... So, I write a spec that says anything above 2.5V will always be high, and anything less than 1.5V will always be low. With anything in-between, we can't be sure. Now, all of my chips meet the specs (or they are rejected and sold on eBay
).
The output specs of the chip I connect have to be even more strict. If that chip always puts-out more than 3V when high and less than 1V when low, we have eliminated any uncertanty and the chips will always work together!
Yes I was assuming that there was only one threshold, my question is weather this threshold can be altered?