TECH 3233
Microprocessor Tech
Spring 2023

Instructor Info

Daniel Kohn
Office ET218
Phone: 678-4515
Office Hours

Course Info

Course Policies (Ver 2.0 4/18/23)
GradeWatch Access

Assignment Files

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 available via Amazon. Please Buy the NOT Rent.

Author's Website

Required Software

Atmel Studio 7 (Now called "Microchip Studio")
Arduino IDE (use Legacy IDE 1.8.x - for avrdude utility)

Course Outline:

Jan 17 Welcome

Course Policies

Introduction Computer History

Timeline of Computer History

Computer History

 · History of Intel Processors
 · History Lost and Found - Mark I Computer
 · History Lost and Found - ENIAC
 · History Lost and Found - Transistor
 · History Lost and Found - Apple Computer
 · The Most Important Invention of the 20th Century: Transistors

Class Notes  
Jan 19 Number System Review

Memory and Bus Architecture
Number Systems

Flip Flops and Latches Review

Tri-State Buffers

Digital Buffer and the Tri-State Buffer

Mux / DeMux

Memory (Note: This chapter goes into greater detail than required for this class.)

Class Notes

(including how to access simulations)
Jan 24Memory and Bus Architecture (cont)

CPU Architecture
Internal ArchitectureHow A CPU Works 
Jan 26CPU Architecture (Cont)

Come ready to ask questions on the "Scott Processor"

ASM and Hand Compiling
 6502 Processor
Visual 6502
6502 Op Codes
6502 Code

Class notes
Lab 1 - Due in one week via online submission.
Jan 31No Class (Weather)   
Feb 2No Class (Weather)   
Feb 7Hand Compiling ASM to ML
Hand Tracing
 Class NotesHW 1 - Due in one week at start of class.
Feb 9Go Over Lab #1 (and hand back)

Intro to AVR

Output Port

Chp 1

Chp 4 Sec 2 
 Lab 2 - due in one week. Full Schematic can be found HERE.

Rigol Scope configuration file can be downloaded HERE.

(note - the setup file is already on a FAT32 formated thumbdrive (the only format that works with the Rigol Scopes). Feel free to use the thumbdrive to store your capture(s), but please delete your files when you are done)

Rigol Scope Documentation

Datasheet 6810 Ram IC

Lab 1 Redo - Instead of opening rom.hds (step 1), open 2nd_rom/rom.hds. Due in one week via online submission. (This grade will be averaged with your 1st submission).
Feb 14No Class (Instructor ill)   
Feb 16Go over HW #1

ASM in Atmel Studio

Lab 3 Discussion

_delay_ms() trace
 Time DelayLab 3
Feb 21Work on Lab #3   
Feb 23Review of C Programming

I/O Cont
Bitwise Operators
Lab 4a
Bitwise Operators (Reading)

Tutorial Point Bitwise Opeators in C
 Lab 4a - When complete, demo to instructor and submit zip file of the project.
Feb 28Discuss Lab 4a and 4b   
Mar 2Work on Labs  Lab 4b - When complete, demo to instructor and submit zip file of the project.
Mar 6-10Spring Break   
Mar 14ADC Class notes
Successive Aprox Demo
Lecture Notes
Mar 16Work on Lab 4b    
Mar 21NO CLASS - Instructor out of town   
Mar 23Work on Lab 5  Lab 5 - Lab due in one week. 10 Turn Pot's are in the cabinet along with arduino boards. (10 Turn Pots have color coded leads: Red +5, Black Ground, Yellow Output).
Mar 28TEST #1

Covering all material to this point, including ADC 
Mar 30Code Style


Lab 4c
Nasa Style Guide

Header for Programs

Register Setting Example
 Lab 4c - demo and submit zip file of the project. Due in one week.

4-6-23 Minor change to lab. Make the min time delay 1000uSec and the Max Time delay 10000uSec.

Please comment your code with header block and comments (starting with 4c)

Starting with Lab #6 - Please start using the bit names and either the _BV(x) or (1<<x) methods for setting up your registers as discussed in class

Test #1 - take home (retake). Due Tues Apr 4 at start of class. Your Test #1 grade will be a weighted average of the in class and take home tests.
Apr 4Interrupts
  • INT0/INT1
  • TOF
Switch Bounce
Image 1 2
More Info 1 2 3

Volatile (in C)
Chp 10 (especially 10.3)

Chp 9 (TOF)
Apr 6Finish Lab 4c, Work on lab 6  Lab 6 - Due in one week.
Apr 11Switch Bounce

Input Capture 
Switch Bounce
Image 1 2
More Info 1 2 3
Lecture Notes 
Apr 13Work on Labs  Lab #7 - Input Capture using TSL237 Light Sensor.
Apr 18Output Compare Prof Kohn's Output Compare PPTLab #8 - Use Output Compare to play the Jeopardy Theme.

Use this excel spreadsheet that contains the notes and Frequencies to calculate the number of counts per note.

Here is a FULL SIZE version of the Notes to Freq Table. It is best to print in Landscape Mode.
Apr 20Work On Labs   
Apr 25Work On Labs   
Exam WeekTest #2  Test #2 - The test is open notes, open book, open references.

Suggest printing it out, working the problems then coming back to the page, fill in the answers and submit.

To log in, use your last name (with the first letter of your last name in caps). Use the last 4 digits of your U# as your password.

Test Opens Thu Apr 27 at 12:01am and is due Thu May 4 by 7:30pm.

Reference Links:

ATmega328P Website
  • ATMega 328P Data Sheet
  • AVR Instruction Set
ATmega328P / Arduino pinout
C Quick Reference
NASA C Styleguide

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

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

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).