TECH 4234
Microprocessor Interface Technology
Fall 2021

Instructor Info

Daniel Kohn
Office ET218
Phone: 678-4515
Office Hours

Course Info

Course Policies
Covid Statement
GradeWatch Access

Assignment Submission

Submit Assignments

Required Text

The AVR Microcontroller and Embedded Systems Using Assembly and C: Using Arduino Uno and Atmel Studio by Sarmad Naimi and Muhammad Ali Mazidi 2nd Ed

Author's Website

Required Software

MicroChip Studio (Formerly Atmel Studio 7) - note: "Download Microchip Stuido button does not seem to work, scroll down to "Downloads and Documents"
Arduino IDE (for avrdude utility)

Course Outline:

Aug 23Welcome
Install Microchip Studio and Arduino
Aug 25Sync SerialSync Serial FundamentalsLecture
Review Chp 10
Lab #1 - Write a program to read a magnetic card (credit card). The data sheet for the card reader is available HERE. Info on the data format is available HERE. Most credit cards use ANSI/ISO BCD Data Format. CLICK HERE for a sample waveform.
Aug 30Work on Lab #1   
Sep 1 |   
Sep 6No Class (Labor Day)   
Sep 8Finish Lab #1   
Sep 13UART/USARTBasics of UART Communication


Asynchronous Serial (Hackaday)
Uart Lecture
Chp 11
Lab #2
Sep 15No Class or Lab  Work on Lab #2
Sep 20USART (cont)
C Programming and Strings
Dealing with Strings in C

itoa function

2nd example itoa
Sep 27SPIWhat could go wrong: SPI (Hackaday)


SPI Explained (Note code for different uProc)
Lecture NotesLab #3
Sep 29 |   
Oct 4
I2CChp 18

What Could Go Wrong? I2C Edition (Hackaday)
 Lab #5a - get program 18-13 working for RTC. We will replace the uart routines in the sample code and use printf instead.
Oct 6   Lab #5b
Oct 11Fall Break    
Oct 13WiFi Using ESP8266  AT Commands
AT Commands
Lab #6

We will use Software Serial Template to start this project. Download, unzip and open to start YOUR code.
Oct 20WiFi Server  Lab 7 - Using the Software Serial Template and what you learned in Lab #6, we will create a program to set the ESP8266 into server mode, listen for a request and turn on / off and LED via a web request.

Please read THIS PAGE for how to use the ESP8266 in server mode. We will discuss how to parce the web request and control the LED in class (sorry I do not have a write up done for this lab (as of yet).

Oct 25   Lab 7b - show two adc values using same circuit as lab #6.
Oct 27   Lab 7c - Add code and form to page to turn on and off an LED on PB5.
Nov 1  ESP8266 AP Mode

AP with DHCP
Lab 7c - put the WiFi into AP mode with DHCP so a phone can connect directly to your IoT Device.
Nov 3   Demo of Ethernet Shield
   ESP8266 UDP Server Mode

PWM Handout

Reference Links:

New MicroChip Website
ATmega328P Datasheet (new link)
ATmega328P / Arduino pinout
C Quick Reference

Tutorialspoint C Programming

VT100 Escape Codes

C Style Guides

Rigol Digital Oscilloscope - 2000 Series
• (note: to use USB Stick, it MUST be formatted as FAT32)

Arduino Ethernet Shield 2
WIZ5500 IC
Real Time Clock (BOB 12708)
16x2 SerLCD
ADXL345 Tripple Axis Accelerometer
Transceiver (nRF24L01+)
Wifi Module (ESP8266)
Bi-Directional Logic Level Converter

Info needed for Labs

Determine Com Port

With Arduino plugged in to computer's USB port
Win 10 - Search for "Powershell" and open
Type - "Get-WMIObject Win32_SerialPort" (no quotes)
check results for Arduino Uno (Com __ )

Atmel Studio

Setup Strings:

C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\avrdude.exe

-C "C:\Program Files (x86)\Arduino\hardware\tools\avr\etc\avrdude.conf" -p atmega328p -c arduino -P COM7 -b 115200 -U flash:w:"$(ProjectDir)Debug\$(TargetName).hex":i"

Atmel Studio add ins:

Microchip Gallery

Go to above link then search for "Microchip Gallery". Click on "Download" on left side of screen and run the downloaded file (if Atmel Studio was opened when you did this, close and reopen Atmel Studio). This should now allow Atmel Studio access to plugins (TOOLS | Extensions and Updates). It is suggested in go ahead and install "Terminal for Atmel Studio"

To get printf to work with floating point values:

Project | nameofproject Properties | Toolchain : AVR/GNU Linker | General | Check "Use vprintf library(-Wl,-u,vfprintf)"
Project | nameofproject Properties | Toolchain : AVR/GNU Linker | Miscellaneous | Other Linker Flags put into textbox | "-lprintf_flt" (leave off quotes).

For ATmega 2560

ATmega2560 Datasheet

2nd setup string:

-C "C:\Program Files (x86)\Arduino\hardware\tools\avr\etc\avrdude.conf" -p atmega2560 -c wiring -P COM3 -b 115200 -U flash:w:"$(ProjectDir)Debug\$(TargetName).hex":i"