Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PLEASE USE PIC16F877 processor ! Solve the second part , MAKE THE LOCATION SHOWN IN RED ! Assume that first 7 locations in EEPROM has

PLEASE USE PIC16F877

processor ! Solve the second part ,

MAKE THE LOCATION SHOWN IN RED !

image text in transcribed

Assume that first 7 locations in EEPROM has some configuration data for a particular application. Write a subroutine "check_config" that checks these 7 locations (address 0 to 6), whether they appear to be valid. To do this job, it should calculate the sum of these values, and take 2's complement of the sum. Then, it should compare the low byte with the following CHECKSUM location. If the result of the comparison checks okay, subroutine should return with a set ZERO bit in the STATUS register. Otherwise subroutine should return with a cleared ZERO bit in the STATUS register. Write another subroutine that updates these 7 EEPROM locations to the some desired values (sitting in the locations 50H-56H in the general purpose RAM area). Don't forget to calculate new checksum value and update CHECKSUM location accordingly. So that, next time it checks okay, when the subroutine "check_config" is executed. Assume that first 7 locations in EEPROM has some configuration data for a particular application. Write a subroutine "check_config" that checks these 7 locations (address 0 to 6), whether they appear to be valid. To do this job, it should calculate the sum of these values, and take 2's complement of the sum. Then, it should compare the low byte with the following CHECKSUM location. If the result of the comparison checks okay, subroutine should return with a set ZERO bit in the STATUS register. Otherwise subroutine should return with a cleared ZERO bit in the STATUS register. Write another subroutine that updates these 7 EEPROM locations to the some desired values (sitting in the locations 50H-56H in the general purpose RAM area). Don't forget to calculate new checksum value and update CHECKSUM location accordingly. So that, next time it checks okay, when the subroutine "check_config" is executed

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

Audit Studies Behind The Scenes With Theory Method And Nuance

Authors: S. Michael Gaddis

1st Edition

3030100200, 978-3030100209

More Books

Students also viewed these Accounting questions