TECH 3233
Microprocessor Tech
Spring 2022

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 (for avrdude utility)

Course Outline:

DateTopicReadingHandoutsAssignments
Jan 18 Welcome

Course Policies

Introduction Computer History

Timeline of Computer History

Computer History

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

Notes
(including how to access simulations)
 
Jan 25Memory and Bus Architecture (cont)  Lab 1 - Due in one week via online submission.

When originally posted, step 3 stated "it should read 0xAA. This is incorrect (it should read 0x00). It has since been fixed in the document (Ver 1.05 has been corrected).
Jan 27CPU ArchitectureInternal ArchitectureHow A CPU Works 
Feb 1CPU Architecture (Cont)

Come ready to ask questions on the "Scott Processor"

ASM and Hand Compiling
 6502 Processor
Visual 6502
6502 Op Codes
6502 Code
Lab 2 - due in one week. Full Schematic can be found HERE.

Rigol Scope configuration file can be downloaded HERE.

(note - this must be placed on a FAT32 formated thumbdrive. If you need one, ask the instructor)

Due to limited arduino shields, those who volunteered to build their own will have priority. Other students will be in a lottery of who gets them first (unless we have volunteers to do lab outside of the scheduled time).

Rigol Scope Documentation

Datasheet 6810 Ram IC
Feb 3No Class (due to weather)   
Feb 8Hand Compiling ASM to ML
Hand Tracing
 Class Notes (CORRECTED 2/15/22)Lab 3

HW 1 - Due in one week at start of class.
Feb 10_delay_ms() trace

Output Port
Chp 4

Chp 7 Sec 2
Time Delay

Class Notes
 
Feb 15I/O Cont
Lab 4a
  Lab 4a - When complete, demo to instructor and submit zip file of the project.
Feb 17Inputs

Bitwise Operators
Bitwise Operators (Reading)

Tutorial Point Bitwise Opeators in C
  
Feb 22No class or lab - instructor ill    
Feb 24No class or lab - instructor ill    
Mar 1Bitwise Operators (cont)   Lab 4b
Mar 3ADC Lecture Notes 
Mar 7-11Spring Break   
Mar 15No Class

Work on Lab 5 
  Lab 5 - Lab due in one week. Lab and cabinet will be opened by Matt Hale for lab. 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 start using the _BV() method of bit manipulation we discussed in class vs REG=0x__ or REG=(1<<name) we have previously been using.
Mar 16ADC (Cont)   
Mar 22Interrupts
  • INT0/INT1
  • TOF
Switch Bounce
Image 1 2
More Info 1 2 3

Volatile (in C)
Chp 10 (especially 10.3)

Chp 9 (TOF)
Lab 4c - Add speed control to Lab 4b using ADC/Pot from Lab 5
Mar 24Discuss Lab 6   
Mar 29Input Capture  TEST #1 - Due Thurs Apr 7 at start of class by 5pm (hand in paper copy).

Name: your last name (first letter of last name is caps).
Password: Last 4 digits of U number.

Lab 6 - due start of next week's lab.
Mar 31Input Capture (cont) Lecture Notes 
Apr 5Input Capture Lab  Lab #7 - Input Capture using TSL237 Light Sensor.
Apr 7Output 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 12Work on Lab 8   
Apr 14Discuss Final Project  PWM

SRF05 Untra_Sonic Ranger

Robot Info
Apr 19Work on Final Project   
Apr 21Work on Final Project  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 21 at 9:40am and is due Thu Apr 28 by 11:05am.
Apr 26Work on Final Project   
Apr 28Study Day  Test #2 Due by 11:05am 5pm.

Final Project due by 5pm.
     

Reference Links:

ATmega328P Website
  • ATMega 328P Data Sheet
  • AVR Instruction Set
ATmega328P / Arduino pinout
C Quick Reference
NASA C Styleguide
AVR-C Video Series
Using Named Bits in ATEML Studio
IO Issue - AVR Freaks
Timer Calculator
Atmega328P names 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

-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"

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