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

  • Phone Charger 5v to 12v May 17, 2026
  • reviving old swordfish program but? May 17, 2026
  • Assistance locating a 'trail' camera gadget, please ? May 16, 2026
  • Analog multiplexer has gone obselete May 16, 2026
  • Difference between TTL, RS232 and RS485 May 16, 2026

Stay Up To Date

Newsletter Signup
EngineersGarage

Copyright © 2026 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