Page 1 of 1

our course is about PIC16f877 A microprocessor

Posted: Sun Jul 03, 2022 12:01 pm
by answerhappygod
our course is about PIC16f877 A microprocessor
Our Course Is About Pic16f877 A Microprocessor 1
Our Course Is About Pic16f877 A Microprocessor 1 (61.31 KiB) Viewed 21 times
Question 2 (50 pts) Below is the McLab2 board with the microcontroller PIC16F877A. The clock frequency is 1 MHz. Ford Mo O PART Here Cole M-POP Top 27MPC RESULT Number A Number B 0382 PicsimLab3 Write the code which implements the functionality below: www. MAASH ***** *## The seven-segment display above L3 LED shows a decimal number (Number A) ranging between 0 and 9. The seven-segment display above L4 LED shows a decimal number (Number B) ranging between 0 and 9. Two seven-segment displays above L1 and L2 LEDs shows a two-digit decimal number (RESULT) ranging between 00 and 99. 1- When the user continuously presses S3 switch. Number A is incremented every 200 ms. 2- When the user continuously presses S4 switch. Number B is incremented every 200 ms. 3- When Number A is equal to 9 and incremented, its value is reset to 0 (zero). 4- When Number B is equal to 9 and incremented, its value is reset to 0 (zero). 5- When S2 switch is pressed, the sum of the values shown on Number A and Number B are calculated and shown on the two-digit display (RESULT). 6- When S1 is pressed, the two-digit display (RESULT) is reset to 00 (zero). 7- All displays are always ON and show the numbers continuously as shown in the figure above. For example: As shown in the figure, if Number A is equal to 1 and Number B is equal to 2. RESULT is updated as 03 when S2 switch is pressed. (1+2-03). For example: If Number A is equal to 6 and Number B is equal to 9. RESULT is updated as 15 when $2 switch is pressed. (6+9=15). Note: You may use the attached display.txt file for driving the seven-segment displays on the board. You may find the schematic of the McLab2 in the attachment (filename: PICSIMLAB McLab2_Board.pdf)