Download presentation
Presentation is loading. Please wait.
Published byChana Liggins Modified over 9 years ago
1
The Practice of Micro-processor Yonam Institute of Digital Technology 06. LCD Control
2
2 LCD (Liquid Cristal Display) LCD module constructs display device and its controller Using of LCD module easy and simple In Industry, the LCD module is useful device for indication of variety device’s information 16X2 character LCD uses 4 for data in/out put port uses 3 for control signal Overview of LCD
3
Test-Board contains 16x2 character LCD LCD in Test Board 3 PortSpecify PC.4~7 LCD data line, Data I/O PC.0~2 LCD control signal
4
Arrangement of Key Matrix Components 4 PC.0 ● PC.1 ● PC.2 ● PC.3 ● PC.4 ● PC.5 ● PC.6 ● PC.7 ● ● C.0 ● C.1 ● C.2 ● C.3 ● L.0 ● L.1 ● L.2 ● L.3 8583 PC PORT Key Matrix Part 1.16X2 CLCD 2.LCD Light Adjust 3.LCD Data Port 4.LCD Control Port
5
5 Wiring Diagram AVR8535 MCU Module Multi Digital Breadboard PC.0 ● PC.1 ● PC.2 ● PC.3 ● PC.4 ● PC.5 ● PC.6 ● PC.7 ● ● RS ● R/W ● E ● ● D0 ● D1 ● D2 ● D3 ● D4 ● D5 ● D6 ● D7 8583 PA PORT LCD Part LCD Part
6
Practice of LCD Control LCD 에 다음과 같이 출력 6 AVRATMega8535L Yonam-ac.krCIS
7
7 #include #asm.equ __lcd_port=0x15 #endasm #include void init(void); void delay(unsigned int cnt); void main(void) { charbuff[17]="AVR ATMega 8535L";// LCD 출력 Data 저장 변수 설정 PORTC=0x00;// output DDRC=0xFF; lcd_init(16);// Character LCD 16 * 2 사용 선언 lcd_gotoxy(0,0);// LCD 1 line 선택 함수, x=0, y=0 delay(100); // 시간 지연 함수 lcd_puts(buff);// buff 변수 Data 를 LCD 로 출력 lcd_gotoxy(0,1);// LCD 2 line 선택 함수, x=0, y=1 lcd_putsf(" Yonam-ac.kr CIS");// Data 를 LCD 로 출력 } void delay(unsigned int cnt) { while(cnt--); }
8
Advanced Practice LCD, 7-Segment, Key Matrix 이용 과제 Key Matrix 와 7-Segment 를 이용한 계산기 만들기 숫자 키 사용 문자 키 연산 기호로 사용 A(+), B(-), C(*), D(/), E(=) 결과값 7-Segment 로 출력 Key Matrix 에서 입력한 키 값을 7-Segment 로 출력하는 프로 그램을 수정하여 동시에 LCD 에도 표시하기 8 AVRATMega8535L
9
Key Matrix 와 7-Segment 그리고 LCD 를 이용한 계산기 숫자 키 사용 문자 키 연산 기호로 사용 A(+), B(-), C(*), D(/), E(=) 입력 숫자는 7-Segment 로 출력 출력될 연산결과는 LCD 로 출력 ( 위치 2Line 첫 번째 )
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.