TECH 3233
Microprocessor Tech
Spring 2024

Instructor Info

Daniel Kohn
Email: dekohn@memphis.edu
Office ET218
Phone: 678-4515
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 16No Class (Due to Inclement Weather)   
Jan 18No Class (Due to Inclement Weather)   
Jan 23 Welcome

Course Policies

Introduction Computer History

Team Link to class

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 25 Number System Review

Team Link to class

Number Systems

Big Endian / Little Endian

Class Notes

 
Jan 30 Memory and Bus Architecture 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.)

Adafruit Digital Circuits 5: Memories

Notes
(including how to access simulations)
 
Feb 1Arithmetic Logic Unit (ALU)

CPU Architecture
Internal ArchitectureALU Sim

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

Come ready to ask questions on the "Scott Processor"

ASM and Hand Compiling
 How A CPU Works

6502 Processor
Visual 6502
6502 Op Codes
6502 Code

Class notes
Lab 1 - Due in one week via online submission.
Feb 8Discussion of Lab #1 12-14

ATmega328P (Brief Intro)
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)
  
Feb 13Hand Compiling ASM to ML
Hand Tracing
 Class NotesLab 3
Feb 15Lab #3 (Checksum and Time Delay)

Input / Output
 Checksum Spreadsheet

Time Delay Spreadsheet

Class Notes
HW 2 - Due in one week at start of class.
Feb 20Review HW #1

Review of C Programming

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

Bitwise Operators (Reading)

Tutorial Point Bitwise Opeators in C
 Lab 4a - When complete, demo to instructor and submit zip file of the project.

HW #1 (ALU redo) - Due in one week (will replace 1st attempt).
Feb 22Bitwise Operators

_BV() Macro

Lab 4b discussion
What is all this _BV() stuff about?

Intro to bitwise operators: _BV
[but please use bit name, not digit]
 Lab 4b - When complete, demo to instructor and submit zip file of the project. (due Mar 5)
Feb 27ADC Class notes
Successive Aprox Demo
Lecture Notes
 
Mar 4-8Spring Break   
Mar 12Discuss and Work 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).

Please include a proper Header on your programs from this point forward.
Mar 14    
Mar 19TEST #1

Covering all material to this point, including ADC 
  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!
Mar 21Interrupts
  • INT0/INT1
  • TOF
  • Pin Change Interrupt
Switch Bounce Video
Switch Bounce
Image 1 2
More Info 1 2 3

Volatile (in C)
Chp 10 (especially 10.3)

Chp 9 (TOF)

TOV Sample code (incomplete)
 
Mar 26Return Test #1

Discuss Lab 6
  Lab 6 - Due in one week.

Test #1 - take home (retake). Due Tues Apr 2 at start of class. Your Test #1 grade will be a weighted average of the in class and take home tests.
Mar 28Input Capture  Lecture Notes 
Apr 2Output Compare Class NotesLab #7 - Input Capture using TSL237 Light Sensor.
Apr 4Discuss Lab #8  Lab #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 9Discuss Final Project  Final Project - Due Study Day Apr 25, by 3pm (no exceptions)
Apr 11Work on Lab #8 and Final Project   
Apr 16|   
Apr 18|   
Apr 23|   
Apr 25Study Day   Final Project Due by 3pm
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 Gradewatch password sent to you at the start of the semester as your password.

Test is opened now till Tues Apr 30 at 12: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).