TECH 3233
Microprocessor Tech
Spring 2025

Instructor Info

Daniel Kohn
Email: dekohn@memphis.edu
Office ET218
Office Hours

Course Info

Course Policies
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 book...do NOT Rent.

Author's Website http://nicerland.com/

Required Software

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

Course Outline:

DateTopicReadingHandoutsAssignments
Jan 21 Welcome

Course Policies

Introduction Computer History

Timeline of Computer History

Computer History

Videos
 · 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 23 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

Class Notes

Notes
(including how to access simulations)
[no lab this week]
Jan 28 Memory and Bus Architecture (cont)

Arithmetic Logic Unit (ALU)

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

Adafruit Digital Circuits 5: Memories

Internal Architecture

Notes
(including how to access simulations)

ALU Sim

How A CPU Works
HW #1 (ALU) - Due in one week.
Jan 30CPU Architecture (Cont)

Come ready to ask questions on the "Scott Processor"

ASM and Hand Compiling
 How A CPU Works

6502 Processor
Visual 6502
Big Endian / Little Endian
6502 Op Codes
6502 Code

Class notes
Lab 1 - Due in one week via online submission.
Feb 4ATmega328P

Hand Compiling ASM to ML
Hand Tracing
See this doc:
CPU Page 18 (Fig 7-1)
Block Diagram Page 15 (Fig 2-1)
Status Register Page 20 (7.3.1)
Registers Page 21 (Fig 7-2)

AVR Instruction Set
Class NotesHW 2 - Due in one week at start of class.
Feb 6Lab #3 (Checksum and Time Delay)

Input / Output
 Checksum Spreadsheet

Time Delay Spreadsheet

Class Notes
Lab 3 - Due in one week at start of lab.
Feb 11Review of C Programming

I/O Cont
Bitwise Operators
_BV() Macro
Lab 4a
C Programming (program structure, loops, if's etc)

Bitwise Operators (Reading)

Tutorial Point Bitwise Opeators in C

What is all this _BV() stuff about?

Intro to bitwise operators: _BV
[but please use bit name, not digit]
 Lab 4a - When complete, demo to instructor and submit zip file of the project.
Feb 13Discussion on Lab #4a.

Arrays
Arrays Tutorial Work on Lab 4a.
Feb 18No Class   
Feb 20No Class or Lab   
Feb 25Input Pins

Lab 4b Discussion
Class Notes 
Feb 27Programming Style

More on Bitwise Operations

Headers and Self Documenting Code
HeaderLab 4b - When complete, demo to instructor and submit zip file of the project. (tentitively due Mar 6)
Mar 4TEST #1

Covering all material up to and including Digital I/O (Input and Output) 
   
Mar 6ADC Class notes
Successive Aprox Demo
Lecture Notes
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).

Please include a proper Header on your programs from this point forward.
Mar 10-14Spring Break   
Mar 18Interrupts
  • INT0/INT1
Switch Bounce Video
Switch Bounce
Image 1 2
More Info 1 2 3

Volatile (in C)
Chp 10 (especially 10.3) 
Mar 20Work on Labs  Lab 4c - demo and submit zip file of the project. Due in one week.

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

Please remember to comment your code with header block and comments!
     

Reference Links:

ATmega328P Website
  • ATMega 328P Data Sheet
  • AVR Instruction Set
ATmega328P / Arduino pinout
C Quick Reference
NASA C Styleguide
Program Header Block
Using printf in Atmel Studio


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