EE251: Thursday October 11 Mid-Term Exam Comments and Statistics SSI Serial I/O: continued as needed Nokia 5110 Graphics Subsystem SSI Interface to the 5110 Key Part of Lab #5 Use of Logic Analyzer, also key part of Lab #5 HW #4 Due October 18 Lab #4 Due Next Week Week of October 15 Lab #5 (Serial I/O) Begins Next Week You are Encouraged to Partner in Labs #5 - #8 Lecture #16 1
Mid-Term Exam Too Long! Points Lost on Questions 1 and 4 reduced to compensate for lost time. Grades and Statistics are online. Course (but not exam) grades will be curved. A Passing Course Grade is still available to all students enrolled if you got a low exam grade, Don t Give Up! Will review some exam questions in class. Lecture #16 2
Mid-Term Exam Statistics Mean: 78.1 Median: 77.8 Max: 98.2 Min: 53.2 Question #1 #2 #3 #4 #5 EXAM Total Points 22 25 24 24 5 100 AVERAGE 16.8 20.5 17.4 19.3 3.1 78.1% STD DEV 2.2 4.6 3.6 2.6 1.4 10.1% Decile Grades: 100 98.2 90 91.3 80 86.8 70 83.2 60 80.3 50 77.8 40 76.3 30 73.3 20 68.8 10 64.3 0 53.2 We ll go over Decile Grades in class right now.
Resources for 5110 Display Lab #5 Writeup: A good explanation of how the 5110 is connected and used The 5110 Data Sheet: Available on our lab web page and has excellent, detailed information about interfacing and using the Nokia 5110 Valvano s text, Vol. 1, Section 8.4: Good Nokia software from Valvano on our lab web page: It is in C, but it could be helpful. Lecture #16 4
Nokia Interface to TM4C ------------------------------------------ Signal (Nokia 5110) TIVA Pin ------------------------------------------ 3.3V (VCC, pin 1) power Ground (GND, pin 2) ground SSI0Fss (SCE, pin 3) connected to PA3 (SSI) Serial Frame Pin Reset (RST, pin 4) connected to PA7 (GPIO) Data/Command (D/C, pin 5) connected to PA6 (GPIO) SSI0Tx (DN, pin 6) connected to PA5 (SSI) MOSI Serial Data SSI0Clk (SCLK,pin 7) connected to PA2 (SSI) Clock signal to Nokia back light (LED, pin 8) do not connect Lecture #16 5
5110 Data/Control Information The 5110 can receive either Data or Control signals from the TM4C. Which of these is being sent is determined by the DC signal from the TM4C. If DC=1, it is data; if DC =0, it is control. The 5110 looks at this signal ONLY during the last bit of a byte of data/control info being sent. Note the 5110 signal names are not identical to the TM4C SCLC SSInClk SCE* SSInFss SDIN SSInTx The Reset (not shown) and DC signals are TM4C GPIO signals, not SSI signals. Lecture #16 6
5110 Display Structure Display is 84 x 48 pixels, and each character is 6 x 8 That s 14 characters on each of 6 rows of display 5110 Display Memory is set up as shown below, with each address representing an entire column of one character Sequential write of bytes can increment by either X or Y address, under program control. X address incrementing is best used for characters and Y address for images. Note that X addresses increment to the right addresses (and bits with a byte) increment downward. Lecture #16 7
Sequential Writes by X Address Used for writing alphanumeric information. 8-bit columns at address 0,1,2,3,4 create an alphanumeric character, followed by an empty column at address 5. Row 1 Row 2 Row 3 Row 4 Row 5 Row 6 Lecture #16 8
Sequential Writes by Y Address Used for writing graphical information. A column of 8 pixels are written at address 0, followed by 1,2,3,4, and 5 giving a column of 48 pixels. Process is repeated to right 83 times to give a 48x84 pixel display. Lecture #16 9
5110 Display Controller Instruction Set Lecture #16 10
5110 Display Setup First: Reset the display by holding the Reset pin low for 100ms Hold DC low (Command) and send the following commands: 0x21 PD=0, V=0, Extended Instruction Set 0x90 Set V op (operating voltage of LCD) 0x20 Normal Instruction Set; horizontal (character) addressing* 0x0C Display control set normal mode Set DC high (Data) and send character data row-by-row To change address of active pixels send these Commands: Now character or graphic data can now be sent to the display starting at this new location. * For vertical addressing (graphics), send command 0x22 instead Lecture #16 11
5110 Display Process-Characters To display characters, send bytes of data representing 6 columns of pixels (left to right) using automatic X address incrementing. Lab #5 includes a table to create display characters (pixels) from ASCII. For Example, F, 0x46, is represented by 0x7f, 0x09, 0x09, 0x09, 0x01 0x00 Least significant bit Most significant bit Lecture #16 12
5110 Display Process-Images To display an image, send bytes of data for the entire vertical leftmost column using automatic Y address incrementing. If doing this for entire screen, continue process for all 84 columns. If doing this for a smaller rectangular image, you need to increment the X and reset the Y addresses after each column of data sent. Lab #8 has included an entire image for your enjoyment to display on your 5110. Lecture #16 15
New Measurement Tool: Logic Analyzer Captures and displays multiple signals from a digital system. See Agilent 16902A Logic Analyzer below Lecture #16 16
A Simpler, Less Expensive Method Lab #5 uses the Digilent Analog Discovery 2 system to measure the signals between the TM4C and the Nokia 5110 display A visual understanding of these signals timings You will explain these signals to your TA Lecture #16 17
Using this Logic Analyzer This analyzer will be used to simultaneously display: Data/Command (PA6) MOSI Serial Data (PA5) Clock (PA2) Serial Frame Pin, Fss (PA3) Lecture #16 18
Analog Discovery Zoomed Out Analog Discovery Zoomed In Lecture #16 19
Analog Discovery Really Zoomed In Lecture #16 20
Really Really Zoomed In Lecture #16 21
Using the Logic Analyzer Logic Analyzer software is available on lab computers. If running this on your own computer, the Analog Discovery 2 software must be loaded Lab #5 describes how to use Analog Discovery 2 YouTube: Analog Discovery Logic Analyzer (Video #12) In Lab #5 you will need to demonstrate to your TA: The four key digital signals simultaneously Basic proficiency in use of the tool in this lab, such as explaining the meaning of each of the signal levels and signal values showing how to change sampling time and total sample time. Key part of lab--not optional Lecture #16 22
Summary NOKIA 5110 functionality Interconnection of 5110 to the TM4C Analog Discovery 2 Logic Analyzer Next Lecture: Analog to Digital Conversion aka ATD aka A/D aka ADC Chapter 20 in text (20.1, 20.2 carefully; skim the rest) Section 14 in TM4C Data Sheet Lab #6, week of October 23. Likely question(s) on Final Exam Be Prepared for Quiz on Nokia or ATD or Both Lecture #16 23