logo elektroda
logo elektroda
X
logo elektroda

C code example to control ON/OFF relay with PIC microcontroller and NO contacts

90 10
ADVERTISEMENT
  • #1 21664110
    Pitso Mosoeu
    Anonymous  
  • ADVERTISEMENT
  • #2 21664111
    Earl Albin
    Anonymous  
  • ADVERTISEMENT
  • #3 21664112
    Muazu Musa
    Anonymous  
  • #4 21664113
    Pitso Mosoeu
    Anonymous  
  • ADVERTISEMENT
  • #5 21664114
    Pitso Mosoeu
    Anonymous  
  • #6 21664115
    Steve Lawson
    Anonymous  
  • #7 21664116
    Mark Harrington
    Anonymous  
  • #8 21664117
    Mark Harrington
    Anonymous  
  • ADVERTISEMENT
  • #9 21664118
    Mark Harrington
    Anonymous  
  • #10 21664119
    Earl Albin
    Anonymous  
  • #11 21664120
    Mark Harrington
    Anonymous  

Topic summary

The discussion focuses on developing a C program to control an ON/OFF relay using a PIC microcontroller, specifically energizing the relay coil at initialization to close normally open (NO) contacts. The relay is connected via a switching transistor to PORT RA3 of a PIC16F887. Key considerations include understanding the relay coil energization logic through conditional statements (IF, THEN, ELSE) and clarifying the communication method with the PIC. Recommendations emphasize starting with circuit schematics, flowcharts, and algorithm design before coding, suggesting assembler or PIC Basic for foundational learning. Useful resources and tools mentioned include MikroC Pro compiler, Amicus18 IDE, Crownhill development boards for PIC18 series, and Proteus Professional for simulation and PCB design. The approach advocates disciplined engineering practices, combining hardware design with software development and presentation skills.
Summary generated by the language model.
ADVERTISEMENT