Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Steps: Implement the Proteus circuit from Lab 3 with only one Seven Segment Decoder ( 7 4 4 8 or 4 5 1 1 )

Steps:
Implement the Proteus circuit from Lab3 with only one Seven Segment Decoder (7448 or 4511).
Take the chronometer code from Lab3 and make changes to it, so that the chronometer can
work with only one Seven Segment Decoder but works fine for all 3 digit. (Hint: if you get stuck,
search the concept on google)
int ones =0;
int tens =0;
int hundreds =0;
int state =0;
void main(){
PCON.OSCF =1;
TRISB =0x00;
PORTB =0x00;
TRISA =0xF0;
while(1){
if(RA6_bit ==1){
ones =0;
tens =0;
hundreds =0;
}
else if (RA5_bit ==1){
state =1-state;
while(RA5_bit ==1){}
}
if(state ==1){
delay_ms(100);
ones++;
if(ones ==10){
ones =0;
tens++;
}
if(tens ==10){
tens =0;
hundreds++;
PORTA = hundreds;
}
if(hundreds ==10){
ones =0;
tens =0;
hundreds =0;
PORTA = hundreds;
}
PORTB =(ones 4)+ tens;
}
}
}
int ones =0;
int tens =0;
int hundreds =0;
int state =0;
int times =1;
int i =0;
void main(){
PCON.OSCF =1;
TRISB =0x00;
PORTB =0x00;
TRISA =0xF0;
while(1){
if(RA6_bit ==1){
ones =0;
tens =0;
hundreds =0;
}
else if (RA5_bit ==1){
state =1-state;
while(RA5_bit ==1){}
}
if(state ==1){
for (i =0; i
image text in transcribed

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

Systems Analysis And Synthesis Bridging Computer Science And Information Technology

Authors: Barry Dwyer

1st Edition

0128054492, 9780128054499

More Books

Students also viewed these Databases questions

Question

Why are you interested in our program?

Answered: 1 week ago

Question

Can negative outcomes associated with redundancy be avoided?

Answered: 1 week ago

Question

Understand the key features of recruitment and selection policies

Answered: 1 week ago