Go Down

Topic: AREF. Is it possible (Read 88 times) previous topic - next topic

sevenoutpinball

to use this with a digital or analog pin as ground or even power?  I want to add a   momentary switch I can read to change the station on my tea5767 radio and I have used up all my other ground and power pins on other gadgets.

spycatcher2k

No! Time to start looking at shift in/out registers.
Mrs Drew
-=-
http://www.uk-pcb.co.uk - UK PCB Fab Company
I will design & code for you, but I will also charge you (PM me)
If you don't like my answers, realize : I'm not being cheeky, I'm Just trying to prompt you to use your own brain/google etc.

DrAzzy

He needs more power/ground pins it sounds like, not more i/o pins.

Use breadboard or make a Y-cable to connect more things to the power/ground pins.
ATTinyCore for x4/x5/x61/x7/x8/x41/1634/828/x313 megaTinyCore for the megaavr ATtinies - Board Manager:
http://drazzy.com/package_drazzy.com_index.json
ATtiny breakouts, mosfets, awesome prototyping board in my store http://tindie.com/stores/DrAzzy

sevenoutpinball

exactly.  so just make y's or in this case a couple w's!  thanks.  I was just wondering if there were any other ground style places to connect a pin to read a switch from.  I got away with using a pin to power a PIR sensor, that seems to work just by writing it HIGH and leaving it.

DrAzzy

exactly.  so just make y's or in this case a couple w's!  thanks.  I was just wondering if there were any other ground style places to connect a pin to read a switch from.  I got away with using a pin to power a PIR sensor, that seems to work just by writing it HIGH and leaving it.
How much current does the PIR sensor draw, maximum? If it draws more than 20~40mA (depending on how seriously you take their warning against coming close to the absolute maximum ratings long term - I always keep it below 20mA, so I can't comment on the 20~40 range, ie, between recommended and absolute max) it may eventually damage the pin.
Also, there will be voltage drop on a pin when it's heavily loaded, which could result in inconsistent or unreliable functioning of the PIR sensor.

So this is not good practice in the general case. If the current is very low and you need to turn the load on and off, this is fine (if the current is just very low, why do it this way instead of using a Y? If you do need to turn it on and off, be sure that when you turn it off, you first ensure that any other I/O pins connected to it are also low, otherwise it will be backpowered through the I/O pins, possibly damaging the part or causing undesired operation when you've turned it off).
ATTinyCore for x4/x5/x61/x7/x8/x41/1634/828/x313 megaTinyCore for the megaavr ATtinies - Board Manager:
http://drazzy.com/package_drazzy.com_index.json
ATtiny breakouts, mosfets, awesome prototyping board in my store http://tindie.com/stores/DrAzzy

Go Up