Question: Based on the figure below, implement two four bits adder using port - D as input for number A and number B , and port
Based on the figure below, implement two four bits adder
using port D as input for number A and number B and port
A as output for result:
Show the inputs and outputs interface with the ports.
Develop the program to read the inputs, add the two
numbers then display the result on the lower four LEDs
of port A and LCD Line Sum xx
If the answer greater than XOF display the number as
before, in addition to set the Cout port A bit and on
Line of the LCD display "Carry Flag Set""
I am not able to upload an image but its a bit adder
pls explain step by step i need the program like this:
#include
#include"config.h
#include "LCD.h
int mainvoid
TRISAX;
TRISDbits.TRISD;
TRISAbits.TRISA;
TRISDbits.TRISD;
TRISDbits.TRISD;
int num num sum;
initLCD;
while
homeLCD;
num PORTDbits.RD PORTDbits.RD;
num PORTAbits.RA PORTDbits.RD;
sum numnum;
PORTA sum;
setLCDCLINE;
putsLCDSum ;
putdLCDsum;
setLCDCLINE;
ifsum
PORTAbits.RA;
putsLCDCarry Set";
else
PORTAbitsRA;
putsLCD;
return ;
This is only an example of how i want it this code is a bit adder
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
