Insights Blog
-- Browse All Articles --
Physics Articles
Physics Tutorials
Physics Guides
Physics FAQ
Math Articles
Math Tutorials
Math Guides
Math FAQ
Education Articles
Education Guides
Bio/Chem Articles
Technology Guides
Computer Science Tutorials
Forums
General Engineering
Mechanical Engineering
Electrical Engineering
Aerospace Engineering
Nuclear Engineering
Materials Engineering
Trending
Featured Threads
Log in
Register
What's new
Search
Search
Search titles only
By:
General Engineering
Mechanical Engineering
Electrical Engineering
Aerospace Engineering
Nuclear Engineering
Materials Engineering
Menu
Log in
Register
Navigation
More options
Contact us
Close Menu
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Forums
Engineering
Electrical Engineering
How to program a buzzer to a PIC18F452 with PROTEUS and MPLAB IDE?
Reply to thread
Message
[QUOTE="Maniac_XOX, post: 6628168, member: 659198"] [B]TL;DR Summary:[/B] I have connected the Buzzer to the RC0 pin of PORTC but it is not working, I need it to sound with a period of 5 seconds on and 5 off. I can definitely handle the periods with timers or delay functions but I need the circuit to be working first. [ATTACH type="full" alt="1651513689302.png"]300920[/ATTACH] crystal frequency is 4MHz The code i have tried is: [code] #include <p18cxxx.h> #include <xc.h> void main(void) { TRISC = 0; // making TRISC pins output ADCON1 = 0x07; // making them digital pins while(1) { RC0 = 1; __delay_ms(5000); RC0 = 0; } } [/code] [/QUOTE]
Insert quotes…
Post reply
Forums
Engineering
Electrical Engineering
How to program a buzzer to a PIC18F452 with PROTEUS and MPLAB IDE?
Back
Top