Devry ECET330 Complete Course Latest
ECET330 Microprocessor Architecture
Week 1 Discussion
DQ1 Microprocessor and Microcontroller Difference
Discuss the differences between microcontrollers and microprocessors. Discuss the applications of a microprocessor or microcontroller for different industries
DQ2 Memory Map and Different Types of Memory
What does the memory model of a microcontroller show? Discuss the reasons for different types of memory such as RAM, EEPROM, and FLASH used in HCS12.
ECET330 Microprocessor Architecture
Week 2 Discussion
Different Types of HCS12-Addressing Modes
Addressing modes are different ways that an operand can be accessed. Discuss different types of addressing modes of HCS12. What is a relative addressing mode? What is the difference between a direct and an extended addressing mode? Discuss how Registers X and Y are used in index addressing mode.
ECET330 Microprocessor Architecture
Week 3 Discussion
DQ1 Stack and Subroutines
Discuss the role of stack in subroutine calls. What are different techniques of passing values to a subroutine? This section lists options that can be used to view responses.
DQ2 Relative Addressing Mode
Discuss relative addressing mode. Which instructions use this addressing mode? What is the difference between a short branch and a long branch?
ECET330 Microprocessor Architecture
Week 4 Discussion
DQ1 I/O Ports of MC9S12G128
Some ports of the MC9S12G128 microcontroller have other functions besides being a general purpose I/O. Discuss the functions of each port of this microcontroller.
DQ2 Masking Techniques and Bit Addressability
Sometimes, we want to monitor only a few bits of an input port. Also, sometimes we want to send an output to only one bit of a port. Discuss some of the ways that we can achieve these objectives.
ECET330 Microprocessor Architecture
Week 5 Discussion
DQ1 Negative Number Representations
HCS12 uses 2’s complement representation for negative numbers. Discuss other techniques used for representing negative numbers inside CPUs. Talk about the advantage of 2’s complement over the other representations. Show some examples of how numbers are represented using each technique.
DQ2 Instructions Used for Signed and Unsigned Numbers
This week, we are talking about different instructions for signed and unsigned numbers. Discuss the carry, overflow, and N flag. How does CPU know if you are using a number as a signed number or as an unsigned number? Discuss the different instructions used for signed or unsigned numbers. For example, what is the difference between signed multiplication and unsigned multiplication? What is the difference between shifting a signed number and shifting an unsigned number
ECET330 Microprocessor Architecture
Week 6 Discussion
DQ1 Negative Number Representations
HCS12 uses 2’s complement representation for negative numbers. Discuss other techniques used for representing negative numbers inside CPUs. Talk about the advantage of 2’s complement over the other representations. Show some examples of how numbers are represented using each technique. This section lists options that can be used to view responses.
DQ2 Instructions Used for Signed and Unsigned Numbers
This week, we are talking about different instructions for signed and unsigned numbers. Discuss the carry, overflow, and N flag. How does CPU know if you are using a number as a signed number or as an unsigned number? Discuss the different instructions used for signed or unsigned numbers. For example, what is the difference between signed multiplication and unsigned multiplication? What is the difference between shifting a signed number and shifting an unsigned number?
ECET330 Microprocessor Architecture
Week 7 Discussion
Bus Contention
In your own words, describe bus contention and how to avoid this problem. What techniques are used in modern computer systems to avoid bus contention?
DQ2 Fan-Out and Reduced-Drive Registers
Discuss HCS12 port fan-out and reduced-drive registers. Discuss the role of the chip 74LS244 for driving multiple inputs. This section lists options that can be used to view responses
ECET330 Microprocessor Architecture
Week 1 Homework
1 .Convert the following binary numbers to Hexadecimal.
10010011
II. 10110111
2. Find the 2’s complement of the following binary numbers.
10010101
11100111
3. Why must every computer have some amount of nonvolatile memory?
4. Find the organization and capacity of memory chips with the following pins.
EEPROM A0-A14, D0-D7
SRAM A0-A12, D0-D7
5. Answer the following:
How many bytes are 32 bits?
How many Kbytes is one megabyte?
How many megabytes is one gigabyte?
6. In a given byte-addressable computer, Memory Locations 10000H to 9FFFFHare available for user programs. The first location is 10000H and the last location is 9FFFFH. Calculate the following:
The total number of bytes available (in decimal);
The total number of kilobytes (in decimal);
7. What are the differences between a microcontroller and a microprocessor?
ECET330 Microprocessor Architecture
Week 2 Homework
1. Question: Write a simple program in which the value, $55, is added three times.
Question 2. Question: Which of the following instructions is (are) illegal?
LDAA #500
LDAA #50
LDAA #$255
STAA #50
STAA $50
LDAA 6, X
Question 3. Question: Identify the addressing mode for each of the following.
STAA $2005
LDAA #$55
STAA $55
CLRA
ADDA 0, X
Question 4. Question: Show the status of C and Z flags after each of the following codes.
LDAA #$54
ADDA #$C4
LDAA #01
ADDA #$FF
Question 5. Question: Show the status of H and N flags after the following code.
LDAA #$A1
ADDA #$0F
Question 6. Question: Define a byte-size and word-size variable starting at address $2000. Initialize both variables to $55. You should use ORG, DC.B, and DC.W directives.
ECET330 Microprocessor Architecture
Week 3 Homework
Question 1Write a program to clear Register B, and then add the number three to B seven times. Use the BNE instruction with DECA.
Question 2Write a program to clear Register A, add five to Register A 10 times, and place the result in RAM Location $2000. Use a RAM location for holding the counter.
Question 3What is the size of each instruction?
LDAA #50
BEQ there
STAA $2000
DECB
LDAB 0, X
Question 4Write the sequence of instructions to save Registers A, Y, and X in the Stack with the given order. Write the sequence of instructions to retrieve those values back.
Saving A, Y, and X in Stack:
1 __________
2 __________
3 __________
Retrieving values back:
1 __________
2 __________
3 __________
Question 5Show code for a nested loop to perform an action 1,000 times.
ECET330 Microprocessor Architecture
Week 4 Homework
Question 1Write a program to get eight-bit data from PORTA and send it to PORTB and PORTC. Make sure to define each port as input or output.
Question 2Write a program to toggle all bits of PORTA continuously by sending $55 and $AA to it.
Question 3Write a program to toggle PB3, PB7, and PB5 continuously without disturbing the rest of the bits. Assume that there is a delay procedure that you can call.
Question 4Write a program to monitor Bit PJ3, which is connected to a switch. When it is HIGH, send 55H to the output port, PORTB. You also need to define the PJ3 bit as an input port, and PORTB as an output port.
Question 5Eight switches are connected to PORTB and eight LEDs are connected to PORTA. We would like to monitor the first two least significant bits of PORTB (use masking technique). Whenever both of these bits are set, switch all LEDs of Port A on for one second. Assume that the name of the delay subroutine is DELAY. You do not need to write the code for the delay procedure.
ECET330 Microprocessor Architecture
Week 5 Homework
Question 1. Show the value of the register and the carry after the execution of the ASLA instruction.
Given the original content of Register A and carry flag
0 1 0 0 1 0 1 0 1
C
Question 2. Show the value of the register and the carry after the execution of the LSLB instruction.
Given the original content of Register B and carry flag
0 1 0 0 1 0 1 0 1
C
Question 3. Show the value of the register and the carry after the execution of the ASRB instruction.
Given the original content of Register B and carry flag
1 0 1 0 0 1 0 1 0
C
Question 4. Show the value of the register and the carry after the execution of the RORA instruction.
Given the original content of Register A and carry flag
1 1 0 1 1 1 1 1 0
C
Question 5. Show how to perform 77 x 34 in the HCS12. Store the result in a WORD-size variable called var1.
Question 6. Show how to perform 77 / 3 in the HCS12. Store the quotient in a WORD-size variable called result, and the remainder in a WORD-size variable called remainder.
Question 7. How are the following decimal-signed numbers represented in HCS12?
-12
+127
-128
ECET330 Microprocessor Architecture
Week 6 Homework
Question 1. Write a program to continuously read the DIP switches connected to PORTA and send it to PORTB.
Question 2. Assume that eight DIP switches are connected to PORTB and eight LEDs are connected to PORTC. Assume that the switch values are normally high. Turn all of the LEDs on and wait in a loop until one of the switches becomes zero. At that time, send 0x55 to PORTC.
Question 3. Write a C program to declare two character arrays called list1 and list2. Initialize list1 with your first and last name. Write the main code to copy list1 to list2.
Question 4. Write a function to convert a character to uppercase (if it is lowercase) and return the character. Hint: Subtracting 0x20 from the ASCII code of a lowercase character makes it an uppercase.
Question 5. Write a C program to convert a packed BCD at Port B to ASCII and display the bytes on PORTC and PORTD.
ECET330 Microprocessor Architecture
Week 7 Homework
1.Is it possible to interface an IC with a different technology such as TTL to HCS12 ports? What are the conditions in terms of electrical parameters that need to be satisfied for this purpose?
2.Given an LED with a forward drop of 1.5V and an operating current of 10 mA, design the interface to the HCS12 showing your calculations.
3.Bit 4 of Port B is connected to a switch that normally outputs a zero. Monitor this switch to detect a change from zero to one. Immediately when it becomes one, call a function to toggle Bit 5 of Port B, which is connected to an LED. Use an exclusive-OR operation to toggle PB5 two times. After the function call, the code should branch to the line that monitors PB4.
4.Write a program to create an array initialized with Hex digits in the ROM space. The main code should copy this array to a different array in the RAM space.
5.What is the function of the enable control input of a tri-state buffer? If the output of two or more tri-state buffers is connected to each other, what is the restriction on enable control input lines? What does happen when this restriction is violated?
6.In your own words, describe bus contention and how to avoid this problem. What techniques are used in modern computer systems to avoid bus contention?
ECET330 Microprocessor Architecture
Week 1 ILAB
Laboratory Number:1 (Part 1)
Laboratory Title: Introduction to Memory Map
Objectives:
Results:
Conclusions:
Team:
Observations/Measurements:
IV. 1: Memory Address Ranges
Memory Unit A15 A14 A13 Lower Limit Upper Limit Size in Bytes
RAM1 0 0 0 $0000 $1fff 8K
RAM2
RAM3
RAM4
IV. 2 How does the memory system of Figure 1 react to these values?
IV. 3Explain which memory unit in Figure 1 is selected
IV. 4. How much on-chip RAM memory do we have for the MC9S12G128 microcontroller?
Questions:
1. Give two differences between EEPROM and Flash memory.
2. Indicate the use of each memory in the microcontroller. In other words, state which one is used for code, program variables, and variables that must remain when the power is turned off.
3. State the number of address and data pins for 32Kx8 SRAM.
4. State the number of address and data pins for 8Kx8 SRAM memory.
Laboratory Number: 1 (Part 2)
Laboratory Title: Introduction to Assembly and Machine Language
Observations/Measurements:
IV. 1 – Explain the cycles that CPU goes through in the animation of Lecture 1:
IV. 2.a – Write the machine language program (binary code).
IV. 2.b – Write the assembly language program.
IV. 3.a – Write the assembly language program.
IV. 3.b – Write the machine language program.
Grade: Deliverable Points Available Points Achieved Laboratory Cover Sheet 8 Working Circuit(s)/Program(s)8 Observations/Measurements 6 Questions 8 Total Points 30 Comments:
ECET330 Microprocessor Architecture
Week 2 ILAB
Laboratory Number: 2
Laboratory Title:
Objectives:
1. To Install CodeWarrior
2. Explore the CodeWarrior IDE and the operations
3. Become familiar with how an assembly language program is entered and simulated using CodeWarrior
4. To learn how to generate a list file
Results:
We were able to have a beginner’s perspective for CodeWarrior IDE and its operations. We were also able to become more familiar with how an assembly language program is entered and simulated using CodeWarrior. We were also able to generate a list file.
Conclusions:
This week’s lab was insightful. Being introduced to CodeWarrior was a little tough to learn at first but as like any new language, a little practice can go a long way.
Team: May Saw EET
Observations/Measurements:
IV. 1- A. Copy and paste the complete source code for adding 7 and 8.
IV. 1-B. Copy and paste the IDE register window showing the value of A and B.
IV. 1-C. Copy and paste the IDE register window showing the value of A and B after executing the instruction to add A and B.
IV. 1.D – Copy and paste the Assembly Window showing the machine code.
IV. 2. A. Copy and paste the source code for adding your ID numbers.
IV. 2. B. Copy and paste the IDE register window showing the value of final result (in HEX).
IV. 2. C. Copy and paste the IDE register window showing the value of final result (in decimal).
IV. 2. D. Zero and Carry flag.
Questions:
1. Assume that the value of Register A is $FF and Register B is 00.
What will be the value of zero flag, carry flag, Register A, Register B, and Register D after executing the instruction?
2. Assume that the value of Register A is $FF and Register B is 00.
What will be the value of zero flag, carry flag, Register A, Register B, and Register D after executing the instruction?
3. Assume that the value of Register A is $FF and Register B is 00.
What will be the value of zero flag, carry flag, Register A, Register B, and Register D after executing the instruction?
4. Assume that the value of Register D is $00FF.
What will be the value of Registers A, B, and D after executing the instruction?
ECET330 Microprocessor Architecture
Week 3 ILAB
Laboratory Number: 3
Laboratory Title: Introduction to Loops and Subroutines in Assembly Language
Objectives:
1. To become familiar with conditional branch instructions
2. Understanding how to write loops
3. Understanding how to write subroutines
Results:
Able to create a program that gets the sum of the values in an array, as well as multiple arrays
Conclusions:
This week lab taught us how to write not only one loop but two loops in one single program. At first, it was difficult to execute subroutine instructions. But after going over notes and lectures, we understand how to use subroutines.
Team: May Saw EET
Name Program Signature
Observations/Measurements:
IV. 1.A. Copy and paste the source code.
IV. 1. B. Copy and paste the register window at the second iteration where the carry becomes set. Highlight the carry flag to show that it is set.
IV. 1. C Copy and paste the register window to show the final result. IV. 2.A. Copy and paste the source code.
IV. 2. B. Copy and paste the assembly, register, and memory after the first JSR instruction to verify that stack holds the return address.
IV. 2. C Copy and paste the memory window to show the values of Sum1 and Sum2.
Questions:
1. What does the CPU do (in terms of register contents and stack) when it executes a JSR instruction?
2. What does the CPU do (in terms of register values and stack) when it executes a RTS instruction?
Grade:
Deliverable Points Available Points Achieved Laboratory Cover Sheet 8 Working Circuit(s)/Program(s) 10 Observations/Measurements 8 Questions 4 Total Points 30 Comments:
ECET330 Microprocessor Architecture
Week 4 ILAB
Laboratory Number: 4
Laboratory Title: Introduction to Tower Module
Objectives:
1. To set up the Tower System
2. Become familiar with programming and using the Tower Module
3. Become familiar with I/O port programming
Results:
We were able to successfully create four working programs that manipulate the LEDs of the Tower system
Conclusions:
Using different methods such as subroutines, selection statements, and masking techniques, we can create programs using CodeWarrior that can be installed in a tower system
Team: May Saw EET
Name Program Signature
Observations/Measurements:
IV. 2-B. Copy and paste the memory window showing the value of PTT.
IV. 3.A – Copy and paste the source code.
IV. 3. B. Show the one-second delay calculation.
IV. 3. C. Describe the LED values.
IV. 4. A. Copy and paste the source code.
IV. 4. B. Show the 0.75-second delay calculation.
IV. 4. C. Describe the LED values. .
IV. 5. A. Cut and paste the source code.
5. B. Show the 0.5-second delay calculation.
IV. 5. C. Describe the LED values.
Grade:
Deliverable Points Available Points Achieved Laboratory Cover Sheet 8 Working Circuit(s)/Program(s) 12 Observations/Measurements 10 Questions 0 Total Points 30 Comments:
ECET330 Microprocessor Architecture
Week 5 ILAB
Laboratory Number: 5
Laboratory Title: Data Manipulation in Assembly Language
Objectives:
1. Given an arithmetic equation or data conversion, develop an assembly-language algorithm to implement the correct sequence of operations.
2. Learn how to design assembly-language programs that require decision logic in order to accomplish their tasks.
Results:
I was able to create two programs that involve arithmetic and logic instructions.
Conclusions:
Arithmetic and logic instructions can use commands like SUB, AND, and more.
Team: May Saw EET
Name Program Signature
Observations/Measurements:
IV. 1-B. Cut and paste memory to show the value of z.
IV. 1-C.Cut and paste the Register window to show the remainder.
IV. 2.A -Copy and paste the source code.
IV. 2. B. Test your program for three different values and show the result of each one by dumping memory.
IV. 3. A.Check the code for the value, $73. Cut and paste the memory to show the number of zeros for this value.
IV. 3. B.Check the code for the value, $88. Cut and paste the memory to show the number of zeros for this value.
IV. 4. A.Cut and paste the source code.
IV. 4. B.Test the code with the two values, 00111010 and 00101100. Cut and paste the Register window for each case to show the value of the extra bit in Register A.
ECET330 Microprocessor Architecture
Week 6 ILAB
Laboratory Number: 6
Laboratory Title: Embedded C Programming: Part I
Objectives:
1. To learn how to write a C program using CodeWarrior IDE
2. To learn how to program I/O instructions in C language
3. To learn how to organize a C program to read data from input ports, process the data, and display the result on a simple output device
4. To learn how to write inline assembly language in C
Results:
While programming with embedded C is the mindset; for embedded applications, we need to optimally use the resources, make the program code efficient, and satisfy real time constraints, if any.
Conclusions:
I was able to run the program successfully.
Team: May Saw EET
Name Program Signature
Observations/Measurements:
1. IV. 1-A. Cut and paste the Memory window.
IV. 1-B.Cut and paste the Memory window to show the value of result.
IV. 1.C – What is the value displayed on the LEDs after you single step the line PTT = ~result?
IV. 2. A. What are the LED values?
IV. 2. B. Calculate the delay size and show your work.
IV. 3. A. Cut and paste the source code.
IV. 3. B. Cut and paste the Memory window.
IV. 3. C. Describe the values of LEDs. What is the last value that you see?
IV. 4. A. Cut and paste the source code.
IV. 4. B. Describe the values of LEDs. What is the last value that you see? Does the loop end?
IV. 5. . Does the loop end? Describe the reason.
IV. 6. Cut and paste the source code.
Questions: 1. When we write a C program, in some cases, we need to write some part of the code in assembly language. What do we call an assembly-language code written in a C program? Describe a situation where assembly-language code is preferred over C.
2. Discuss the reason why we used unsigned char for a loop counter of Problem 4 as opposed to int.
Grade: Deliverable Points Available Points Achieved Laboratory Cover Sheet 8 Working Circuit(s)/Program(s) 8 Observations/Measurements 6 Questions 8 Total Points 30 Comments:
ECET330 Microprocessor Architecture
Week 7 ILAB
Laboratory Number: 7
Laboratory Title: Embedded C Programming: Part II
Objectives:
1. To become familiar with enabling internal pull-up resistors and reading an input port
2. To learn how to wait for a pushbutton press
3. To learn how to organize a C program to read data from input ports, process the data, and display the result on a simple output device
4. To learn how to use the ROM program space for data
Results:
There are four objectives for this week lab. The first objective is to become familiar with enabling internal pull-up resistors and reading an input port. The second objective is to learn how to wait for a push button press. The third objective is to learn how to organize a C program to read data from input ports, process the data, and display the result on a simple output device. The last objective is to learn how to use the ROM program space for data.
Conclusions:
This week lab gave me a much better understanding of reading the input ports and using the push buttons on the HCS12.
Team: May Saw EET
Name Program Signature
Observations/Measurements:
1. IV. 1- A. Cut and paste the Memory window, showing the value of mybye before pressing SW1.
IV. 1-B. Cut and paste the Memory window, showing the value of mybyte after pressing SW1.
IV. 1.C – Which LED light turns ON?
IV. 1.D- What are the LED values when you press SW2?
IV. 2. A. Cut and paste the source code.
IV. 2. B. What is the value of PT1AD? Cut and paste the Memory window, showing the value of PT1AD.
IV. 2. B. What are the LED values when you press SW2? Describe what you observe when you press any of the pushbuttons.
IV. 3. A. Cut and paste the source code.
IV. 3. B. What are the LED values when you press SW4? Describe what you observe when you press a different switch when the light is ON. .
IV. 4. A. Cut and paste the source code.
IV. 4. B. Cut and paste the Memory window.
IV. 4. C. Describe how you verify that the data is stored in ROM. Cut and paste the Memory window.
IV. 4. D. Describe how you verify that the data is stored in RAM. Cut and paste the Memory window.
Questions:
1. Describe the code statement:
while ((PT1AD & 0xF0) != 0xF0);
What does this code do? Do we need the inner parenthesis for the code to work? Why?
2. When we define an array in the program ROM space, we use a const keyword. What does this keyword do? What does happen if we remove this keyword?

Having Trouble Meeting Your Deadline?
Get your assignment on Devry ECET330 Complete Course Latest completed on time. avoid delay and – ORDER NOW