Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

ECE 263 Lab 3- Hidden Message in EEPROM Problem Statement The EEPROM on your 328PB board has been preprogrammed with an encrypted message. Your task

image text in transcribed
image text in transcribed
ECE 263 Lab 3- Hidden Message in EEPROM Problem Statement The EEPROM on your 328PB board has been preprogrammed with an encrypted message. Your task is to decrypt the message (decryption algorithm given below), and transfer the message to RAM. You may then examine the RAM in the debugger, and read the unencrypted message. Write a program the uses a 4x4 keypad to control the tri-color LED. Pushing each of the buttons 0-7 should light the LED with the color specified below. These particular mappings of values to colors are designed to make your life easier. Pressing any of the other buttons should not affect the color. Details and Encryption Algorithm At location 1 of the EEPROM, is the first character of the plaintext string, "Elphaba and Glinda". Location 0 or the EEPROM contains the value 18 (decimal) which is the length of the string. You may examine these locations to see if you are reading the EEPROM correctly. At location 0x20 of the EEPROM is the length of the encrypted string (the length is not encrypted). The encrypted string begins at location 0x21. You must decrypt the string and store it in RAM starting at location 0x300. The string should be followed by a null (0) byte. Do not store the length of the string in SRAM. To decrypt each byte of the string, exclusive or OxE7 with the byte, before writing it into SRAM. Hopefully, the toughest part of this lab will be reading the EEPROM. Code is provided on the next page indicating which IO Registers are used to access the EEPROM. Code is also provided showing how to write to the EEPROM. There is no code to read from the EEPROM. You need to develop code to read from the EEPROM. REFER TO THE DATA SHEET, YOUR TEXTBOOK, AND THE EXAMPLE CODE. Deliverables PRELAB (TO BE HANDED IN WHEN YOU WALK INTO LAB): Submit a file to your M: drive (in notepad or other text based editor, named Lab3-prelab.txt) containing code which you believe will read data from the EEPROM. It does not have to be perfect, but should reflect an "honest attempt." This is worth 15% of your lab report. This file must be submitted at least 30 minutes prior to your scheduled lab to be counted. You must demo your working lab to the TA and get the "sign off sheet. To demo the lab, set a breakpoint near the end of your code. Show the contents of SRAM (staring at location 0x200) with the unencrypted text string. Your report must include the number of your board, as each board has a different string written into it. Lab report due in one week ; WRTEROM-WRITE A BYTE TO ROM ON ENTRY: R19:R18 cONTAIN ADDRESS TO WRITE (0-3FF) RO CONTIANS VALUE TO WRITE ON EXIT: N/A NOTES ON EEPROM REGISTERS: EEDR MSB ISB 0x20 (0x40) EEARL IEEAR7 |EEAR6 | EEARS IEEAR4 IEEAR3 EEAR2 IEEAR1 IEEARO1 0x22 (0x42) IIIEEAR9IEEARSI 0x21 (0x41) SEE DATA SHEET SECTION 10.6, PAGE 32 FOR MORE INFO

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

Students also viewed these Databases questions