Chapter 1. Solutions Solution 1.1. Most RAMs are volatile, meaning the information is lost if power is removed then restored.

Size: px
Start display at page:

Download "Chapter 1. Solutions Solution 1.1. Most RAMs are volatile, meaning the information is lost if power is removed then restored."

Transcription

1 Chapter 1. Solutions Solution 1.1. Most RAMs are volatile, meaning the information is lost if power is removed then restored. Solution 1.2. The bus signals of the MC9S12C32 are AD15-0, R/W, LSTRB and E. The bus signals of the MC9S12DP512 are XADDR19-16, AD15-0, ECS, R/W, LSTRB and E. Solution 1.3. This table shows the function of devices for the two types of CPU bus cycles. CPU read cycle CPU write cycle can drive the address bus a) Processor b) processor can drive the data bus c) RAM, ROM, and I/O d) processor can drive the R/W bus e) Processor f) processor can receive info from data bus g) Processor h) RAM, and I/O Solution 1.4. The 74LS I IH is 0.02 ma, and the I IL is 0.4 ma The 9S12 I OH is 10 ma, and the I OL is 10 ma; the worst case is 10 ma/0.4 ma, which is 25. Solution 1.5. The supply current (I CC ) is smaller for CMOS devices. The CMOS devices also have smaller output currents. Because of the complementary nature (one PNP and one NPN) the total current will be small, meaning it operates at lower power. Solution 1.6. A 14-bit ADC has 2 14 = alternatives Solution 1.7. A 12-bit ADC has 2 12 = 4096 alternatives. This is about 4000 alternatives, which equals 3¾ decimal digits. Solution 1.8. A precision of 3½ decimal digits equals 2000 alternatives. The next higher power of 2 is 2048 alternatives, which equals 11 bits. Solution 1.9. A 16-bit ADC has 2 16 = alternatives Solution An 11-bit ADC has 2 11 = 2048 alternatives. This is about 2000 alternatives, which equals 3½ decimal digits. Solution A precision of 2¾ decimal digits equals 400 alternatives. The next higher power of 2 is 512 alternatives, which equals 9 bits. Solution A precision of 4¾ decimal digits equals alternatives. The next higher power of 2 is alternatives, which equals 16 bits. A 15-bit ADC would have alternatives, which is less than the desired amount of Solution is = 0001, is = 0011, is = 0111, is = 1100,1000 1

2 Solution is = 0001, is = 0011, is = 1000, is = 1111,1110 Solution $25 is 2*16+5 = 37 $63 is 6*16+3 = 99 $A3 is 10*16+3 = 163 $FE is 15*16+14 = 254 Solution ,0000,0110, is $206A = 2*4096+6*16+10 = 8298 Solution $1234 = 1*4096+2*256+3*16+4 = 4660 Solution = 4*256+13*16+2 = $04D2 Solution = 2*4096+7*256+1*16 = $2710 = 0010,0111,0001, Solution $1234 = 1*4096+2*256+3*16+4 = 4660 Solution $ABCD =1010,1011,1100, = = Solution = 4*256+13*16+2 = $04D2 Solution = =1101,1000,1111, = $D8F0 Solution The 9S12 has accumulators A,B or D, index registers X,Y, stack pointer SP, program counter PC and a condition code register CCR. Register A and B together comprise Register D. Solution The MC9S12C32 has 0x3800-0x3FFF 2 kibibytes of RAM 0x4000-0x7FFF 16 kibibytes Flash EEPROM 0xC000-0x7FFF 16 kibibytes Flash EEPROM The MC9S12DP512 has 0x0800-0x3FFF 14 kibibytes of RAM 0x4000-0xFFFF 512 kibibytes Flash EEPROM Solution Condition Code Register : S X H I N Z V C S : Stop disable X : X interrupt mask H : half-carry ( from bit 3 ) I : I interrupt mask N : negative Z : zero V : overflow C : carry 2

3 Solution MC9S12C32 Ports AD, A, B, E(bits 7-2), J(bits 7-6), M(bits5-0), P, S(bits 3-0), T MC9S12DP512 Ports A, B, E(bits 7-2), H, J(bits 7-6, 1-0), K (bits 7, 5-0), M, P S T Solution MC9S12C32 Port E(bits 1-0) MC9S12DP512 Ports AD1 AD0 E (bits 1-0) Solution A direction register specifies whether an I/O pin is input (read only) or output (read and write). Solution Direction registers make the pin more flexible, allowing for more uses of the pin. Each application can specify the functionality of the pin for its own purposes V 300Ω Solution D1.31. The 7405 can deliver the 5 ma output current required. Assume the V OL of the 7405 is 0.5 V. To get a diode current of 5 ma, we use a ( )/0.005 = 300- resistor. Solution D1.32. Because 1 ma LED current is so low, it can be interfaced directly to the microcontroller. Assume the V OL of the microcontroller is 0.5 V. To get a diode current of 1 ma, we use a ( )/0.001 = resistor. There are two ways to connect the LED to the microcomputer output. +5V microcontroller 2000Ω output 2000Ω microcontroller output Solution D.33. The I IH of the 74LS04 is 0.02 ma and V IH is 2 V. The pullup resistor must be smaller than (5-2 V)/0.02 ma = 150 k. This means the circuit will work as is, with the 10-k resistor. Solution D1.34. ldaa #$AA ;7,5,3,1 output staa DDRT ;6,4,2,0 input // 9S12 C 6,4,2,0 inputs DDRT = 0xAA; // 7,5,3,1 outputs Solution D1.35. // 9S12 C 7,6,3,2,1,0 ldaa #$30 ; 5,4 output DDRT = 0x30; // 5,4 output staa DDRT ; 7,6,3,2,1,0 Solution D1.36. This approach will work for all I/O ports with separate data and direction registers. The basic idea is to create a Virtual Data Direction Register (permanently stored in a global LogicalDDRT). Notice that for all three cases the data port can be zero. So the code PTT=0x00; is executed once in the ritual. There are three possibilities for each bit 1) Virtual Data Direction Register is an input, Make actual DDR an input 2) Virtual Data Direction Register is an output and the data out is 1, Make actual DDR an input (this makes it float as desired) 3

