When and Where:
Lecture: Tuesday, Thursday 8:30-9:50 pm; STAG 109
Lab: DEAR 203:
M 1800-2050 W 0800-1050 W 1100-1350
Note: "NOSPAM" = "orst"
Instructor:
Roger Traylor
Office: KEC3095
E-mail:traylor@ece.NOSPAM.edu
Office Hours: Tu 3:00 - 5:00 or by appointment
TAs:
Chianna Alexander
Office: DB203
E-mail:alexandc@eecsNOSPAM.edu
Office(lab) Hours: TBA
Mohamed Amer
Office: DB203
E-mail:amerm@eecsNOSPAM.edu
Office(lab) Hours: TBA
This is a design course. This means that you will be expected to show considerable creativity, resourcefulness and persistence. You will need to read long datasheets, improvise around problems, and extract information from obscure sources. You will need to apply material from many of the courses you have already taken. You will have to find solutions on your own from incomplete specifications. If you haven't been here before, welcome to the real world of design.
There is a considerable reading load for this class. Consider this typical for doing real design work. The number of pages is not daunting but the material can be obtuse. I will not be looking for detailed bit-by-bit details but clear understanding of concepts and how to apply them. Weekly self evaluation are provided to will check your understanding.
The labs will require detailed design based on a general specifications. Step-by-step instructions will not be provided. Detailed designs will be generated by the student. Complete designs to be graded include C and/or assembly language code, digital and analog circuit schematics, and documentation.
I will expect your in class participation. I don't want to be a talking head as I don't know all the answers. Some of you will have innovative solutions and approaches. They need to be shared too. Be prepared to voice your opinion, strut your stuff, and show your code.
You may work in groups on homework and projects if you wish. Sharing of design approaches, philosophy, flow charts or coding ideas is strongly suggested. However, sharing of detailed information such as design calculations, or actual code is not approved and will meet with the strongest action that I can bring.
A mail reflector (or group, list) for the class will be established by the beginning of class. This "mail group" is where you find information about important "stuff". The mailgroup is how I communicate with you outside the classroom. It can also be used as an interactive forum where you discuss problems and solutions. Such usage is encouraged.
Students who register early for ECE473 are automatically added to the class mail list. You may not be on the list at first if you register late. You should be added within a day or so. The name of the class list for ECE473is: ece473-001-f09@engr.NOSPAM.edu This name is case sensitive. (NOSPAM = orst).
We will have a comprehensive midterm and final exam. However, the bulk of your grade will come from the project. You can earn extra credit with class presentations.
I suggest that you buy a three ring notebook to hold your lab notes, code and datasheet/appnotes. Put sticky note tabs in the datasheet as a quick index.
Commit yourself to learning either emacs or vi. To write code, you need to use a programming editor. Forget notepad or pico. Those are for noobs. It dosen't matter if you are going to be a CpE or EE, you almost surely do a lot of programming in your career. To think otherwise is to fool yourself. Ask any working design engineer doing leading edge work. So, don't fight it, once you catch on, writing code can be really fun. Heck, I do everything in vi now. Its just so much faster.
Don't come to lab unprepared to work. If a circuit must be built, you should come prepared with detailed schematics, datasheets, parts, and whatever else you need to get started right away. In other words, lab has a homework component. If you don't do it, you will squander your time there.
On the day your lab is due, you will give the TA a printed copy of your code and any schematic used. This must happen before the board is demonstrated. You will then submit your code in a tar file to the TEACH class submission site. The same code will then be compiled and downloaded to your board. You will then demo the board and show the TA how it works (or not!). You may be asked questions about why or how you implemented something. Your ability to clearly answer will become part of your grade.
If you are late in getting your board to work or having your materials ready you will be
penalized as follows:
1 day late -10%
2 days late -20%
3 or more days late -30%
No food or drink is allowed in the lab. No horseplay is allowed. Take care of the lab equipment. We can have a fun time if we act like mature adults.
The cost for the lab parts kit will be taken from your student account. The cost is about $60. Soldering irons are supplied in the lab. We will be using industrial quality irons with fine tips to make soldering as easy as possible.
If you break parts, its up to you to get replacements. The part numbers are listed on the web page for either Mouser or Digikey. A credit card plus five days gets you new parts.
Supplemental Materials
Op-Amp design
-Op-Amps for Everyone
C Coding
-The C book
-C Programming - goto "See more"
-C and C++ coding style links
-A guide to commenting code
-Song: "Write in C"
-Song: "50 Ways to Hose Your Code"
-Real men program in C
Debouncing Switches
-Schmitt Trigger App. note.
-A vertical stack debouncer
-scan all port D buttons
-Debounce IC MAX6816
-dsp debouncer.S
Embedded Muse
-How to Become an Embedded Geek
Fixed point math
-A calculated look at fixed point arithmetic
Oscilloscope Help
-Oscilloscope Tutorial
-Tektronix Oscilloscope Fundamentals
-XYZ's of Oscopes (Tektronix)
General Debugging Methodology
-Debugging Methodology
I2C
-Newtorking Processor Peripherals with I2C
-Phillips I2C Manual
-Phillips I2C Usage with a uC
Level Shifting
-Reducing system complexity by using a single-supply logic-level shifter
Bidirectional LED Communications
-Very Low-Cost Sensing and Communication Using Bidirectional LEDs
Student projects and presentations
-Useful UART Utilities (.pdf)
-Ways to read encoders (.pdf)
-Modifying .vimrc (.pdf)
-Garmin guys project (.jpg)
-3 phase generator (.ppt)
-3 phase project code (.c)
-AVR video generation (.ppt)
-AVR video generation code
Hardware Documentation:
-Atmel Mega128 Datasheet
-TEA5768 datasheet
-LM4843 datasheet
-74HC595 shift register datasheet
-74LVC1G125 tri-state buffer datasheet
-H44780 Datasheet (LCD controller)
-Mega128.1 Schematic
-Mega128.2 Schematic
-Mega128.1 User guide
-Mega128.2 User guide
-Test code, blinks port B lights
-Display Panel HW
-Lab Kit part numbers
Lab Schematics:
bargraph
LED display
Encoders
FM Receiver
Mega48 Board
Sensor
Stereo Audio Amplifier
Switch Board
Software Documentation:
AVR libc:
-avr-libc User Manual
avrdude:
-avrdude manual
vim:
-vim reference card (.pdf)
-vim basic guide
-vim advanced guide
-Graphical vi cheat sheet
Music on the Mega128:
-Code to play music
High level UART routines (Keith Buddulph):
(.ppt)
(.odp)
make:
-GNU manuals for make
-Online manual to GNU make
-A Sample Makefile
a2ps:
-a2ps web page
-a2ps manual
Other Web Sites:
-OSU Open Source Education Lab
-Tekbots Store
-AVR Datasheets
-AVR Application Notes
-AVR Freaks
-WinAVR - AVR tools for Windows
-CrossPack - AVR tools for Macs
-Cornell University ECE 476 Designing with Microcontrollers
-AVR Fuse Calculator
Period | Date | Lecture Topics | Lab Work | Reading and | |
|---|---|---|---|---|---|
| 1 | Tue., Sept 29 | Intro to ECE473
(.pdf)
(.ppt)
(.odp) Intro and Motivation (.pdf) (.ppt) (.odp) -Microcontrollers vs. microprocessors -Microcontrollers as logic devices -Microcontrollers as reusable hardware -Commonly used uCs -RISC vs CISC....any difference? Mega128 Overview (.pdf) (.ppt) (.odp) Block diagram Mega128 -ALU -Registers and Stack -Instruction execution timing -Flash, SRAM, EEPROM, External Memory -Timers and Counters -Interrupts -USART -SPI -TWI -A/D Converter/Comparator |
Lab 1 - Testdrive the Tools Get everything running and ready to go Due in your lab section, 10/5 or 10/7. AVR tools for Mac: AVR CrossPack AVR tools for Linux: (Ubuntu) AVR tools for other Linux distros (source compile) WinAVR - avr-gcc for Windows lab1_code.c Makefile |
ATmega128 Datasheet -pgs. 0-11, (upto ALU section) Microprocessor Reports -AVR brings RISC to 8-bit World Atmel Whitepaper -C compiler for AVR |
|
| 2 | Thur., Oct 1 | Port I/O
(.pdf)
(.ppt)
(.odp) -In, out, bidirect, tri-state modes -Pull up and pull down options -DC and AC characteristics of ports -drive strength in mA -hardware interfacing -inclass coding exercise |
AVR Datasheet -pgs. 5-7, Pin Descriptions -pg. 318, DC Characteristics -pgs. 66-70, I/O Ports EDN Article -About ESD Diodes Microchip EMC Newsletter -What is ESD? (pgs2-3) Self-Evaluation -Self Evaluation -Schematics for self eval |
||
| 3 | Tue., Oct 6 | Switch Debouncing
(.pdf)
(.ppt)
(.odp) -Switch debouncing techniques Debugging Techinques (.pdf) (.odp) (.ppt) -Controlability and obseravbility -A debugging methodology -Code for testing lab 2 Discussion of Lab 2 -Time multiplexed display and switches |
Lab 2 - LED and Pushbutton Interface Add six digit LED display and pushbutton I/O to system. Write software to utilize these controls. Due in your lab section, 10/19 or 10/21. Lab 2 Skeleton code Example LED display test code | Embedded Muse -A Guide to Debouncing EDN Design Idea -A DSP debouncer |
|
| 4 | Thur., Oct 8 |
Programming Environment - The vi editor
(.odp)
(.pdf)
(.ppt) In class vi exercise header file lcd functions lcd test Programming Environment - GNU compiler (.odp) (.pdf) (.ppt) Assembly Language w/GCC(rough yet) (.pdf) (.ppt) (.odp) |
Vi Help -Basic vi help -Vim for C programmers Atmel Application Note -Efficient C Coding for AVR (.pdf) Self-Evaluation -Self Evaluation |
||
| 5 | Tue. Oct 13 |
Programming Environment - GNU make
(.odp)
(.pdf)
(.ppt) Variations on a2ps printing -a2ps -P printer lcd.c (default) -a2ps -P printer -1 lcd.c (one up) -a2ps -P printer -4 lcd.c (four up) -a2ps -P printer -1 --font-size=9 lcd.c (9 pt. font) Embedded Programming (.pdf) (.ppt) (.odp) -Writing good embedded code -How embedded coding is different -Hints on coding -C usage in embedded apps Avr-libc (.odp) (.ppt) (.pdf) -The avr-libc modules (link) -interrupt.h -delay.h -string.h -stdlib.h |
O'Reilly ONLamp.com -Write great code (article only) Embedded Systems Design -Debugging Embedded C Atmel Applications Journal -Programming uCs in C |
||
| 6 | Thur., Oct 15 | Interrupts
(.pdf)
(.ppt)
(.odp) -Motivation for interrupts -Polling versus Interrupts -Priorities and vectors -Enable/disable scheme -Interrupt latency and timing budget -Volatile type modifier -GCC optimizaton levels Avr-libc, interrupts section Lab 3 Discussion |
Lab 3 - Interrupts and SPI Add encoders and bar display to the interface board. Scan the switches under interrupt control. TCNT0 setup Rework for bar graph board Due in your lab section, 11/2 or 11/4. |
AVR Datasheet -Pgs 15-17, Interrupt and reset handling -Pgs 11-12, Status register GIE bit -Pgs 60-62, Interrupts Self-Evaluation -Self Evaluation |
|
| 7 | Tue., Oct 20 | Serial Peripheral Interface (SPI)
(.pdf)
(.odf)
(.ppt) -Motivation for SPI -Clock and data timing -Master/Slave Operation -SPI Setup -How the LCD display uses SPI Quiz 1 (~30 min) |
AVR Datasheet -pgs. 163-170 SPI Embedded.com -Introduction to SPI |
||
| 8 | Thur., Oct 22 | 8-Bit Timer/Counters 0, 2 (TCNT0,2)
(.pdf)
(.ppt)
(.odp) -Clock sources -Modes of Operation -Timer and counter modes -Asynchronous operation -Example of TC0 initialization -TCNT0 and TCNT2 differences Lab discussion -Encoder operation -Decoder glitches -How to "scope out" SPI transactions In-class Programming Work bar_graph_demo_skel.c Makefile |
AVR Datasheet -pgs. 93-111 TCNT0 -pgs. 145-160 TCNT2 Atmel Application Note -AVR130 Setup and use of AVR Timers AVR Freaks -DN024 Timer/Counter Basics Self-Evaluation -Self Evaluation |
||
| 9 | Tue., Oct 27 |
Multi-tasking a timer/counter ISR 16-Bit Timer/Counters 1,3 (.pdf) (.odp) (.ppt) 16-Bit Timer/Counters 1,3 -Clock sources -Modes of Operation -Setting up Timer/Counter 1, 3 |
Lab 4 - Alarm Clock Make a alarm clock. -lcd helper code -header file for above Due in your lab section, 11/16 or 11/18. |
AVR Datasheet -pgs. 112-142 TCNT1 and TCNT3 -pgs. 143-144 TCNT1,2,3 Prescalers |
|
| 10 | Thur., Oct 29 | Timer and Counter Apps -Two inclass coding exercises exercise 1 exercise 2 -Midterm Review Questions |
EDN Article -Sine waves from uCs |
||
| 11 | Tue., Nov 3 | Midterm Exam 2008 Embedded Mkt. Survey (.pdf) 2009 Salary Survey table 2(.pdf) 2009 Salary Survey table 3(.pdf) |
|||
| 12 | Thur., Nov 5 | Analog Comparator, ADC
(.pdf)
(.ppt)
(.odp) -ADC background -Differential or single-ended -Noise cancellation -ADC Examples USART (.pdf) (.ppt) (.odp) -Serial communication with RS-232 -Hardware for RS232 interface (MAX232) -Clock generation -Frame formats -Initialization (baudrate, parity, etc.) -Transmission and reception -Example code -echo PC terminal -board comm with IR xcvr |
AVR Datasheet -pgs. 227-229 Analog Comparator -pgs. 230-245 A to D Converter -pgs. 54-55 Voltage Reference -pgs. 171-197 USART -DN021 Using the ADC |
||
| 13 | Tue., Nov 10 |
Two Wire Serial Interface (I2C)
(.pdf)
(.ppt)
(.odp) -Features -Transmission modes -3.3 to 5V interfacing |
Lab 5 - Remote Temperature Sensor Make a remote outside temperature sensor. Due in your lab section, 11/23 or 11/25. |
AVR Datasheet -pgs. 198-226, TWI Embedded.com -I2C overivew Phillips Application Note -I2C Bidirectional level shifter |
|
| 14 | Thur., Nov 12 |
Accessing EEPROM
(.pdf)
(.odp)
(.ppt) |
AVR Datasheet -pgs. 19-24, EEPROM Memory Embedded.com -I2C overivew Atmel Application Note -AVR100 Accessing the EEPROM |
||
| 15 | Tue., Nov 17 | Power Management and Sleep Modes
(.pdf)
(.odp)
(.ppt) -ADC Noise reduction mode -Minimizing Power Consumption Reset Sources (.pdf) (.odp) (.ppt) -Watchdog Timer -Brownout Interrupt XDIV/Sleep code Reset/Brownout code |
Embedded Muse -Great Watchdogs AVR Datasheet -pages 52-56, Watchdog Timer -page 50, Brownout Detection |
||
| 16 | Thur., Nov 19 | Questions and answers concerning lab issues (confilict with MECOP meeting) |
|||
| 17 | Tue., Nov 24 | JTAG
(.pdf)
(.odp)
(.ppt) -Manufacturing test usage -In circuit debugging -JTAG for chip programming Bootloaders (.pdf) (.odp) (.ppt) -Flash memory partitioning -Advantages Lock bits and fuse bits (.pdf) (.odp) (.ppt) -Lock bits for security -Fuse bit functions |
Final Project: FM Clock Radio Make a FM clock radio. Due by Monday of finals week 12/7 . |
||
| 18 | Thur., Nov 26 | Architecting the Final Project An open class discussion of how to approach the final project. |
|||
| 19 | Tue., Dec 1 | Class Presentations -Taylor Johnson -Project documentation with Doxygen -Chris Haller -Fun with JTAG ICE -Alexander Ewing -TBD |
|||
| 20 | Thur., Dec 3 | Project Demonstrations in Class
-Class Evaluation (Refreshments provided) |
|||
| Final Exam | Thur., Dec 10 | NO FINAL EXAM schedule conflict exists |