Procedure: 1. Create a folder on the PC in D drive under the lab5 folder in which to store all of your work, use your name as a name to the sub-folder you just created. 2. Study program lab_06.c below. 3. Run the program on the given circuit; 4. Modify the program so that it works like a simple calculator: · " + : Add" · " - : Subtract" · " * : Product: 1#include "16F877A.h" #use delay(clock=8000000) #use rs232(baud=4800,xmit=pin_c6,rcv=pin_c7) #include #define QUIT '3' int choice=0; int get_menu_choice( void ); void display_seconds( void ); main() { while (choice !=QUIT) { choice = get_menu_choice(); if (choice =='1') printf("Beeping the computer\a\r" ); else { if (choice =='2') display_seconds(); } else { if (choice =='4') my_first_char=getc( ); } } printf("You chose to quit!\r"); printf("reset your simulater to start again\r"); return 0; } int get_menu_choice( void ) { int selection = 0; char my_first_char; do { printf( "\r" ); printf( "1 - Beep Computer\r" ); printf( "2 - wait 10 seconds on Display \r"); printf( "3 - Quit\r"); printf( "\r" ); printf( "Enter a selection:\r" ); selection=getc( ); }while (selection '3' ); return selection; } void display_seconds(void) {int n; for (n=0;n
Procedure: 1. Create a folder on the PC in D drive under the lab5 folder in which to store all of your work, use your name as a name to the sub-folder you just created. 2. Study program lab_06.c below. 3. Run the program on the given circuit; 4. Modify the program so that it works like a simple calculator: · " + : Add" · " - : Subtract" · " * : Product: 1#include "16F877A.h" #use delay(clock=8000000) #use rs232(baud=4800,xmit=pin_c6,rcv=pin_c7) #include #define QUIT '3' int choice=0; int get_menu_choice( void ); void display_seconds( void ); main() { while (choice !=QUIT) { choice = get_menu_choice(); if (choice =='1') printf("Beeping the computer\a\r" ); else { if (choice =='2') display_seconds(); } else { if (choice =='4') my_first_char=getc( ); } } printf("You chose to quit!\r"); printf("reset your simulater to start again\r"); return 0; } int get_menu_choice( void ) { int selection = 0; char my_first_char; do { printf( "\r" ); printf( "1 - Beep Computer\r" ); printf( "2 - wait 10 seconds on Display \r"); printf( "3 - Quit\r"); printf( "\r" ); printf( "Enter a selection:\r" ); selection=getc( ); }while (selection '3' ); return selection; } void display_seconds(void) {int n; for (n=0;n
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question
Procedure:
1. Create a folder on the PC in D drive under the lab5 folder in which to store all of your work, use your name as a name to the sub-folder you just created.
2. Study program lab_06.c below.
3. Run the program on the given circuit;
4. Modify the program so that it works like a simple calculator:
· " + : Add"
· " - : Subtract"
· " * : Product:
1#include "16F877A.h"
#use delay(clock=8000000)
#use rs232(baud=4800,xmit=pin_c6,rcv=pin_c7)
#include
#define QUIT '3'
int choice=0;
int get_menu_choice( void );
void display_seconds( void );
main()
{
while (choice !=QUIT)
{
choice = get_menu_choice();
if (choice =='1')
printf("Beeping the computer\a\r" );
else
{
if (choice =='2')
display_seconds();
}
else
{
if (choice =='4')
my_first_char=getc( );
}
}
printf("You chose to quit!\r");
printf("reset your simulater to start again\r");
return 0;
}
int get_menu_choice( void )
{
int selection = 0;
char my_first_char;
do
{
printf( "\r" );
printf( "1 - Beep Computer\r" );
printf( "2 - wait 10 seconds on Display \r");
printf( "3 - Quit\r");
printf( "\r" );
printf( "Enter a selection:\r" );
selection=getc( );
}while (selection '3' );
return selection;
}
void display_seconds(void)
{int n;
for (n=0;n

Transcribed Image Text:U1
33
13
14
1
OSC1/CLKIN
RBOANT
RXD
OSC2/CLKOUT
MCLR/Vpp/THV
RB1
RB2
34
35
TXD
2
3
RB3/PGM
RB4
36
37
RAO/ANO
RTS
RA1/AN1
RA2/AN2VREF-
38
RB5
39
4
RB6/PGC
CTS
5"
40
RA3/AN3VREF+
RA4/TOCKI
RASIAN4/SS
RB7/PGD
15
RCO/T1OSO/T1CKI
16
17.
18
23
24
25
26
RC1/T1OSI/CCP2
REO/ANS/RD
RE1/AN6AVR
RE2/AN7ICS
RC2/CCP1
RC3/SCK/SCL
10
RC4/SDI/SDA
RC5/SDO
RC6/TX/CK
RC7/RX/DT
19
20
21
22
27
28
29
30
RDOPSPO
RD1 PSP1
RD2/PSP2
RD3/PSP3
RD4/PSP4
RD5/PSP5
RD6/PSP6
SERCOM.DSN
RD7/PSP7
Demo of serial
PIC16F877
PROGRAM=lab_06.hex
com port
CLOCK=8MHZ
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps

Recommended textbooks for you

Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON

Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science

Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning

Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON

Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science

Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning

Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning

Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education

Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY