Question 7.25: Write an 8051 C program to perform the checksum operation to...
Write an 8051 C program to perform the checksum operation to ensure data integrity. If data is good, send ASCII character ‘G’ to P0.
Otherwise send ‘B’ to P0.
The blue check mark means that this solution has been answered and checked by an expert. This guarantees that the final answer is accurate.
Learn more on how we answer questions.
Learn more on how we answer questions.
#include <reg51.h>
void main(void) { unsigned char mydata[] ={0x25,0x62,0x3F,0x52,0xE8}; unsigned char shksum=0; chksum=chksum+mydata[x]; if (chksum==0) P0=‘G’; else P0=‘B’; } |
Related Answered Questions
Question: 7.11
Verified Answer:
//Toggling an individual bit
#include <reg51.h&...
Question: 7.33
Verified Answer:
#include <reg51.h>
sbit P1b0=P1^0;
sbit regA...
Question: 7.32
Verified Answer:
#include <reg51.h>
sbit P1b0=P1^0;
sbit ACCM...
Question: 7.31
Verified Answer:
#include <reg51.h>
sbit P1b0=P1^0;
sbit regA...
Question: 7.30
Verified Answer:
#include <reg51.h>
sbit P1b0=P1^0;
sbit regA...
Question: 7.29
Verified Answer:
#include <reg51.h>
void main(void)
{
...
Question: 7.28
Verified Answer:
#include <reg51.h>
void main(void)
{
unsigne...
Question: 7.27
Verified Answer:
#include <reg51.h>
void main(void)
{
unsigne...
Question: 7.26
Verified Answer:
#include <reg51.h>
void main(void)
{
unsigne...
Question: 7.24
Verified Answer:
#include <reg51.h>
void main(void)
{
unsigne...