TECH 3233
Microprocessor Tech
Spring 2018

Instructor Info

Daniel Kohn
Email: dekohn@memphis.edu
Office ET218
Phone: 678-4515
Office Hours

Course Info

Course Policies
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 http://nicerland.com/

Required Software

Atmel Studio 7
Arduino IDE (for avrdude utility)

Course Outline:

DateTopicReadingHandoutsAssignments
Jan 16No Class (UofM Closed)   
Jan 18No Class (Instructor Ill)   
Jan 23Welcome

Course Policies

Introduction
   
Jan 25 Computer History

Number Systems

Memory and Bus Architecture
Computer History
History of Intel Processors (Video)

Number Systems

Flip Flops and Latches Review

Mux / DeMux

Tri-State Buffers

Class Notes


Class Notes
 
Jan 30Memory and Bus Architecture (cont)  Lab #1
Feb 1CPU ArchitectureInternal Architecture How A CPU Works 
Feb 6No Class (Instructor Ill)   
Feb 8No Class (Instructor Ill)   
Feb 13Program Compilation and Storage  Lab #2 - please submit paper copy to my mail box when complete.
Feb 15Assembly Langauge Programming Chp 2PPT 
Feb 20No Class (Instructor Ill)  Lab #3 - When complete, demo to instructor and submit project (as zip file).
Feb 22No Class (Instructor Ill)   
Feb 27Q&A Lab #2 and #3
C Arrays
Stepper Motor Control
  Lab #3 Continued
Mar 1Introduction to Digital Input  Lab #3 - Add 3 switches to control fwd/rev, start/stop, full/half step
Mar 6Spring Break   
Mar 8Spring Break   
Mar 13Digital Input (Cont)   
Mar 15Work on Lab (No Class - JC out of town)   
Mar 20    
Mar 22Work on Lab (No Class - Instrucotr out of town)   
Mar 27ADCChp 13 Lab #4 - write a program that will read an ADC input connected to an LM34 or LM35 sensor and display ADC out, Voltage and Temperature.

Note: Although not mentioned in the textbook, you do need to turn off the Power Reduction Mode for the ADC (reg PRR bit PRADC). If left in power reduction mode, the ADC registers will not update and the ADC will not operate.

Note II: if you wish to print floating point numbers, you must tell the compiler to include those functions (see below for instructions).
Mar 29   Lab #5 - Add ADC to your Lab #3 to control the speed of the stepper motor via a potentiometer being read via an ADC input to adjust the time delay between steps (0 slow -> 1024 fast).
Apr 3TOCChp 15  
Apr 5TOC Demo   
Apr 10TOC Continued YouTube VideoLab #6 - Using TOC control the position of a servo via a potentiometer. For the TOC, generate a square wave with a period of 15ms. For the servo in the ccw position the on time should be 0.5ms and for the servo in the cw possition it should be 2.5ms on. Read an ADC pin so that the position of the pot generates a relative position on the servo.
Apr 12Work on Labs   
Apr 17Input Capture  Lab #7 - using a SRF05 Sonar, create a program that will measure distance (inches) using TC1 (16bit timer) and display it to the terminal. You can use polling for this program (interrupts not required).
Apr 19    
Apr 24    
May 3All assignments due by 3pm (no exceptions or extentions)   

Reference Links:

ATmega328P Website
ATmega328P / Arduino pinout
C Quick Reference


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