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 / Replies / u r reading “switch” but what

u r reading “switch” but what

|

Microcontroller › PIC › How to read switch in XC8 compiler › u r reading “switch” but what

March 31, 2014 at 4:46 am #11426
Ashutosh Bhatt
Participant

u r reading “switch” but what is switch?

u hv commented it out in your program. see ur code.

another thing

u r not polling pin status in continuous loop the actual loop should be

loop:while(switch==0);

for(i=0;i<=10;i++)

                      

                          {

                               
                             PORTA = 1;

                             __delay_ms(1000);

                             PORTA = 0;

                             __delay_ms(1000);

                            

                         }

switch=0;

goto loop;

      

RSS Recent Posts

  • need help in photodetection TIA circuit November 19, 2025
  • Need to solder a really delicate ribbon for an electric reel need advice November 18, 2025
  • Help please! BLDC driver circuit using the IR2136s and the STP80NF06 MOSFETS November 18, 2025
  • Measuring controller current output with a meter November 18, 2025
  • Anyone In The US Ordered From AliExpress Recently? November 17, 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