Answered step by step
Verified Expert Solution
Question
1 Approved Answer
5V R3 330R 2- Please inspect the figure given below. Write a MikroC code that when we press on the push-button, two LED glows for
5V R3 330R 2- Please inspect the figure given below. Write a MikroC code that when we press on the push-button, two LED glows for two seconds. Use delay function to discard the debouncing problem. Write the comments (after ; at each line) (20p). Note: Push button is connected to RBO, LEDI is connected to RB5, LED2 is connected to RB4. B1 BUTTON 3 U1 13 OSCI/CLKIN RBOUNT OSC2/CLKOUT RE1 RB2 RADIANO RBSPGM RALIAN RB4 RAAN/REFACVRE R35 RASVANSREF. RBGPGC RA4TOCKICIOUT RS7IPOD RASJANUSSIC2OUT RCOTIOSOIT1CK REVANSRD RCU/TIOSICCP2 RETANOWR ROCCP 10 REZANTICS RC3/SCKSCL RCAISDISDA MCLR/V/THV RCSISOO ROA/TWICK RCTIXOT ROOPSPO RO1PSP RDP12 ROVED ROUPS RD5PSPS ROB/PSP ROZPSP PIC16F877A D1 LED-UP D2 LED-UP TINN Sssels R1 330R R2 330R Here is the some mikroc command that you may use in your code: TRISX. FY : to set the related port bit as input or output(X: A, B, C, D, E and Y:0.7, example: TRISA.F5=0;) PORTS.F6: to set the related port bit to specified logical value (X: A, B, C, D, E and Y:0.7, example: PORTA.F4=1;) do statement while (1); if (expression) statement delay_ms()
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started