EE342 Microcontroller Based System Design

Home

Catalog description

EE342. Microcontroller Based System Design
Credits: 3
Microprocessor architecture, the microcontroller based system design context, and peripheral interfacing. C and machine language programming and debugging, and embedded applications. Associated laboratory exercises include topics such as stand-alone system programming, interfacing to peripherals, interrupts, timers, analog data acquisition, and intercomputer communications. Two hours of lecture and one two-hour lab per week.
Prerequisites: EE-241, and either EE-247 or CS-126 as corequisites.

This has long been one of my favorite courses. Over the course of the semester we do both hardware and software for an embedded application to, ultimately, do distributed control of an HO toy train layout. This involves programming the microcontroller (in C), building interface hardware, programming the Windows PC (using C++) for the application with which a user controls part of the train layout, and the communications (using USB) between the microcontroller and the PC. All of those things need to work together, and live cooperatively with the systems of the other students. It's an interesting challenge.

A special (limited/development) offering of this course is being offered Spring 2020, with the next regular offering expected Fall 2020. It is normally offered in the fall of even numbered years.

Syllabus and Laboratory Exercises

Offering Spring 2020

We are using the NXP/Freescale "Kinetis" family KL43Z microcontroller. (The DEMOJM prototyping boards and the Coldfire family of processors previously used have been discontinued by NXP.) Much of what we are doing will make use of the serial port and the "terminal" program borrowed from the Freescale JM family demo support software (PE Micro). The KL43Z puts the programmer farther from the hardware, which is accessed through driver functions in most cases. Much of the tutorial material to support the course is in an incomplete state of development (or at least needs some updating or revision) at this time. Below are the syllabus (with projects) and some other useful tutorials and documents.

  • EE342 Syllabus, Spring 2020
  • The Terminal Program (for SH8) We will also use this with the KL43Z before shifting to USB later.
  • KL43 Sub-family ReferenceManual
  • FRDM-KL43Z pinout diagram (for demo board)
  • FRDM-KL43Z board schematic
  • FRDM-KL43Z channel pinout
  • Getting Started with the KL43Z Includes using the terminal program.
  • KL43Zterminal.c
  • Port Assertion Demo for KL43Z Ports are more complicated than with the SH8!
  • Understanding KL43Z Ports This is about how the port manipulation software works
  • Driving the FRDM-KL43Z LCD Display
  • Using the DAC and ADC with the KL43Z
  • Using the TPM timer with the KL43Z (for doing PWM waveforms)
  • Using the USB interface with the FRDM-KL43Z This document shows how to adapt the KL43Z HID USB demo to work with the earlier CMS hid-led-demo PC application
  • See also the Visual Studio / Windows material below from S17
  • Note: Some of the above materials were developed using Kinetis Development System (KDS) rather than the more recently recommended MCUXpresso IDE. Some of the utility or board related functions may have changed.

    Other reference material

    Reference material from previous F18 offering where the SH8 was used for initial phases of the course. The KL28Z was a possible candidate for this course. It comes with a similar DEMO board but does not have the LCD display. It does have more pins and more capability though.

  • MC9S08SH8 Manual This microcontroller is very similar to the MC9S08QG8 used in EGR222.
  • SH8 Demo Board Manual
  • MKL28ZRM Reference Manual Different uC in same family as KL43Z
  • Running of the Trains Fall 18
  • The S17 course in the past made use of the Freescale/NXP "Coldfire" JM128 processor, which is now no longer available. Still, some of the materials below will continue to be useful, especially those concerned with programming on the Windows PC side of the interface.

  • Syllabus, Lab projects
  • An Introduction to C (from EGR140) (2.3MB) An introduction using Visual Studio.
  • An intro exercise using uC (from EGR222) (.94MB) Lab 7 - blink LED and stepper with timing loops
  • Starting a CW10 Project
  • Help starting to use the hid demo under CW10 (Shouldn't need this anymore with the KL43Z.)
  • Tour of the introductory C++ Windows application This is the CMS hid-led-demo application
  • Using Edit Boxes in a Windows Application Add text, not just point and click, to your window.
  • The Final Exercise The Running of the Trains
  • HCS08JM60 Microcontroller Manual (4.9MB) This uC isn't available anymore.
  • MCF51JM128 Microcontroller Manual (11.5MB) The Coldfire - won't be using this anymore.
  • Comments on Horton book for EE342
  • Remarks

    This course is normally offered in the fall semester, and is normally taken by EE students with a particular interest in computers, or occasionally CS students. Background in digital design is necessary, and some experience with programming equivalent to an introductory programming course is needed, with either a follow up course taken or in progress (usually EE247 or CS126 or CS246). In this course we will be programming in C (for the embedded microcontroller) and C++ (on the Windows PC) although the depth we get into with C++ is pretty shallow. We are not really mastering C++ Windows programming, but doing just enough to have some perspective on it.