- This topic has 5 replies, 3 voices, and was last updated 11 years, 9 months ago by .
Viewing 6 posts - 1 through 6 (of 6 total)
Viewing 6 posts - 1 through 6 (of 6 total)
- You must be logged in to reply to this topic.
|
Microcontroller › AVR › atmega 16 PORTD problem
while using atmega16 mc
i got a problem with port D
i tried to use it as an input port
but it is not working as in put
is it a bidirectional or not????????????
same problem occured incase of atmega 8
Hi Krishna,
Yes, The ATmega 16 & ATmega 8 PORTD pins are bidirectional pins.
Can u explain ur problem briefly?
1. Which programmer are u using?
2. Are u using any peripherals like TWI…
im using usb programmer from robotech labs
im not using uart or twi
Paste you code here…. Visit this link it might help you out
http://www.engineersgarage.com/embedded/avr-microcontroller-projects/setting-input-pin-circuit
i want ti interface an IR sensor to atmega16
the sensor is active high
if i write
DDRD=0x00;
PORTD=0xff;
the pins will be by default high
when sensor detects object it gives high
the mc cannot detact a change in input
can i write PORTD=0x00;
what will happen?????????
Can you paste your code here…
i would like to see the code once… the link i had dive you above shows how to take input… and yes you are correct about the internal pull up goes high and it must detect the active low input signal.