The difference between professional engineering and making as a hobby is DOCUMENTATION.

1. Review of previous work

  • Measuring physical output waveforms.

  • Changing the (asm) code that causes those waveforms.

    • Cycle counting for asm instructions.

  • Using variables stored in SRAM.

  • State machine tick() with an assembly subroutine.

  • Bare metal interrupt and ISR configuration.

  • C programming with avr-gcc family of tools, without the Arduino IDE or framework.

  • C99 as a common standard.

  • Using make and a Makefile to orchestrate the compile — link — output — program process.

  • Precise timing of output waveforms by replacing a C function with a bespoke assembly function.

    • The time between the two end “blips” must be exactly the same for all displayed 16-bit values. The 0 and 1 times must also be exactly equal to each other.

    • This is designed by counting CPU cycles for each possible path through the function’s execution.

The example Makefile intentionally did not engage the C99 standard compliance option..

2. Demonstration of Knowledge Report

Lab 3 was a superset of the tasks / goals of the previous labs, so this report is focused on your version of the ShortSquawker.

The purpose of this report is to be a tour de force of your current skills and understanding of the course material.

From the Course Goals and Objectives, we’ve engaged with:

  • G-ASM — lots, asm on MSP430 is yet to come

  • G-HWSW — 30%

  • G-TMR — sick of this by now?

  • G-NEW — 40%

What should be included? The better question is: “What do you want to demonstrate that you know?”

2.1. Draft report

Due by spring break.

Collect code, measurements, and notes from Labs 1—​3.

Identify missing information needed for figures and discussion.

Make a plan for re-collecting missing parts.

Draft organization of the report parts.

  • You will have my individual comments returned to you by the end of the first week of break.

2.2. Final version

Due Friday, March 25.[1]

3. Semester second half preview

Next is a path towards G-RTOS: Real-time operating systems for some techniques for managing multiple “concurrent” tasks in the MCU.

We will also be “coulomb counting” to measure the power supply current of an MCU-based system under various operating modes. Then reducing the average current as low as possible.

This is a practical example of G-HWSW: Hardware and software co-design, since both are required for truly low-power system design.

The batch of SMART Technologies Response XE devices will be an interesting platform for working with these concepts. Breakout boards to get access to the ISP (and JTAG) header for the internal MCU are due to arrive March 7.

srxe breakout front srxe breakout back

There are several other people who have been playing with this platform. You are encouraged to seek them out!

SMART Technologies Response XE Dev Kit from eBay

srxe ebay

3.1. hwX / Lab Y

  1. Port your code for the ATtiny85 to run on your Nano, but without using Arduino.

  2. Port your code for the ATtiny85 to run on your MSP430.

This includes:

  • Same attached hardware / circuit.

  • Adding the assembly function with the same timing requirement.

Except for differences due to different CPU clock speeds, its external behavior must be exactly the same.

3.2. Battery-powered systems

Demonstrate low-power by running the system for as long as possible, while performing its required functions.

3.3. Communication between systems

The SR XR has a 2.4 GHz radio


1. Date is negotiable.