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
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 10 years, 11 months 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 Recent Posts

  • Charging shutdown circuit question. August 7, 2022
  • \Dim light short circuit tester August 7, 2022
  • Right channel distortion on vintage fisher rs-2010 August 7, 2022
  • Pedestal fan August 7, 2022
  • Automatic bartender machine audio decoration August 7, 2022

Stay Up To Date

Newsletter Signup
EngineersGarage

Copyright © 2022 WTWH Media 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 WTWH Media
Privacy Policy | Advertising | About Us

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