Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

pull up resistor

2009-06-07 by drs1_shah

hi,can anyone explain me the logic behind the pull up resistors in atmega 16.in which condition my input pin is in high impedance state? If i write

DDRA=0x00;
PORTA=0xFF; 

this means that i have enable the pull up resistor.so r the pins at +5V or floating input is there? secondly for testing d input do i need to use

char test;
test=PINA;
if(test == 0xFF)
{}

or do i use

bit_is_set(PINA,0) && bit_is_set(PINA,1) ,etc

or if i test logic 1 at A0 ,then is this app,

if((test & 0x01)==0x01)

basically i have 5 sensor input which are connected to A0-A4 and i need to test d input either it is 1 or 0 .

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.