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 / ADC

ADC

|

Microcontroller › AVR › ADC

  • This topic has 1 reply, 2 voices, and was last updated 9 years, 11 months ago by Ashutosh Bhatt.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • July 22, 2015 at 2:21 am #3777
    ishmeet
    Participant

    unsigned int ADC_read(unsigned char ch)
    {
    ch= ch & 0b00000111; // channel must be b/w 0 to 7
    ADMUX |= ch; // selecting channel

    ADCSRA|=(1< while(!(ADCSRA & (1< ADCSRA|=(1< }

    in this part of code whats the use of ch?
    i know we have 7 channels kf adc from ADC0 through ADC6
    but why we used ch ?
    can we select any channel to give adc input through it?

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

    July 23, 2015 at 6:56 pm #13099
    Ashutosh Bhatt
    Participant

    yes whats up man?

    tell whts the problem?

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

RSS Recent Posts

  • The Analog Gods Hate Me July 10, 2025
  • Display TFT ST7789 (OshonSoft Basic). July 10, 2025
  • Fixing board, Easy question HEX SCHMITT July 10, 2025
  • Can I make two inputs from one?? July 10, 2025
  • Home Smoke detectors are all Beeping Batteries are not dead.??? July 9, 2025

Stay Up To Date

Newsletter Signup
EngineersGarage

Copyright © 2025 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
  • Advertise