Professional Documents
Culture Documents
Regular ADC0 ADC7 PA0 PA1 PA2 PA5 PA6 PA7 PB0 PB1 PB2 PB3 PB4, PB6, PF4 PB5, PC5 PB7, PC0 PC3 PC4, PF0, PD0 PC6, PC7 PD2 PD3 PE0 PE3 PF2, PF3 PF5 PF6 PF7 PG0 PG1 PG2, PD1 PG3 PG4 PG5 PG6, PG7, PF1 PH0, PH1 PH2 PH3 LM3S1968 I/O pins Alternate Pin Name U0RX, U0TX S0CLK, S0FS, S0RX, S0TX SCL1, SDA1 CCP0 CCP2 SCL0, SDA0 C0-, C0+, C0O C1-, C1+ TRST, TCLK, TMS, TDI, TDO PHA0, PHB0, IDX0 C2+, C2U1RX, U1TX S1CLK, S1FS, S1RX, S1TX PWM4, PWM5 CCP1 None U2RX, U2TX PWM0, PWM1 CCP3 PHA1, PHB1, IDX1 PWM2, PWM3 Fault Alternate Function Universal Asynchronous Receiver/Transmitter, UART0 Synchronous Serial Interface, SSI0 Inter-Integrated Circuit, I2C1 Timer 0A Capture/Compare Timer 1A Capture/Compare Inter-Integrated Circuit, I2C0 Analog Comparator 0 Analog Comparator 1 JTAG Debugger Quadrature Encoder Interface, QEI0 Analog Comparator 2 Universal Asynchronous Receiver/Transmitter, UART1 Synchronous Serial Interface, SSI1 Pulse Width Modulator 2 Timer 0B Capture/Compare Universal Asynchronous Receiver/Transmitter, UART2 Pulse Width Modulator 0 Timer 1B Capture/Compare Quadrature Encoder Interface, QEI1 Pulse Width Modulator 1 Hold all PWM outputs in safe state
This laboratory assignment accompanies the book, Embedded Systems: Real-Time Interfacing to ARM Cortex M Microcontrollers, ISBN-13: 978-1463590154, by Jonathan W. Valvano, copyright 2012.
Embedded Microcomputer Systems: EE445L Lab Manual Table of Contents Lab introduction (rules and procedures) (this Labintro.pdf) Lab 1. ASCII to fixed-point output Lab 2. Debugging, oscilloscope fundamentals, logic analyzer, dump profile Lab 3. Alarm clock, OLED, edge-triggered interrupt, and timer interrupts Lab 4. Stepper motor, output compare interrupts, finite state machine Lab 5.12-bit DAC, SPI, Music player, audio amp Lab 6. Introduction to PCB Layout, PCB Artist (paper design only) Lab 7. Temperature measurement, ADC, OLED Lab 8. Design and Layout of an Embedded System Lab 9. Software drivers for an Embedded System Lab 10. ZigBee, UART, distributed systems, OLED Lab 11. Final Design and Evaluation of Embedded System Parts you may need on long term checkout from the second floor 1- 32-ohm speaker or similar 1- MC34119 4- 2N2222 or PN2222 1- L293 or L293D stepper motor driver 4- 1N914 snubber diodes 3- Bypass capacitors (any value 0.01 to 0.22uF) 3- Switches that plug into a protoboard, 1- 30k, 50k, or 100k NTC thermistor 1- Stepper motor (6-wire, 5V, 37ohm, with worm gear)
Page 2
Cut out a template, and place it between your LM3S1968 board and the protoboard.
LM3S1968 1 2 PB4 PB5 PB7 PH1 PH3 PC3 PE2 PE0 PB2 PB0 PF1 PF3 HIBn PF5 PF7 PG5 PG7 PA6 PA4 PA2 PA0 PC4 PC6 PG0 PG2 PD3 PD1 GND ADC3 ADC1 ADC4 ADC6 GND 65 66 GND PB6 PH0 PH2 PC2 PE3 PE1 PB3 PB1 GND PF2 PF4 PF0 PF6 PG4 GND PG6 PA7 PA5 PA3 PA1 GND PC5 PC7 PG1 PG3 PD2 PD0 GND ADC2 ADC0 ADC5 ADC7 PB4 PB5 PB7 PH1 PH3 PC3 PE2 PE0 PB2 PB0 PF1 PF3 HIBn PF5 PF7 PG5 PG7 PA6 PA4 PA2 PA0 PC4 PC6 PG0 PG2 PD3 PD1 GND ADC3 ADC1 ADC4 ADC6 GND 65 66 LM3S1968 1 2 GND PB6 PH0 PH2 PC2 PE3 PE1 PB3 PB1 GND PF2 PF4 PF0 PF6 PG4 GND PG6 PA7 PA5 PA3 PA1 GND PC5 PC7 PG1 PG3 PD2 PD0 GND ADC2 ADC0 ADC5 ADC7 PB4 PB5 PB7 PH1 PH3 PC3 PE2 PE0 PB2 PB0 PF1 PF3 HIBn PF5 PF7 PG5 PG7 PA6 PA4 PA2 PA0 PC4 PC6 PG0 PG2 PD3 PD1 GND ADC3 ADC1 ADC4 ADC6 GND 65 66 LM3S1968 1 2 GND PB6 PH0 PH2 PC2 PE3 PE1 PB3 PB1 GND PF2 PF4 PF0 PF6 PG4 GND PG6 PA7 PA5 PA3 PA1 GND PC5 PC7 PG1 PG3 PD2 PD0 GND ADC2 ADC0 ADC5 ADC7 PB4 PB5 PB7 PH1 PH3 PC3 PE2 PE0 PB2 PB0 PF1 PF3 HIBn PF5 PF7 PG5 PG7 PA6 PA4 PA2 PA0 PC4 PC6 PG0 PG2 PD3 PD1 GND ADC3 ADC1 ADC4 ADC6 GND 65 66 LM3S1968 1 2 GND PB6 PH0 PH2 PC2 PE3 PE1 PB3 PB1 GND PF2 PF4 PF0 PF6 PG4 GND PG6 PA7 PA5 PA3 PA1 GND PC5 PC7 PG1 PG3 PD2 PD0 GND ADC2 ADC0 ADC5 ADC7
Jonathan W. Valvano
Embedded Microcomputer Systems: EE445L Lab Manual I. Introduction to EE445L Laboratory I.1. Grading Policies (Labs 8, 9, 11 have different grading policies)
Page 3
Groups will consist of exactly two students. Lab partners have separate checkout grades+, but share the preparation*, report*, software quality*, and late penalty grades*. For each lab assignment, there are a number of preparation tasks that must be completed before the laboratory period. The following activities occur in this order at the beginning of lab, you turn in your preparation, the TA will give a short lab lecture, the TA will check your preparation, and if possible the TA will return the preparation to you. Responsibility grade Preparation 20* Preparation includes a printout of your software, which is due at the start of lab. The software should be typed into the computer and compiled with no syntax errors. Preparation does not usually involve running and debugging, but it should not be handwritten. Preparation also includes hardware circuit diagrams, which are also due at the start of lab. Handwritten diagrams are acceptable for the prep, but diagrams in the report must be generated using a CAD package. Hardware diagrams include chip numbers, pin numbers, resistor/capacitor types and tolerances, connections to computer. You are responsible for the procurement of all necessary parts before lab starts. As part of the preparation, hardware circuits but not necessarily built or debugged. Software Quality (see the section on software style guidelines later on in the lab manual) 20* Documentation, comments, choice of good variable and function names Proper style, organization, modular structure, ease of understanding Report (10) Final hardware circuit diagrams (must be generated using a CAD program) 25* (15) Results printout, performance/data graphs (handwritten drawings are OK) Checkout, demonstration to TA Performance, correctness of the program function 20* Interface to the human operator, menus, error messages Oral understanding of engineering tradeoffs 15+ Penalty 80% multiplier of all points for that lab if checkout during second lab period that week, No late checkout after two days Late Report -5/day* Total 100+ If a TA other than yours checks out your lab, please email your TA specifying the time, date, lab number and the other TAs name. Also, please follow up with both TAs to make sure you got credit for the lab. Please include the following information at the beginning of each of your software files: 1) Students names 2) TA name 3) Date of last change 4) Lab assignment number 5) Purpose of the software module 6) Hardware configuration
Jonathan W. Valvano
Page 4
Turn off power, do not move the injured. Start artificial respiration if breathing has stopped. Have someone else call 911 or 9-911 if CPR is needed. IN CASE OF FIRE: Turn off the power, call 911 or 9-911, fight fire with available extinguisher, have someone clear the building.
Jonathan W. Valvano
Page 5
CHECKOUT: A rough draft of your hardware diagrams and hard copy printout of your source code listings must be given to the TA before you demonstrate. If your experiment works, you will be assigned a good score on the performance part. The TA will ask the partners oral questions that test your understanding of the computer engineering concepts of the lab. The partners will answer separate questions and receive separate understanding grades. You must get your rough draft software listings signed and dated by a TA to prove that the lab was completed in a satisfactory manner. Late checkouts will result in lost points. Your software files will be copied onto the TAs web space during checkout.
Jonathan W. Valvano