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 / Hi Ren, while (1){         

Hi Ren, while (1){         

|

Microcontroller › PIC › Novice at Microcontrollers › Hi Ren, while (1){         

November 24, 2012 at 5:57 pm #8788
AJISH ALFRED
Participant

Hi Ren,

 

while (1)

{

          if (PORTBbits.RB4=1)               //THIS IS NOT A CONDITIO, BUT AN ASSIGNMENT STATEMENT

                  (PORTC=0xff);

}

 

The correct coding is,

 

while (1)

{    
             if (PORTBbits.RB4==1)          //SEE THE LOGICAL OPERATOR “==”
                        (PORTC=0xff);       
}    
 

You should practice more  C coding and I hope you won’t do these kind of silly mistakes again

RSS Recent Posts

  • Getting into an LED bulb April 21, 2026
  • understanding of resonance in time domain April 21, 2026
  • Beginner Questions About CNC Machines – G-code, Control Systems & Accuracy April 21, 2026
  • A Must-Watch Video Showing Dangerous Construction of Cheap Lithium-Ion Cells April 21, 2026
  • S1MJ ? April 20, 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