Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Genomes And Databases On The Internet A Practical Guide To Functions And Applications

Authors: Paul Rangel

1st Edition

189848631X, 978-1898486312

More Books

Students also viewed these Databases questions

Question

What must a creditor do to become a secured party?

Answered: 1 week ago

Question

When should the last word in a title be capitalized?

Answered: 1 week ago

Question

13-4 What are alternative methods for building information systems?

Answered: 1 week ago

Question

13-1 How does building new systems produce organizational change?

Answered: 1 week ago