Introduction: In this Lab., you will interface common cathode seven segment displays to the PIC; write a
Question:
In this Lab., you will interface common cathode seven segment displays to the PIC; write a program to simulate its operation.
Objectives
You will learn how to:
Interface the seven segment display to the PIC. Drive the display using arrays.
Interface mechanical switches and test their status
Pre-lab:
Do step 3 in the procedure (Study program sig2.c) at home.
Procedure:
- Create a sub-folder in your working folder and name it (lab4) in which to store your work in this lab.
- Study program sig2.c and explain its function for each input conditions (step & reset switches).(upload your answer)
3. Use MPLAB to create a project in(lab4) folder; use the circuit and the program you created and simulate your design .
4. Replace the seven segment display with a common-anode display and adjust your program. Simulate the project using PROTEUS and save this design you will upload it.
5. Rewrite the program such that it works as in the flowchart using common anode seven segment display :
//sig2.c
//;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
# include "16F877A.h"
# use delay(clock=4000000) void main()
{
int n;
int8 anum[10];
anum[0] = 0x3f; anum[1] = 0x06; anum[2] = 0x5b; anum[3] = 0x4f;
while (1){
if(input(pin_d0) ^ input(pin_d1))
for ( n = 0; n
{output_c(anum[n]);
delay_ms(100);}
else
for ( n = 3; n255;>
{ output_c(anum[n]);
delay_ms(100);}
}
}
pls help in solve branch 5 (just) as quick as you can
note : branch 5 ask to transfer the flow chart to c languge and display the output on 7-segment common anode display
this is a microprocessor lab