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 / Program code for input

Program code for input

|

Microcontroller › AVR › Program code for input

  • This topic has 4 replies, 4 voices, and was last updated 15 years, 2 months ago by dagakshay.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • June 30, 2011 at 6:59 am #1023
    Manisha Ojha
    Participant

    if port A of ATMEGA16 is the input and is connected to the switch…..then how will i read the inputs..i mean wat should be the program code for it??PLS HELP…

    June 30, 2011 at 5:05 pm #6402
    raj ranjan
    Participant

    since you are using a switch so the onput will be either +5 v or 0 v

    so you can use two function to read the input

     

     

    bit_is_set(parameter1,parametre2)

     

     

    and

     

    bit_is_clear(parameter1,parameter2)

     

     

    July 1, 2011 at 5:05 am #6403
    micky
    Participant

    U can make the port A pin as input as well as output…

    For example

               For reading as input.. put

     

               DDRA=0x00;

    July 1, 2011 at 6:59 am #6404
    micky
    Participant

    u can refer the following link

     

    http://www.engineersgarage.com/embedded/avr-microcontroller-projects/led-interface-circuit

    July 23, 2011 at 6:22 am #6505
    dagakshay
    Participant

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

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

RSS feed: Recent Posts Recent Posts

  • Request for a 5W transistor controlled LED flash light controller circuit review October 10, 2026
  • Delco alternator (12SI) AC-tap - what is the mate to this connector called and where to find it? October 10, 2026
  • Frustration, single phase, high KW, high voltage battery charge module, rectifier. October 10, 2026
  • On off switch hack October 10, 2026
  • Almost Very New in PCB / KICAD DESIGN October 9, 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