using port d as ADC, not going to work, right? atmega168

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I just wanted to ask before I create an adapter. I have a device that connects to a db9 that is fixed on my board. In this case I need to check a pot connected to Pd3 on my atmega168. The only option I see I have is to build an adapter that switches pc1 and pd3, since I can't just hard wire short the two for other reasons. From what I know there is no way of shorting two pins internally in the chip. No other options right?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

as you can see from the datasheet port C is the only port with AD converter inputs. So No you can not sense a potmeter on port D except if you only want to know if it is full on or full off.... but hten you are going to run into problems in the middle section of the pot meter.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

How can you do anything with a pot on PD3? As a logic input, it will behave really badly near Vcc/2 and is highly unrecommended.

Jim

 

Until Black Lives Matter, we do not have "All Lives Matter"!