Question: 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 !

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
Get step-by-step solutions from verified subject matter experts