4 3) Virtual Data Direction Register is an output and the data out is 0, Make actual DDR an output (this activates the output transistors) Make the data bit 0 unsigned char LogicalDDRT; // simulated or virtual 6811 direction register void Pinit(unsigned char direction){ DDRT = 0x00; // 1 means output=0, 0 means input or output=1 PTT = 0x00; // we will toggle the DDRT to make output change LogicalDDRT = direction; // 1 means open collector output, 0 means input Pout(0xFF); // (optional) output pins are already HiZ void Pout(unsigned char data){ // Pout does not affect DDRC bits of pins which are inputs // for LogicalDDRT&data pins (high level=hiz outputs) make DDRT=0 DDRT &= ~( LogicalDDRT&data ); // for LogicalDDRC&(~data) pins (low level=0 outputs) make DDRT=1 DDRT = ( LogicalDDRT&(~data) ); +5V unsigned char Pin(void){ return PTT; // unchanged R Extra Question Design a circuit that interfaces a 2.4-V, 13-mA LED to YourComputer. Extra Solution The 7405 can deliver the 13 ma output current required. Assume the V OL of the 7405 is 0.5 V. To get a diode current of 13 ma, we use R= ( )/0.013 = 162- resistor Extra Question Design a circuit that interfaces a 2.3-V, 14-mA LED to YourComputer. Extra Solution The 7405 can deliver the 14 ma output current required. Assume the V OL of the 7405 is 0.5 V. To get a diode current of 14 ma, we use R= ( )/0.014 = 157- resistor. Extra Question Design a circuit that interfaces a 2.2-V, 11-mA LED to YourComputer. Extra Solution The 7405 can deliver the 11 ma output current required. Assume the V OL of the 7405 is 0.5 V. To get a diode current of 11 ma, we use R= ( )/0.011 = 209- resistor. Extra Question You are given the 9S12 voltage and current parameters for PT0: V OH, V OL, V IH, V IL, I OH, I OL, I IH, and I IL. The desired LED voltage is V D and the desired current is I D. Assume the LED current is small enough, so the LED can be interfaced directly to the 9S12 PT0 pin as shown. Give the equation to calculate the resistance R in terms of V D, I D, V OH, V OL, V IH, V IL, I OH, I OL, I IH, and I IL. Extra Solution When active the output voltage of PT0 will be V OH, and the LED voltage will be V D. This means (V OH - V D ) will develop across the resistor. To generate the desired LED current of I D, the resistor should be R = (V OH -V D )/ I D Extra Question You are given the 9S12 voltage and current parameters for PT1: V OH, V OL, V IH, V IL, I OH, I OL, I IH, and I IL. The desired LED voltage is V D and the desired current is I D. Assume the LED current is small enough, so the LED can be interfaced directly to the 9S12 PT1 pin as shown. Give the equation to calculate the resistance R in terms of V D, I D, V OH, V OL, V IH, V IL, I OH, I OL, I IH, and I IL. Extra Solution When active the output voltage of PT1 will be V OL, and the LED voltage will be V D. This means (5- V OL - V D ) will develop across the resistor. To generate the desired LED current of I D, the resistor should be R = (5 - V OL - V D )/ I D PT0 PT1 R R +5V 4

5 Extra Question If a system uses a 15-bit ADC, about how many decimal digits will it have? Extra Solution A 15-bit ADC has 2 15 = alternatives. This is more than alternatives, which equals 4½ decimal digits. Extra Question If a system uses a 17-bit ADC, about how many decimal digits will it have? Extra Solution A 17-bit ADC has 2 17 = alternatives. This is more than alternatives, which equals 5 decimal digits. It is enough less than 200,000 that we would not claim 5½ decimal digits. Extra Question If a system requires 2¾ decimal digits of precision, what is the smallest number of bits the ADC needs to have? Extra Solution A precision of 2¾ decimal digits equals 400 alternatives. The next higher power of 2 is 512 alternatives, which equals 9 bits. Extra Question The resolution of an 8-bit unsigned binary fixed-point number is 2 3, which equals 1/8. What is the value of the number if the integer stored in memory is 83? Extra Solution value = integer*resolution = 83/8 = Extra Question The resolution of an 8-bit unsigned binary fixed-point number is 2 7, which equals 1/128. What is the value of the number if the integer stored in memory is 49? Extra Solution value = integer*resolution = 49/128 = Extra Question The resolution of an 8-bit unsigned binary fixed-point number is 2 2, which equals 1/4. What is the value of the number if the integer stored in memory is 50? Extra Solution value = integer*resolution = 50/4 = 12.5 Extra Question Assume you are going to use a 16-bit signed decimal fixed-point number system to represent the values from to What is the smallest fixed-point resolution you could use? Extra Solution value = integer*resolution. The range of 16-bit signed integers is to The smallest resolution is 0.1, which would create a value range of to Extra Question Assume you are going to use a 16-bit unsigned decimal fixed-point number system to represent the values from 0 to 100. What is the smallest fixed-point resolution you could use? Extra Solution value = integer*resolution. The range of 16-bit unsigned integers is 0 to The smallest resolution is 0.01, which would create a value range of 0 to Extra Question Assume you are going to use a 16-bit signed binary fixed-point number system to represent the values from to What is the smallest fixed-point resolution you could use? Extra Solution value = integer*resolution. The range of 16-bit signed integers is to The smallest resolution is 1/32, which would create a value range of /32 to /32, which is to Extra Question A signed fixed point system has a range of values from -50 to +50 with a resolution of 2 8. Note: 2 8 equals 1/256. With which of the following data types should the software variables be allocated? When more than one answer is possible choose the most space efficient type. A) char B) unsigned char C) float D) short E) unsigned short F) double G) long H) unsigned long Extra Solution value = integer*resolution. The range of integers will be 50*256 to +5*256, which is to These integers will fit into D) short Extra Question A signed fixed point system has a range of values from -100 to +100 with a resolution of 2 9. Note: 2 9 equals 1/512. With which of the following data types should the software variables be allocated? When more than one answer is possible choose the most space efficient type. A) char B) unsigned char C) float D) short E) unsigned short F) double 5

6 G) long H) unsigned long Extra Solution value = integer*resolution. The range of integers will be 100*512 to +100*512, which is to These integers will fit into G) long Extra Question An unsigned fixed point system has a range of values from 0 to +100 with a resolution of 2 9. Note: 2 9 equals 1/512. With which of the following data types should the software variables be allocated? When more than one answer is possible choose the most space efficient type. A) char B) unsigned char C) float D) short E) unsigned short F) double G) long H) unsigned long Extra Solution value = integer*resolution. The range of integers will be 0 to 100*512, which is 0 to These integers will fit into E) unsigned short Extra Question Write software that initializes 9S12 Port T, so pins 3 and 4 are output without affecting the other 6 bits. Extra Solution bset DDRT,#$18 ; 4,3 output // 9S12 C DDRT = 0x18; // 4,3 output Extra Question Write software that initializes 9S12 Port T, so pins 6 and 1 are inputs without affecting the other 6 bits. Extra Solution bclr DDRT,#$42 ; 6,1 inputs // 9S12 C DDRT &= ~0x42; // 6,1 inputs Extra Question Write software that initializes 9S12 Port H, so all the pins are output, then outputs the repeating sequence $E0, $3C, $07. This software outputs the sequence over and over without stopping. Extra Solution main movb #$FF,DDRH loop movb #$E0,PTH movb #$3C,PTH movb #$07,PTH bra loop ;7-0 outputs // 9S12 C DDRH = 0xFF; // 7-0 outputs while(1){ PTH = 0xE0; PTH = 0x3C; PTH = 0x07; Extra Question Write software that initializes 9S12 Port M, so all the pins are output, then outputs the repeating sequence $01, $02, $04, $08. This software outputs the sequence over and over without stopping. Extra Solution main movb #$FF,DDRM loop movb #$01,PTM movb #$02,PTM movb #$04,PTM movb #$08,PTM bra loop ;7-0 outputs // 9S12 C DDRM = 0xFF; // 7-0 outputs while(1){ PTM = 0x01; PTM = 0x02; PTM = 0x04; PTM = 0x08; Extra Question Does the associative principle hold for signed integer multiply and divide? In particular do these two C calculations always achieve identical outputs? If no, give an example. Out1 = (A*B)/C; Out2 = A*(B/C); Extra Solution No (4*7)/2 = 14 4*(7/2) = 12 6

7 Extra Question Does the associative principle hold for signed integer addition and subtraction? In particular do these two C calculations always achieve identical outputs? If no, give an example. Out3 = (A+B)-C; Out4 = A+(B-C); Extra Solution Yes Extra Question In this question the input parameter is the temperature, T C, which is a 16-bit signed binary fixed-point number with a resolution of 1/8 ºC. The integer portion of this parameter is stored in memory as the variable Ic. The output of this function will be the temperature, T F, which is a 16-bit signed binary fixed-point number with a resolution of 1/8 ºF. Write C code that implements the conversion from ºC to ºF using fixed-point math. In particular, calculate T F =1.8*T C +32º. The function operates on the integer portion of the fixed point numbers. You may assume the input temperature range is bounded -50 < T C < +100 ºC. The prototype is short Convert(short Ic); // convert Ic to If Extra Solution =256/8. The largest input occurs at 100 ºC, yielding an integer value of 800. Overflow during the *9 using 16-bit math can t happen because 800*9=7200, which is less than short Convert(short Ic){ short If; // convert Ic to If If = (Ic*9)/ ; return If; Extra Question In this question the input parameter is the temperature, T C, which is a 16-bit signed binary fixed-point number with a resolution of 1/16 ºC. The integer portion of this parameter is stored in memory as the variable Ic. The output of this function will be the temperature, T F, which is a 16-bit signed binary fixed-point number with a resolution of 1/16 ºF. Write C code that implements the conversion from ºC to ºF using fixed-point math. In particular, calculate T F =1.8*T C +32º. The function operates on the integer portion of the fixed point numbers. You may assume the input temperature range is bounded -20 < T C < +50 ºC. The prototype is short Convert(short Ic); // convert Ic to If Extra Solution =512/16. The largest input occurs at 50 ºC, yielding an integer value of 800. Overflow during the *9 using 16-bit math can t happen because 800*9=7200, which is less than short Convert(short Ic){ short If; // convert Ic to If If = (Ic*9)/ ; return If; Extra Question In this question the input parameter is the temperature, T F, which is a 16-bit signed binary fixed-point number with a resolution of 1/8 ºF. The integer portion of this parameter is stored in memory as the variable If. The output of this function will be the temperature, T C, which is a 16-bit signed binary fixed-point number with a resolution of 1/8 ºC. Write C code that implements the conversion from ºF to ºC using fixed-point math. In particular, calculate T C =(5/9)*(T f -32º). The function operates on the integer portion of the fixed point numbers. You may assume the input temperature range is bounded -40 < T F < +120 ºF. The prototype is short Convert(short If); // convert If to Ic Extra Solution =256/8. The largest input occurs at 120 ºF, yielding an integer value of 960. The smallest input occurs at -40 ºF, yielding an integer value of Overflow during the *9 using 16-bit math can t happen because ( )*5= 3520, which is less than Similarly ( )*5= short Convert(short If){ short Ic; // convert Ic to If Ic = ((Ic-256)*5)/9; return Ic; Extra Question In this question the input parameter is the temperature, T F, which is a 16-bit signed binary fixed-point number with a resolution of 1/16 ºF. The integer portion of this parameter is stored in memory as the variable If. The output of this function will be the temperature, T C, which is a 16-bit signed binary fixed-point number with a resolution of 1/16 ºC. Write C code that implements the conversion from ºF to ºC using fixed-point math. In particular, calculate T C =(5/9)*(T f -32º). The function operates on the integer portion of the fixed point numbers. You may assume the input temperature range is bounded -40 < T F < +120 ºF. The prototype is short Convert(short If); // convert If to Ic 7

8 Extra Solution =512/16. The largest input occurs at 120 ºF, yielding an integer value of The smallest input occurs at -40 ºF, yielding an integer value of Overflow during the *9 using 16-bit math can t happen because ( )*5= 7040, which is less than Similarly ( )*5= short Convert(short If){ short Ic; // convert Ic to If Ic = ((Ic-512)*5)/9; return Ic; Dan, are you pondering what I m pondering? Yah. Ben, who plugged this typerwriter into our TV? J V w 8

EE319 K Lecture 3. Introduction to the 9S12 Lab 1 Discussion Using the TExaS simulator. University of Texas ECE

EE319 K Lecture 3. Introduction to the 9S12 Lab 1 Discussion Using the TExaS simulator. University of Texas ECE EE319 K Lecture 3 Introduction to the 9S12 Lab 1 Discussion Using the TExaS simulator University of Texas ECE Introduction (von Neumann architecture) processor Bus Memory Mapped I/O System Input Devices

More information

History of the Microprocessor. ECE/CS 5780/6780: Embedded System Design. Microcontrollers. First Microprocessors. MC9S12C32 Block Diagram

History of the Microprocessor. ECE/CS 5780/6780: Embedded System Design. Microcontrollers. First Microprocessors. MC9S12C32 Block Diagram History of the Microprocessor ECE/CS 5780/6780: Embedded System Design Chris J. Myers Lecture 1: 68HC12 In 1968, Bob Noyce and Gordon Moore left Fairchild Semiconductor and formed Integrated Electronics

More information

EE345L Fall 2007 December 14, 2007, 9am-12 Version 1 Page 1 of 8

EE345L Fall 2007 December 14, 2007, 9am-12 Version 1 Page 1 of 8 EE345L Fall 2007 December 14, 2007, 9am-12 Version 1 Page 1 of 8 Jonathan W. Valvano First: Last: This is the closed book section. You must put your answers in the boxes on this answer page. When you are

More information

Mark II Aiken Relay Calculator

Mark II Aiken Relay Calculator Introduction to Embedded Microcomputer Systems Lecture 6.1 Mark II Aiken Relay Calculator 2.12. Tutorial 2. Arithmetic and logical operations format descriptions examples h 8-bit unsigned hexadecimal $00

More information

EE345L Spring 2006 May 10, 2006, 2-5pm Page 1 of 8

EE345L Spring 2006 May 10, 2006, 2-5pm Page 1 of 8 EE345L Spring 2006 May 10, 2006, 2-5pm Page 1 of 8 Jonathan W. Valvano You can use the textbook, but no other materials. You must put your answers in the boxes on the answer pages. You have 3 hours, so

More information

Microcontrollers. Microcontroller

Microcontrollers. Microcontroller Microcontrollers Microcontroller A microprocessor on a single integrated circuit intended to operate as an embedded system. As well as a CPU, a microcontroller typically includes small amounts of RAM and

More information

EE345L Spring 2004 Quiz 1 Page 1 of 5. Last Name: First Name:

EE345L Spring 2004 Quiz 1 Page 1 of 5. Last Name: First Name: EE345L Spring 2004 Quiz 1 Page 1 of 5 Last Name: First Name: Jonathan W. Valvano February 25, 2004, 1:00pm-1:50pm This is a closed book exam. No notes or calculators are allowed, just a pencil and eraser.

More information

EE 308 Spring A software delay. To enter a software delay, put in a nested loop, just like in assembly.

EE 308 Spring A software delay. To enter a software delay, put in a nested loop, just like in assembly. More on Programming the 9S12 in C Huang Sections 5.2 through 5.4 Introduction to the MC9S12 Hardware Subsystems Huang Sections 8.2-8.6 ECT_16B8C Block User Guide A summary of MC9S12 hardware subsystems

More information

Introduction to Embedded Microcomputer Systems Lecture 6.1

Introduction to Embedded Microcomputer Systems Lecture 6.1 Introduction to Embedded Microcomputer Systems Lecture 6.1 Required equipment (you will need to buy these) 1) You will need a voltmeter (any cheap one will do, spending $10 to $20 is sufficient) (mydq

More information

CS/ECE 5780/6780: Embedded System Design

CS/ECE 5780/6780: Embedded System Design CS/ECE 5780/6780: Embedded System Design John Regehr Lecture 2: 68HC12 Architecture & Lab 1 Introduction Duff s Device void foo (int x, int *y, int *z) { switch (x % 8) { case 0: do { *y++ = *z++; case

More information

Introduction to Microcontroller. Systems. Embedded system. Assembler or C? Datatypes 2. Datatypes 1

Introduction to Microcontroller. Systems. Embedded system. Assembler or C? Datatypes 2. Datatypes 1 Introduction to Microcontroller Sven Knutsson 031-772 57 27 svenk@chl.chalmers.se www.chl.chalmers.se/~svenk/it_university 1 2 Embedded system Assembler or C? Real time Size Price Power consumption User

More information

ECE 4510/5530 Microcontroller Applications Chapter 7

ECE 4510/5530 Microcontroller Applications Chapter 7 ECE 450/5530 Microcontroller Applications Chapter 7 Dr. Bradley J. Bazuin Associate Professor Department of Electrical and Computer Engineering College of Engineering and Applied Sciences Chapter 7: Parallel

More information

EE319K Final Fall 2005 Solution C. (3) Question 1. (3) Question 2. short function(const short in){ return in+5; } const

EE319K Final Fall 2005 Solution C. (3) Question 1. (3) Question 2. short function(const short in){ return in+5; } const EE319K Final Fall 2005 Solution C. Jonathan Valvano (3) Question 1. Consider a matrix with 4 rows and 6 columns, stored in column-major zero-index format. Each element is 16 bits. Which equation correctly

More information

EE 308 Spring Lecture 28 March 30, 2012 Review for Exam 2. Introduction to the MC9S12 Expanded Mode

EE 308 Spring Lecture 28 March 30, 2012 Review for Exam 2. Introduction to the MC9S12 Expanded Mode Lecture 28 March 30, 2012 Review for Exam 2 Introduction to the MC9S12 Expanded Mode 1 Review for Exam 2 1. C Programming (a) Setting and clearing bits in registers PORTA = PORTA 0x02; PORTA = PORTA &

More information

Bachelor of Engineering in Computer and Electronic Engineering

Bachelor of Engineering in Computer and Electronic Engineering Bachelor of Engineering in Computer and Electronic Engineering Computer Engineering 1 Year 2 Semester 3 Autumn 08 Niall O Keeffe Instructions to Candidates: - 2 hours duration Answer 4 out of 6 questions.

More information

The CPU and Memory. How does a computer work? How does a computer interact with data? How are instructions performed? Recall schematic diagram:

The CPU and Memory. How does a computer work? How does a computer interact with data? How are instructions performed? Recall schematic diagram: The CPU and Memory How does a computer work? How does a computer interact with data? How are instructions performed? Recall schematic diagram: 1 Registers A register is a permanent storage location within

More information

Introduction to Programming the 9S12 in C Huang Sections 5.2 and 5.3. You will be able to use all of the Motorola data manuals on the exam.

Introduction to Programming the 9S12 in C Huang Sections 5.2 and 5.3. You will be able to use all of the Motorola data manuals on the exam. Introduction to Programming the 9S12 in C Huang Sections 5.2 and 5.3 o Comparison of C and Assembly programs for the HC12 o How to compile a C program using the GNU-C compiler o Using pointers to access

More information

Introduction to the MC9S12 Hardware Subsystems

Introduction to the MC9S12 Hardware Subsystems Setting and clearing bits in C Using pointers in C o Program to count the number of negative numbers in an area of memory Introduction to the MC9S12 Hardware Subsystems o The MC9S12 timer subsystem Operators

More information

// middle priority ISR Status.flag = 1; Status.y = 6;

// middle priority ISR Status.flag = 1; Status.y = 6; EE445L Spring 2018 Quiz 1A Page 1 of 6 Jonathan W. Valvano First: Last: March 1, 2018, 3:30pm-4:45pm. This is a closed book exam, with one 8.5 by 11-inch crib sheet. You have 75 minutes, so please allocate

More information

Clock. EE345L Spring 2003 Final Page 1 of 6. April 9, 2003, 1:00pm-1:50pm. (5) Question 1. Choose A-F. (5) Question 2. Choose A-E. (5) Question 3.

Clock. EE345L Spring 2003 Final Page 1 of 6. April 9, 2003, 1:00pm-1:50pm. (5) Question 1. Choose A-F. (5) Question 2. Choose A-E. (5) Question 3. EE345L Spring 2003 Final Page 1 of 6 Jonathan W. Valvano April 9, 2003, 1:00pm-1:50pm First: Last: (5) Question 1. (5) Question 2. (5) Question 3. Choose A-F Choose A-E Choose A-D (5) Question 4. Resolution=

More information

Chapter 1. Microprocessor architecture ECE Dr. Mohamed Mahmoud.

Chapter 1. Microprocessor architecture ECE Dr. Mohamed Mahmoud. Chapter 1 Microprocessor architecture ECE 3130 Dr. Mohamed Mahmoud The slides are copyright protected. It is not permissible to use them without a permission from Dr Mahmoud http://www.cae.tntech.edu/~mmahmoud/

More information

Input and Output Ports. How do you get data into a computer from the outside?

Input and Output Ports. How do you get data into a computer from the outside? Input and Output Ports How do you get data into a computer from the outside? SIMPLIFIED INPUT PORT D 7 Any read from address $0000 gets signals from outside H C 2 D a t a D D D4 D3 S i g n a l s F r o

More information

EE345L Fall 2008 Final Page 1 of 12

EE345L Fall 2008 Final Page 1 of 12 EE345L Fall 2008 Final Page 1 of 12 Jonathan W. Valvano First: Last: This is the closed book section. You must put your answers in the boxes on this answer page. When you are done, you turn in the closed-book

More information

Chapter 1 Microprocessor architecture ECE 3120 Dr. Mohamed Mahmoud http://iweb.tntech.edu/mmahmoud/ mmahmoud@tntech.edu Outline 1.1 Computer hardware organization 1.1.1 Number System 1.1.2 Computer hardware

More information

Principles of Digital Techniques PDT (17320) Assignment No State advantages of digital system over analog system.

Principles of Digital Techniques PDT (17320) Assignment No State advantages of digital system over analog system. Assignment No. 1 1. State advantages of digital system over analog system. 2. Convert following numbers a. (138.56) 10 = (?) 2 = (?) 8 = (?) 16 b. (1110011.011) 2 = (?) 10 = (?) 8 = (?) 16 c. (3004.06)

More information

Comparison of C and Assembly How to compile a C program using CodeWarrior

Comparison of C and Assembly How to compile a C program using CodeWarrior Comparison of C and Assembly How to compile a C program using CodeWarrior o Using pointers to access contents of specific addresses in C o Including and using derivative.h or hcs12.h to use in MC9S12 port

More information

ME 4447/6405. Microprocessor Control of Manufacturing Systems and Introduction to Mechatronics. Instructor: Professor Charles Ume LECTURE 6

ME 4447/6405. Microprocessor Control of Manufacturing Systems and Introduction to Mechatronics. Instructor: Professor Charles Ume LECTURE 6 ME 4447/6405 Microprocessor Control of Manufacturing Systems and Introduction to Mechatronics Instructor: Professor Charles Ume LECTURE 6 MC9S12C Microcontroller Covered in Lecture 5: Quick Introduction

More information

Chapter 4: Advanced Assembly Programming. EE383: Introduction to Embedded Systems University of Kentucky. Samir Rawashdeh

Chapter 4: Advanced Assembly Programming. EE383: Introduction to Embedded Systems University of Kentucky. Samir Rawashdeh Chapter 4: Advanced Assembly Programming EE383: Introduction to Embedded Systems University of Kentucky Samir Rawashdeh With slides based on material by H Huang Delmar Cengage Learning Chapter Summery

More information

MC9S12 Address Space

MC9S12 Address Space MC9S12 Address Space MC9S12 has 16 address lines MC9S12 can address 2 16 distinct locations For MC9S12, each location holds one byte (eight bits) MC9S12 can address 2 16 bytes 2 16 = 65536 2 16 = 2 6 2

More information

ECE2049-E18 Lecture 6 Notes 1. ECE2049: Embedded Computing in Engineering Design E Term Lecture #6: Exam Review

ECE2049-E18 Lecture 6 Notes 1. ECE2049: Embedded Computing in Engineering Design E Term Lecture #6: Exam Review ECE2049-E18 Lecture 6 Notes 1 ECE2049: Embedded Computing in Engineering Design E Term 2018 Lecture #6: Exam Review Administrivia Exam 1: Next Tuesday (6/5) HW4: Short assignment, due Tuesday Lab 1: Due

More information

EE345M Summer 2000 Quiz 1 Page 1 of 6. Reset Out. Cont

EE345M Summer 2000 Quiz 1 Page 1 of 6. Reset Out. Cont EE345M Summer 2000 Quiz 1 Page 1 of 6 Jonathan W. Valvano First: Last: July 3, 2000, 2:30pm-3:45pm This is an open book, open notes exam. You must put your answers on these pages only, you can use the

More information

COMP2121: Microprocessors and Interfacing. Instruction Set Architecture (ISA)

COMP2121: Microprocessors and Interfacing. Instruction Set Architecture (ISA) COMP2121: Microprocessors and Interfacing Instruction Set Architecture (ISA) http://www.cse.unsw.edu.au/~cs2121 Lecturer: Hui Wu Session 2, 2017 1 Contents Memory models Registers Data types Instructions

More information

Using the MC9S12 in Expanded Mode External Ports S12CPUV2 Reference Manual Multiplexed External Bus Interface (MEBI) Module V3 Block User Guide

Using the MC9S12 in Expanded Mode External Ports S12CPUV2 Reference Manual Multiplexed External Bus Interface (MEBI) Module V3 Block User Guide Using the MC9S12 in Expanded Mode External Ports S12CPUV2 Reference Manual Multiplexed External Bus Interface (MEBI) Module V3 Block User Guide - Computer with N bit address bus can access 2 N bytes of

More information

EE319K Fall 2013 Exam 1B Modified Page 1. Exam 1. Date: October 3, 2013

EE319K Fall 2013 Exam 1B Modified Page 1. Exam 1. Date: October 3, 2013 EE319K Fall 2013 Exam 1B Modified Page 1 Exam 1 Date: October 3, 2013 UT EID: Printed Name: Last, First Your signature is your promise that you have not cheated and will not cheat on this exam, nor will

More information

Introduction to Programming the 9S12 in C Huang Sections 5.2 and 5.3

Introduction to Programming the 9S12 in C Huang Sections 5.2 and 5.3 Introduction to Programming the 9S12 in C Huang Sections 5.2 and 5.3 o Comparison of C and Assembly programs for the HC12 o How to compile a C program using the GNU-C compiler o Using pointers to access

More information

538 Lecture Notes Week 3

538 Lecture Notes Week 3 538 Lecture Notes Week 3 (Sept. 16, 2013) 1/18 538 Lecture Notes Week 3 Answers to last week's questions 1 Write code so that the least significant bit of Accumulator A is cleared, the most significant

More information

Introduction to Computers - Chapter 4

Introduction to Computers - Chapter 4 Introduction to Computers - Chapter 4 Since the invention of the transistor and the first digital computer of the 1940s, computers have been increasing in complexity and performance; however, their overall

More information

ME4447/6405. Microprocessor Control of Manufacturing Systems and Introduction to Mechatronics. Instructor: Professor Charles Ume LECTURE 7

ME4447/6405. Microprocessor Control of Manufacturing Systems and Introduction to Mechatronics. Instructor: Professor Charles Ume LECTURE 7 ME4447/6405 Microprocessor Control of Manufacturing Systems and Introduction to Mechatronics Instructor: Professor Charles Ume LECTURE 7 Reading Assignments Reading assignments for this week and next

More information

Programming the Motorola MC68HC11 Microcontroller

Programming the Motorola MC68HC11 Microcontroller Programming the Motorola MC68HC11 Microcontroller COMMON PROGRAM INSTRUCTIONS WITH EXAMPLES aba Add register B to register A Similar commands are abx aby aba add the value in register B to the value in

More information

World Inside a Computer is Binary

World Inside a Computer is Binary C Programming 1 Representation of int data World Inside a Computer is Binary C Programming 2 Decimal Number System Basic symbols: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 Radix-10 positional number system. The radix

More information

Chapter 7 Central Processor Unit (S08CPUV2)

Chapter 7 Central Processor Unit (S08CPUV2) Chapter 7 Central Processor Unit (S08CPUV2) 7.1 Introduction This section provides summary information about the registers, addressing modes, and instruction set of the CPU of the HCS08 Family. For a more

More information

Exam 1 Feb. 23, 25, 27?

Exam 1 Feb. 23, 25, 27? Exam 1 Feb. 23, 25, 27? You will be able to use all of the Motorola data manuals on the exam. No calculators will be allowed for the exam. Numbers Decimal to Hex (signed and unsigned) Hex to Decimal (signed

More information

Comparison of C and Assembly How to compile a C program using CodeWarrior

Comparison of C and Assembly How to compile a C program using CodeWarrior Comparison of C and Assembly How to compile a C program using CodeWarrior o Using pointers to access contents of specific addresses in C o Including and using derivative.h or hcs12.h to use in MC9S12 port

More information

ECE372 CodeWarrior Simulator Andreou/Michaelides

ECE372 CodeWarrior Simulator Andreou/Michaelides CodeWarrior simulator demo The code can be written in C language (higher level) as well as in Assembly language (lower level). General C commands are applied across microcontroller families as opposed

More information

MICROPROCESSOR MEMORY ORGANIZATION

MICROPROCESSOR MEMORY ORGANIZATION MICROPROCESSOR MEMORY ORGANIZATION 1 3.1 Introduction 3.2 Main memory 3.3 Microprocessor on-chip memory management unit and cache 2 A memory unit is an integral part of any microcomputer, and its primary

More information

EE 308 Spring A software delay

EE 308 Spring A software delay A software delay To enter a software delay, put in a nested loop, just like in assembly. Write a function delay(num) which will delay for num milliseconds void delay(unsigned int num) volatile unsigned

More information

Ali Karimpour Associate Professor Ferdowsi University of Mashhad

Ali Karimpour Associate Professor Ferdowsi University of Mashhad AUTOMATIC CONTROL SYSTEMS Ali Karimpour Associate Professor Ferdowsi University of Mashhad Main reference: Christopher T. Kilian, (2001), Modern Control Technology: Components and Systems Publisher: Delmar

More information

EMBEDDED SYSTEMS. Part I: Introduction and Hardware

EMBEDDED SYSTEMS. Part I: Introduction and Hardware EMBEDDED SYSTEMS Part I: Introduction and Hardware Introduction Computer Processor RAM ROM Input Ports Output Ports External circuits Physical devices Input Signals Output Signals A computer system combines

More information

END-TERM EXAMINATION

END-TERM EXAMINATION (Please Write your Exam Roll No. immediately) END-TERM EXAMINATION DECEMBER 2006 Exam. Roll No... Exam Series code: 100919DEC06200963 Paper Code: MCA-103 Subject: Digital Electronics Time: 3 Hours Maximum

More information

ENE 334 Microprocessors

ENE 334 Microprocessors Page 1 ENE 334 Microprocessors Lecture 7: MCS-51 Architecture I : Dejwoot KHAWPARISUTH http://webstaff.kmutt.ac.th/~dejwoot.kha/ ENE 334 MCS-51 Architecture I Page 2 Outlines: 8051 Microcontroller Hardware

More information

8.7. Finite state machines with statically-allocated linked structures Stepper motor controller L 293

8.7. Finite state machines with statically-allocated linked structures Stepper motor controller L 293 Introduction to Embedded Microcomputer Systems Lecture 23.1 8.7. Finite state machines with statically-allocated linked structures Stepper motor controller Inputs: Go and Turn Outputs: two 4-wire bipolar

More information

Introduction to Embedded Systems and Chapter 1: Introduction to HCS12/MC9S12. EE383: Introduction to Embedded Systems University of Kentucky

Introduction to Embedded Systems and Chapter 1: Introduction to HCS12/MC9S12. EE383: Introduction to Embedded Systems University of Kentucky Introduction to Embedded Systems and Chapter 1: Introduction to HCS12/MC9S12 EE383: Introduction to Embedded Systems University of Kentucky Samir Rawashdeh With slides based on material by H. Huang Delmar

More information

Unit 6 1.Random Access Memory (RAM) Chapter 3 Combinational Logic Design 2.Programmable Logic

Unit 6 1.Random Access Memory (RAM) Chapter 3 Combinational Logic Design 2.Programmable Logic EE 200: Digital Logic Circuit Design Dr Radwan E Abdel-Aal, COE Unit 6.Random Access Memory (RAM) Chapter 3 Combinational Logic Design 2. Logic Logic and Computer Design Fundamentals Part Implementation

More information

ECE2049: Embedded Computing in Engineering Design A Term Fall Lecture #9: Exam Review w/ Solutions

ECE2049: Embedded Computing in Engineering Design A Term Fall Lecture #9: Exam Review w/ Solutions ECE2049: Embedded Computing in Engineering Design A Term Fall 2018 Lecture #9: Exam Review w/ Solutions Reading for Today: Review all reading and notes, Davies Ch 1, 2, 4,7, MSP430 User's Guide Ch 6.1,

More information

C Language Programming, Interrupts and Timer Hardware

C Language Programming, Interrupts and Timer Hardware C Language Programming, Interrupts and Timer Hardware In this sequence of three labs, you will learn how to write simple C language programs for the MC9S12 microcontroller, and how to use interrupts and

More information

ECE2049 E17 Lecture 4 MSP430 Architecture & Intro to Digital I/O

ECE2049 E17 Lecture 4 MSP430 Architecture & Intro to Digital I/O ECE2049-E17 Lecture 4 1 ECE2049 E17 Lecture 4 MSP430 Architecture & Intro to Digital I/O Administrivia Homework 1: Due today by 7pm o Either place in box in ECE office or give to me o Office hours tonight!

More information

ECE2049-E17 Lecture 6 1. ECE2049: Embedded Computing in Engineering Design E Term Lecture #6: Exam Review

ECE2049-E17 Lecture 6 1. ECE2049: Embedded Computing in Engineering Design E Term Lecture #6: Exam Review ECE2049-E17 Lecture 6 1 ECE2049: Embedded Computing in Engineering Design E Term 2017 Lecture #6: Exam Review Administrivia Exam 1: Next Tuesday (6/6) HW2: Due Tonight at 7pm Lab 1: Due next Tuesday (6/6),

More information

CET360 S12 DEMO PROGRAM #1 (C)

CET360 S12 DEMO PROGRAM #1 (C) CET360 S12 DEMO PROGRAM #1 (C) / ONE.C HCS12 Demo Program for CET360 13-Feb-2009 jss This program is the C implementation of ONE.ASM, the demo program that sets up port T as all outputs & increments it

More information

FIFTH SEMESTER DIPLOMA EXAMINATION IN ENGINEERING/ TECHNOLOGY-MARCH 2014 EMBEDDED SYSTEMS (Common for CT,CM) [Time: 3 hours] (Maximum marks : 100)

FIFTH SEMESTER DIPLOMA EXAMINATION IN ENGINEERING/ TECHNOLOGY-MARCH 2014 EMBEDDED SYSTEMS (Common for CT,CM) [Time: 3 hours] (Maximum marks : 100) (Revision-10) FIFTH SEMESTER DIPLOMA EXAMINATION IN ENGINEERING/ TECHNOLOGY-MARCH 2014 EMBEDDED SYSTEMS (Common for CT,CM) [Time: 3 hours] (Maximum marks : 100) PART-A (Maximum marks : 10) I. Answer all

More information

EE345L Spring 2004 Final Version 3 Page 1 of 8

EE345L Spring 2004 Final Version 3 Page 1 of 8 EE345L Spring 2004 Final Version 3 Page 1 of 8 Jonathan W. Valvano May 12, 2004, 9am-12noon This is a closed book exam. You must put your answers in the boxes on the answer pages. You have 3 hours, so

More information

COMP2611: Computer Organization. Data Representation

COMP2611: Computer Organization. Data Representation COMP2611: Computer Organization Comp2611 Fall 2015 2 1. Binary numbers and 2 s Complement Numbers 3 Bits: are the basis for binary number representation in digital computers What you will learn here: How

More information

EE4390 Microprocessors. Lessons 2, 3 68HC12 Hardware Overview, Subsystems, and memory System

EE4390 Microprocessors. Lessons 2, 3 68HC12 Hardware Overview, Subsystems, and memory System EE4390 Microprocessors Lessons 2, 3 68HC12 Hardware Overview, Subsystems, and memory System 1 Overview 68HC12 hardware overview Subsystems Memory System 2 68HC12 Hardware Overview "Copyright of Motorola,

More information

1. INTRODUCTION TO MICROPROCESSOR AND MICROCOMPUTER ARCHITECTURE:

1. INTRODUCTION TO MICROPROCESSOR AND MICROCOMPUTER ARCHITECTURE: 1. INTRODUCTION TO MICROPROCESSOR AND MICROCOMPUTER ARCHITECTURE: A microprocessor is a programmable electronics chip that has computing and decision making capabilities similar to central processing unit

More information

CodeWarrior. Microcomputer Architecture and Interfacing Colorado School of Mines Professor William Hoff

CodeWarrior. Microcomputer Architecture and Interfacing Colorado School of Mines Professor William Hoff CodeWarrior 1 Assembler An assembler is a program that translates assembly language into machine code. Machine code are the numbers that the CPU recognizes as instructions. $B6 $10 $00 Assembly language

More information

Ali Karimpour Associate Professor Ferdowsi University of Mashhad

Ali Karimpour Associate Professor Ferdowsi University of Mashhad AUTOMATIC CONTROL SYSTEMS Ali Karimpour Associate Professor Ferdowsi University of Mashhad Main reference: Christopher T. Kilian, (2001), Modern Control Technology: Components and Systems Publisher: Delmar

More information

HC12 Built-In Hardware

HC12 Built-In Hardware HC12 Built-In Hardware The HC12 has a number of useful pieces of hardware built into the chip. Different versions of the HC12 have slightly different pieces of hardware. We are using the MC68HC912B32 chip

More information

8051 Microcontroller

8051 Microcontroller 8051 Microcontroller The 8051, Motorola and PIC families are the 3 leading sellers in the microcontroller market. The 8051 microcontroller was originally developed by Intel in the late 1970 s. Today many

More information

Fixed-Point Math and Other Optimizations

Fixed-Point Math and Other Optimizations Fixed-Point Math and Other Optimizations Embedded Systems 8-1 Fixed Point Math Why and How Floating point is too slow and integers truncate the data Floating point subroutines: slower than native, overhead

More information

Sample Problem Set #1

Sample Problem Set #1 Sample Problem Set #1 Notes: These problems are typical exam problems; most are drawn from previous homeworks and exams. This exam is open book, open notes. It may help to have a calculator. For partial

More information

3. The MC6802 MICROPROCESSOR

3. The MC6802 MICROPROCESSOR 3. The MC6802 MICROPROCESSOR This chapter provides hardware detail on the Motorola MC6802 microprocessor to enable the reader to use of this microprocessor. It is important to learn the operation and interfacing

More information

The x86 Microprocessors. Introduction. The 80x86 Microprocessors. 1.1 Assembly Language

The x86 Microprocessors. Introduction. The 80x86 Microprocessors. 1.1 Assembly Language The x86 Microprocessors Introduction 1.1 Assembly Language Numbering and Coding Systems Human beings use the decimal system (base 10) Decimal digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 Computer systems use the

More information

Using peripherals on the MSP430 (if time)

Using peripherals on the MSP430 (if time) Today's Plan: Announcements Review Activities 1&2 Programming in C Using peripherals on the MSP430 (if time) Activity 3 Announcements: Midterm coming on Feb 9. Will need to write simple programs in C and/or

More information

CHAPTER 8. Solutions for Exercises

CHAPTER 8. Solutions for Exercises CHAPTER 8 Solutions for Exercises E8.1 The number of bits in the memory addresses is the same as the address bus width, which is 20. Thus the number of unique addresses is 2 20 = 1,048,576 = 1024 1024

More information

ADC SCALER METHOD V REF R TOP V ADC R BOT

ADC SCALER METHOD V REF R TOP V ADC R BOT ADC SCALER METHOD The purpose of this scaler calculation is to eliminate long division in the conversion of raw ADC data into a human readable decimal value using only integer math. This scale factor will

More information

Wed. Aug 23 Announcements

Wed. Aug 23 Announcements Wed. Aug 23 Announcements Professor Office Hours 1:30 to 2:30 Wed/Fri EE 326A You should all be signed up for piazza Most labs done individually (if not called out in the doc) Make sure to register your

More information

The 9S12 in Expanded Mode - How to get into expanded mode Huang Chapter 14

The 9S12 in Expanded Mode - How to get into expanded mode Huang Chapter 14 The 9S2 in Expanded Mode - How to get into expanded mode Huang Chapter 4 Getting into expanded mode The HCS2 can operate in several modes: Normal Single-Chip Mode (the way we have been using the HCS2)

More information

Number Systems (2.1.1)

Number Systems (2.1.1) Number Systems (2.1.1) Concept of a register. Operations of register, Complementation, Ranges, Left and right shifts, Addition of two binary number, Numerical overflow, 2 s complement representation, Binary

More information

Latch-Up. Parasitic Bipolar Transistors

Latch-Up. Parasitic Bipolar Transistors Latch-Up LATCH-UP CIRCUIT Latch-up is caused by an SCR (Silicon Controlled Rectifier) circuit. Fabrication of CMOS integrated circuits with bulk silicon processing creates a parasitic SCR structure. The

More information

UNIVERSITY OF HONG KONG DEPARTMENT OF ELECTRICAL AND ELECTRONIC ENGINEERING. Principles of Computer Operation

UNIVERSITY OF HONG KONG DEPARTMENT OF ELECTRICAL AND ELECTRONIC ENGINEERING. Principles of Computer Operation UNIVERSITY OF HONG KONG DEPARTMENT OF ELECTRICAL AND ELECTRONIC ENGINEERING Experiment PCO: Principles of Computer Operation Location: Part I Lab., CYC 102. Objective: The objective is to learn the basic

More information

Number Systems for Computers. Outline of Introduction. Binary, Octal and Hexadecimal numbers. Issues for Binary Representation of Numbers

Number Systems for Computers. Outline of Introduction. Binary, Octal and Hexadecimal numbers. Issues for Binary Representation of Numbers Outline of Introduction Administrivia What is computer architecture? What do computers do? Representing high level things in binary Data objects: integers, decimals, characters, etc. Memory locations (We

More information

EE445L Fall 2010 Final Version A Page 1 of 10

EE445L Fall 2010 Final Version A Page 1 of 10 EE445L Fall 2010 Final Version A Page 1 of 10 Jonathan W. Valvano First: Last: This is the closed book section. You must put your answers in the boxes on this answer page. When you are done, you turn in

More information

Hours / 100 Marks Seat No.

Hours / 100 Marks Seat No. 17320 21718 3 Hours / 100 Seat No. Instructions (1) All Questions are Compulsory. (2) Answer each next main Question on a new page. (3) Figures to the right indicate full marks. (4) Assume suitable data,

More information

Immediate vs. Extended mode: Immediate values are marked with a # symbol. They also are different instructions when assembled.

Immediate vs. Extended mode: Immediate values are marked with a # symbol. They also are different instructions when assembled. So, you basically didn t study and now you re in the final and you hope to pass this test and save your miserable grade... And you expect this cheat sheet to save you? Well, I sincerely hope it does. Slacker.

More information

538 Lecture Notes Week 5

538 Lecture Notes Week 5 538 Lecture Notes Week 5 (Sept. 30, 2013) 1/15 538 Lecture Notes Week 5 Answers to last week's questions 1. With the diagram shown for a port (single bit), what happens if the Direction Register is read?

More information

Microcomputers. Outline. Number Systems and Digital Logic Review

Microcomputers. Outline. Number Systems and Digital Logic Review Microcomputers Number Systems and Digital Logic Review Lecture 1-1 Outline Number systems and formats Common number systems Base Conversion Integer representation Signed integer representation Binary coded

More information

538 Lecture Notes Week 5

538 Lecture Notes Week 5 538 Lecture Notes Week 5 (October 4, 2017) 1/18 538 Lecture Notes Week 5 Announements Midterm: Tuesday, October 25 Answers to last week's questions 1. With the diagram shown for a port (single bit), what

More information

ECE2049 Homework #2 The MSP430 Architecture & Basic Digital IO (DUE Friday 9/8/17 at 4 pm in class)

ECE2049 Homework #2 The MSP430 Architecture & Basic Digital IO (DUE Friday 9/8/17 at 4 pm in class) ECE2049 Homework #2 The MSP430 Architecture & Basic Digital IO (DUE Friday 9/8/17 at 4 pm in class) Your homework should be neat and professional looking. You will loose points if your HW is not properly

More information

ECE/CS 5780/6780: Embedded System Design

ECE/CS 5780/6780: Embedded System Design ECE/CS 5780/6780: Embedded System Design Scott R. Little Lecture 10: Interrupts in the 6812 Scott R. Little (Lecture 10: 6812 Interrupts) ECE/CS 5780/6780 1 / 35 General Features of Interrupts All interrupting

More information

General Features of Interrupts. ECE/CS 5780/6780: Embedded System Design. Stack Before and After an Interrupt. Sequence of Events During Interrupt

General Features of Interrupts. ECE/CS 5780/6780: Embedded System Design. Stack Before and After an Interrupt. Sequence of Events During Interrupt General Features of Interrupts ECE/CS 5780/6780: Embedded System Design Scott R. Little Lecture 10: Interrupts in the 6812 All interrupting systems must have the: Ability for the hardware to request action

More information

538 Lecture Notes Week 1

538 Lecture Notes Week 1 538 Clowes Lecture Notes Week 1 (Sept. 6, 2017) 1/10 538 Lecture Notes Week 1 Announcements No labs this week. Labs begin the week of September 11, 2017. My email: kclowes@ryerson.ca Counselling hours:

More information

PRINCETON (VON NEUMAN) ARCHITECTURE MICROPROCESSOR

PRINCETON (VON NEUMAN) ARCHITECTURE MICROPROCESSOR 1 IN OUT PRINCTON (VON NUMAN) ARCHITCTUR DATA MICROPROCSSOR ALU CONTROL STATUS INSTRUCTION CONTROL CONTROL & ADDR CLOCK ADDR(N Bits) COMPUTR DATA(M Bits) CONTROL Computer with N bit address bus can access

More information

EE319K Spring 2015 Exam 1 Page 1. Exam 1. Date: Feb 26, 2015

EE319K Spring 2015 Exam 1 Page 1. Exam 1. Date: Feb 26, 2015 EE319K Spring 2015 Exam 1 Page 1 Exam 1 Date: Feb 26, 2015 UT EID: Printed Name: Last, First Your signature is your promise that you have not cheated and will not cheat on this exam, nor will you help

More information

XC95288 In-System Programmable CPLD

XC95288 In-System Programmable CPLD 0 XC95288 In-System Programmable CPLD DS069 (v4.1) August 21, 2003 0 5 Product Specification Features 15 ns pin-to-pin logic delays on all pins f CNT to 95 MHz 288 macrocells with 6,400 usable gates Up

More information

Lab 5: EBI and ADC: Digital Voltmeter

Lab 5: EBI and ADC: Digital Voltmeter Page 1/5 OBJECTIVES Learn how to use C (as an alternative to Assembly) in your programs. Learn how to use an analog-to-digital conversion (ADC, also known as A/D) system on a microcontroller. Use the ADC

More information

Using the stack and the stack pointer

Using the stack and the stack pointer Using the stack and the stack pointer o The Stack and Stack Pointer o The stack is a memory area for temporary storage o The stack pointer points to the last byte in the stack o Some instructions which

More information

The MC9S12 address, data and control buses The MC9S12 single-chip mode memory map Simplified write/read cycle. Address, Data and Control Buses

The MC9S12 address, data and control buses The MC9S12 single-chip mode memory map Simplified write/read cycle. Address, Data and Control Buses EE 308 Spring 2013 The MC9S12 address, data and control buses The MC9S12 single-chip mode memory map Simplified write/read cycle The real MC9S12 multiplexed external bus Byte order in microprocessors How

More information

8051 Microcontrollers

8051 Microcontrollers 8051 Microcontrollers Richa Upadhyay Prabhu NMIMS s MPSTME richa.upadhyay@nmims.edu March 8, 2016 Controller vs Processor Controller vs Processor Introduction to 8051 Micro-controller In 1981,Intel corporation

More information

MC68HC05J1A/D Rev. 1.0 HC 5 MC68HC05J1A MC68HCL05J1A MC68HSC05J1A. HCMOS Microcontroller Units TECHNICAL DATA

MC68HC05J1A/D Rev. 1.0 HC 5 MC68HC05J1A MC68HCL05J1A MC68HSC05J1A. HCMOS Microcontroller Units TECHNICAL DATA MC68HC0J1A/D Rev. 1.0 HC MC68HC0J1A MC68HCL0J1A MC68HSC0J1A HCMOS Microcontroller Units TECHNICAL DATA Technical Data Motorola reserves the right to make changes without further notice to any products

More information

The Atmel ATmega328P Microcontroller

The Atmel ATmega328P Microcontroller Ming Hsieh Department of Electrical Engineering EE 459Lx - Embedded Systems Design Laboratory 1 Introduction The Atmel ATmega328P Microcontroller by Allan G. Weber This document is a short introduction

More information

Arithmetic Operations

Arithmetic Operations Arithmetic Operations Arithmetic Operations addition subtraction multiplication division Each of these operations on the integer representations: unsigned two's complement 1 Addition One bit of binary

More information