ECET 205 Lab 3

docx

School

Purdue University, Fort Wayne *

*We aren’t endorsed by this school

Course

205

Subject

Electrical Engineering

Date

Feb 20, 2024

Type

docx

Pages

5

Uploaded by GeneralKouprey3918

Report
ECET-20500-02 Lab 02 (50 points, due by noon, Wednesday Sep. 21) Memory-mapped I/O (2) This Lab will use JTAG interface to control Renesas’s S7G27H microcontroller used on its SK- S7G2 starter kit. It will help you to understand how a microprocessor controls I/O peripherals. 1) Section 1 lets you to use J-Link commander read input signal. 2) Section 2 helps you to use a different tools from Segger, named J-mem to read input signal. Device: SK-S7G2 starter kit with USB cable, and PC SAFETY/CARE OF CHIPS: The boards are generally not damaged by normal handling but please be careful with them. Section 1: 1. Figure 1 shows pushbuttons S4 (the right one, read the label S4 on PCB board)& S5 are connected to signal 06 and signal 05 of port 0. According to the schematic, the signal at P0_6 will be _ _low ___ (low, high) when S4 is push down, and ___ high ___ (low, high) when it is released. Figure 1 Pushbutton circuit
ECET-20500-02 Lab 02 (50 points, due by noon, Wednesday Sep. 21) Memory-mapped I/O (2) 2. According to Figure 1, signal 05 & 06 should be configured as ____ Input _____ (input, output). 3. Use what we learned in Lab 1 to figure out port 0’s control registers 1 to set up port 0’s bit 5, and 6 as ____ Input _______ (input, output). Use W4 J-Link commander to do this. The commander is: W4 ____ 40040000 , 0000ff9f _ (input port 0’s control register 1 address, and data) 4. The input data is in port 0’s control register 2. You can use mem32 commander to read control register 2. The format is mem32 <address>, 1 5. The address of port 0’s control register 2 is _____ mem32 40040004, 1 ________ according to the data book. Use mem32 commander, and the data is _____ 0000CFFF __________. 6. Ask your friend push S4 , and you type mem32 commander again, and the data is _____ 0000CFBF ________. 7. Use control register 2’s structure in data book to figure out signal 06 value. What is signal 6 of port 0 when S4 is released? ___ 1 ___ (0, 1) What is signal 6 of port 0 when S4 is pressed? ___ 0 ___ (0, 1). Do the result match your result in step 1. 8. Practice this to see what is the control register 2’svalue when S5 is pushed (____ 0000CFDF ______) and released (____ 0000CFFF _______) ? 9. What is value you read when both S4 and S5 are pressed? ______ 0000CF9F __________. Attach a screen shot here to show your result.
ECET-20500-02 Lab 02 (50 points, due by noon, Wednesday Sep. 21) Memory-mapped I/O (2) Section 2 1. J-mem is a tool to show register values in a windows. Run program J-mem under SEGGER – J-Link V6.46i as shown in Figure 2, and configure the connection as Figure 3. Figure 3 Configure J-mem connection Figure 2 Run J-mem
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
ECET-20500-02 Lab 02 (50 points, due by noon, Wednesday Sep. 21) Memory-mapped I/O (2) 2. Figure 4 shows J-mem window. You can change Periodic Refresh value to change the J- mem’s reading memory speed. You can type memory address (HEX format) in to go window to display the memory address and memory data in the top line. The number on most left is the address or the address of the 1 st byte. For example, data in address 40040000 is 00. The next byte value 00 is saved in 40040001, etc. The address of the 2 nd 00 after FF CF in the first line is 40040007 as market in Figure 4Press S4 to see the value change. What is the address of the change value? _______ 40040004 __________ What is the data in that register when you press S4 ? ___ BF __________. Use data book to check what the meaning of the data is. Explain your result here. It means Bit six is set to low which is what happens when the button ‘s4’ is pressed. 3. Signal 06 in port 0 is called P006 in Pmn format as described in data book P455. There is a 32-bit register for every signal Pmn, called Port mn Pin Function Select Register ( PmnPFS ). Please figure out the address of register P006PFS . ________ 40040818 ___________ This register shows information about P06 in port 0, Figure 4 J-mem window
ECET-20500-02 Lab 02 (50 points, due by noon, Wednesday Sep. 21) Memory-mapped I/O (2) e.g. S4. Attach a screen shot to show your result when S4 is pressed. Use PmnFPS register’s structure to explain signal value at P0006 (P455). Is this value the same as what you got in section 1? _ yes _____ 4. Repeat step 3 when S5 is pressed and released. 5. Repeat step 3 when both S4 and S5 are pressed.