2021-11-03

Hardware you should have by now:

  • SG90 servo (handed out on day19)

  • EN12-HS22AF20 rotary encoder + switch

  • HC-SR04 ultrasonic range finder module

  • 5.5x2.1mm barrel connector pigtail for AD2 aux power input

Pick up today:

  • Infrared remote

  • IR receiver

Future:

  • ATtiny85 MCU

1. IR Remote

Infrared remote control communication is common. We will use remotes and an IR receiver module to give us some data for working with serial data communication protocols.

These remotes transmit a unique ID number in addition to the button code. This means that we can have many remotes in the same room and still be able to differentiate which remote the transmission originated from. Such response systems have been replaced by apps like Socrative or Poll Everywhere.

Please register the ID number of your remote:

2. Timer input capture

2.1. Review

Ooh-pen up the MSP430 Family User’s Guide and navigate to section §25 Timer_A.

So far, we have used:

  • §25.2.3 Timer Mode Control. MC = 01

    • to trigger an interrupt

    • to change the period of the timer counter (reset back to zero)

  • §25.2.5 Output Unit. OUTMODx = 111

    • to set a pin high, then set to low at TAxCCRn compare event

Heads-up: these are going to be useful again.

2.2. Capture

Section §25.2.4 Capture/Compare Blocks.

  • Handout

3. Lab 5

Section factored out to a new page: