Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Do a functional program in C language (please don\'t use C++) for CCS Compiler,

ID: 3842035 • Letter: D

Question

Do a functional program in C language (please don't use C++) for CCS Compiler, PIC 18F4550

The program is not for simulation. I am going to use the PIC in a real project.

The program is for a smart (domotic) house. With the basic functions of detecting temperature, motion sensors control, lights control, open and close doors, alarm activation, passwords to activate or deactivate the alarm (using a 4x4 keyboard), etc. Everything showing related messages in a 2x16 LCD screen.

Please, give me a full explanation of the program with comments. Also, please give me the schematic diagram connections.

Explanation / Answer

solution:

#include<stdio.h>

void main()

{

signed int a = 15, b = - 12; // declaring the variables

int OV = 0;

asm

{

mov ax a

movbx,a

add ax ,bx

movc, ax

if(ah! = 0)

OV = 1;

}

printf("%d", c); // printing the address value of c

if (OV == 1) // performing the if statement

printf(" overflow" ) // printing the overflow

}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote