ECET 310:  Microprocessors I                                                                            Fall of 2008

 

 

Class Hours

Tuesday

1:45  -  3:55

Thursday

3:15  -  5:25

 

 

Office Hours   (GITC 2101)

 

Tuesday

Thursday

4:30 – 6:00

2:00 -  3:00

 

Snow Phone

973-596-3000  (Day classes by 6 A.M., evening classes by 2 P.M.)

 

Lectures

 

Chapter 1a                        Chapter 1b

 

Chapter 2a                        Chapter 2b        Chapter 2c

 

Basic I/O Issues                 Chapter 4          Chapter 6

 

 

Labs

 

Lab Report Requirements                                              LAB 1

 

First Exp w_ Dragon 12.htm                                                       LAB 2

 

 

 

 

Course Objectives

 

 

By the end of the course the student will be able to explain and apply the following:

 

1.     The characteristics of a microcontroller, its applications and how it compares to a microprocessor.

 

2.     The relationship between hardware and software and how they work together to accomplish a task.

 

3.     How digital building blocks (such as ALU, memory, multiplexers, decoders) work together in a microcontroller.

 

4.     Interfacing to the mostly analog outside world making use of timers, input capture/output compare, PWM, A/D, serial and parallel ports and interrupts.

 

5.     An Integrated Development Environment, an Evaluation Board, and various other tools for project design, troubleshooting and debugging.

 

6.     Analysis of a given flow chart and hardware schematic to deduce operation and functions of a microcontroller/embedded system.

 

7.     Synthesis of a microcontroller/embedded system from a real-life problem statement.

 

 

Grading:

Homework  

15 %

Tests

25 %

PRs

10%

 

Lab Work

25 %

Final Exam

25 %

 

 

 

 

 



 

 

Note:
(1) NJIT Honor Code will be strictly followed in all courses.
(2) Any revisions to the syllabus during the semester will be made in consultation with students.


 

                                          ECET 310:  Microprocessors I

 

Text: Huang, Han-Way, The HCS12/9S12: An Introduction to Software and Hardware Interfacing, Thomson/Delmar.

Software: Included with Text

Hardware: Dragon 12 board from Wytec.

 

Week

Date

Reading

 

Topics & Activities

Homework & PRs

 

1

 

 

9/2,9/4

 

1.1 – 1.4

Course Intro, Number systems, Setup lab groups, Microcontroller and Microprocessor architecture, Registers

 

 

#1  Ch. 1: 1 -  9 

 

2

 

9/9,9/11

 

1.5 – 1.12

Addressing modes

Four types of instructions

 

#2  Ch. 1: 10 – 20    &  PR1

 

 

3

 

9/16,9/18

 

2.1 - 2.5

Assembly code and structure, Assembler directives, Arithemetic, BCD

 

 

#3  Ch. 2: 1- 5, 6, 8, 9, 10, 12

& PR2

 

4

 

9/23,9/25

 

2.6 – 2.12

 

Loops, shift and rotate, bit operations, execution time

 

#4  Ch. 2: 13, 14, 15, 17, 19, 23, 24

& PR3  

 

5

 

9/30,10/2

 

3.1 – 3.8

 

Using the assembler and EVB

 

Instructor Assigned Problems

 

6

 

 

10/7,10/9

 

4.1 – 4.8

 

Arrays, vectors, strings, stack usage, introduction to subroutines

 

#5  Ch. 4 : 1, 2, 3, 6, 9, 10 & PR4

7

10/14,10/16

 

Midterm and catch-up

 

 

8

 

 

10/21,10/23

 

4.9 – 4.12

 

Subroutine examples, D-Bug12 functions

 

#7  Ch. 4:  12, 14, 18 

 

9

 

10/28,10/30

 

Chapter 6

 

Interrupts, Clock and Reset Generation Block, WAI, Stop, Resets, Operation Modes

 

#8  Ch. 6: 1 – 8, L2 & PR5

 

 

10

 

11/4,11/6

 

7.1 – 7.7

 

I/O basics, I/O Synchronizing, Parallel Ports, I/O Electrical Considerations, I/O Device Interfacing

 

#9  Ch. 7: 1 - 4

 

 

11

 

11/11,11/13

 

7.7 – 7.14

 

 

LCD Control, Switches, Keypads, D/A, Stepper Motors, Key Wakeups

 

 

#10 Ch. 7: 6, 7, 9, 11, 14 & PR6

 

12

 

 

11/18, 11/20

 

8.1 – 8.7

 

Timer Control Register, Input-Capture, Output Compare, Pulse Accumulator

 

#11  Ch. 8: 1, 2, 7, 16, L1

 

13

 

 

11/25

 

8.10 – 8.12

 

Modulus Down Counter, Pulse Width Modulation, DC Motor Control

 

#12  Ch. 8: 5, 9, 11, 17, L2, L3 & PR7

 

14

 

 

12/2,12/4

 

12.1 – 12.6

 

A/D Conversion Basics, Pins and Registers Used for A/D, A/D Procedures, Temperature Sensing

 

#13  Ch. 12: 1 – 7, L1

15

12/9

 

REVIEW

 


 

Laboratory Exercises

 

Objectives of Laboratory Exercises

 

  1. Become familiar with firmware/software and hardware covered in this course. Given a program, enter, assemble, download, and run that program on an HCS12 microcontroller based evaluation board. Write a modified version of the given program and assemble/debug/download/run the program.

     
  2. Write and run a binary count assembly language program and a “chaser light” assembly language program. The 8 LEDs on the Dragon12 are used for displaying the count and the chaser light. A timing delay using a loop within a subroutine is used in both programs.

 

Possibly one or more of the following:

 

  1. Develop a simple alarm system making use of switches for modes, push buttons for windows, LEDs for status, and the speaker for sounding an alarm.

     
  2. Using a multiplexing technique, display the student’s birthday on a quad 7-segment display using the format: mm dd and then the year in four digits.

     
  3. Making use of A/D to develop a simple digital voltmeter.

     
  4. Revise  # 5 by using ‘C’ programming and the LCD display.

     

Operations in the Lab

 

The class will be divided into groups of three students. For each laboratory exercise the three students will be assigned as follows:
          1. the pre-lab person is responsible for assuring the pre-lab work is complete and communicates with group and instructor up to the actual lab day

          2. the facilitator makes sure the time is spent productively in lab itself keeping everyone on task

          3. the spokesperson/recorder interacts with instructor and other groups and makes sure all important results and problems are recorded in a notebook (which each group maintains through the semester and which is signed by the group members and the instructor each week)

 

NOTE: Regardless of each student’s assignment, everyone is responsible to know and understand what is going on with a particular lab exercise. It is hoped that these lab groups will also evolve into study groups, which have been shown to help students improve their learning.

 

 

 


 

References and Links

 

1.      Simulation Software:

           

Free!! -  Special Edition, Version 4.5 (Limitation:  Maximum code size = 32K)

 

 

Assembler_HC12, Debugger_HC12)

 

 

2.      ASM IDE homepage http://www.ericengler.com/AsmIDE.aspx

 

3.      Dragon 12:  http://www.evbplus.com/dragon12.html

 

4.      Freescale free online training (this is the manufacturer of our microcontroller, HCS12)

5.      General: students are encouraged to do their own research on the web and share their results with their peers.