felix erlacher sang hun lee. aufbau physikalische grundlagen serial peripheral interface beispiele...
TRANSCRIPT
Liquid Crystal DisplayFelix ErlacherSang Hun Lee
Aufbau
Physikalische Grundlagen
Serial Peripheral Interface
Beispiele zur Programmierung
Inhalt
Aufbau Twisted Nematic TFT
Aufbau eines Bildes
Polarisation des Lichts
Funktion der Flüssigkristalle
Spannung an den Flüssigkristallen
Physikalische Grundlagen
Polarisation des Lichts
• Transversalwelle
• Nicht an Medium gebunden
• Spektrum
Lineare Polarisationsfilter
• Vertikaler Anteil kommt durch
• Horizontale Anteile werden absorbiert und reflektiert
Lineare WelleKann mittels Polarisationsfilter unterdrückt werdeElliptische WelleKeine Vorzugsrichtung-> geht durch Polarisationsfilter
Klärpunkt - Übergang Mesophasen ◦ Nematische Phase in die isotrope Phase
Flüssigkristalle
Senkrecht zueinander polarisiert Ausbreitungsgeschwindigkeit außerordentlicher
Strahl von Eintrittsrichtung auf Moleküle abhängig
Nach Addition entsteht elliptische Welle
Doppelbrechung
Flüssigkristalle
Licht
Twisted Nematic Crystal
Twisted Nematic Crystal
Transistor wird direkt auf Glassubstrat aufgedampft
Dünnschichttransistoren TFT
Synchroner serieller Datenbus
Master-Slave-Prinzip
Sehr lockerer Standard
Serial Peripheral Interface
Eine oder mehrere lowaktive Chip-Select-LeitungenSS – Slave Select
Eigenschaften
Vollduplexfähig
Viele Einstellmöglichkeiten◦ Taktflanke◦ Wortlänge◦ MSB oder LSB zuerst
Taktfrequenzen bis in MHz-Bereich
Eigenschaften
Jede Taktperiode ein Bit
Beliebig viele Slaves, ein Master
Kein festgelegtes Protokoll
Praxis 4 Modi durchgesetzt
Protokollablauf
ProtokollablaufCPHA Clock Phase
CPOL Clock Polarität
Pin-Belegung vom Display und Verbindung mit dem Mbed
Serial 2.2" TFT LCD Screen Module NOKIA 6100
Beispiel
#include "mbed.h"#include "NokiaLCD.h" NokiaLCD lcd(p5, p7, p8, p9, NokiaLCD::LCD6610); int main() {lcd.background(0x0000FF);lcd.cls();lcd.fill(2, 51, 128, 10, 0x00FF00);lcd.fill(50, 1, 10, 128, 0xFF0000);lcd.locate(0,3);lcd.printf("Hello World!");for (int i=0; i<130; i++) {lcd.pixel(i, 80 + sin((float)i / 5.0)*10, 0x000000);}}
Beispiel
NokiaLCD lcd(p5, p7, p8, p9, NokiaLCD::LCD6610);NokiaLCD::NokiaLCD(PinName mosi, PinName sclk, PinName cs, PinName rst, LCDType type)
: _spi(mosi, NC, sclk), _rst(rst), _cs(cs)
Code NokiaLCD.h
#define NOKIALCD_ROWS 16 #define NOKIALCD_COLS 16#define NOKIALCD_WIDTH 130 #define NOKIALCD_HEIGHT 130 #define NOKIALCD_FREQUENCY 5000000
Lcd.background(0x…..)void NokiaLCD::background(int c)
{_background = c;}
Code NokiaLCD.h
lcd.fill(int x, int y, int width, int height, int colour) _cs = 0;_window(x, y, width, height);for (int i=0; i<width*height/2; i++) { int r4 = (colour >> (16 + 4)) & 0xF; int g4 = (colour >> (8 + 4)) & 0xF; int b4 = (colour >> (0 + 4)) & 0xF; int d1 = (r4 << 4) | g4; int d2 = (b4 << 4) | r4; int d3 = (g4 << 4) | b4; 00330 data(d1);data(d2);data(d3);}_cs = 1;
Code NokiaLCD.h
lcd.locate(0,3);void NokiaLCD::locate(int column, int row) { _column = column;_row = row; }
for (int i=0; i<130; i++) {lcd.pixel(i, 80 + sin((float)i / 5.0)*10, 0x000000);}void NokiaLCD::pixel(int x, int y, int colour) {_cs = 0; _window(x, y, 1, 1); _putp(colour); _cs = 1;}
Code NokiaLCD.h
Vielen Dank für eure Aufmerksamkeit!