EngineersGarage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise
You are here: Home / Topics / atmega 16 PORTD problem

atmega 16 PORTD problem

|

Microcontroller › AVR › atmega 16 PORTD problem

  • This topic has 5 replies, 3 voices, and was last updated 15 years, 1 month ago by dagakshay.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • August 8, 2011 at 2:01 am #1249
    D.V.G. Krishna
    Participant

    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

    August 8, 2011 at 12:39 pm #6593
    micky
    Participant

    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…

     

    August 9, 2011 at 1:52 am #6595
    D.V.G. Krishna
    Participant

    im using usb programmer from robotech labs

     

    im not using uart or twi

     

     

     

    August 12, 2011 at 7:50 am #6596
    dagakshay
    Participant

    Paste you code here…. Visit this link it might help you out

     

     

    http://www.engineersgarage.com/embedded/avr-microcontroller-projects/setting-input-pin-circuit

     

     

    August 13, 2011 at 4:23 pm #6605
    D.V.G. Krishna
    Participant

    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?????????

    August 22, 2011 at 8:34 am #6621
    dagakshay
    Participant

    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.

  • Author
    Posts
Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.
Log In

RSS feed: Recent Posts Recent Posts

  • baud rate vs maximum cable length October 13, 2026
  • Request for a 5W transistor controlled LED flash light controller circuit review October 12, 2026
  • Frustration, single phase, high KW, high voltage battery charge module, rectifier. October 12, 2026
  • Delco alternator (12SI) AC-tap - what is the mate to this connector called and where to find it? October 11, 2026
  • Voltage divider response time - is it relevant? October 11, 2026

Stay Up To Date

Newsletter Signup
EngineersGarage

Copyright © 2026 Arrowfly LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of Arrowfly
Privacy Policy | Advertising

Search Engineers Garage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise