LOGO v LCD v LCD v LCD Dongyang

  • Slides: 48
Download presentation

목차 LOGO v LCD 디스플레이 v 패러럴 LCD 디스플레이 v 시리얼 LCD 디스플레이 Dongyang

목차 LOGO v LCD 디스플레이 v 패러럴 LCD 디스플레이 v 시리얼 LCD 디스플레이 Dongyang Mirae University 최신인터넷기술(ARDUINO) 2 prepared by Choon Woo Kwon

LOGO LCD(Liquid Crystal Display, p 107) Dongyang Mirae University 최신인터넷기술(ARDUINO) 3 prepared by Choon

LOGO LCD(Liquid Crystal Display, p 107) Dongyang Mirae University 최신인터넷기술(ARDUINO) 3 prepared by Choon Woo Kwon

LCD(Liquid Crystal Display) LOGO □ 손목시계, TV, 핸드폰 등 우리 생활의 많은 부분에서 사용

LCD(Liquid Crystal Display) LOGO □ 손목시계, TV, 핸드폰 등 우리 생활의 많은 부분에서 사용 됨 □ 그래픽 LCD, TFT LCD, Character LCD 등 종류가 다양 □ 아두이노 Character LCD 지원 □ 시리얼 방식 □ 패러럴 방식 Dongyang Mirae University 최신인터넷기술(ARDUINO) 4 prepared by Choon Woo Kwon

LCD Controller(HD 44780) LOGO v Hitachi HD 44780 LCD controller § § § data

LCD Controller(HD 44780) LOGO v Hitachi HD 44780 LCD controller § § § data sheet download (click!) alphanumeric dot matrix liquid crystal display (LCD) controller(Hitachi 개발) Max addressing : 80 chars : 80 x 8 bit display RAM MPU interface : 4 -bit or 8 -bit Size : 8 characters x 1 row, 8 x 2, 16 x 1, 16× 2, 20× 4 등 가능 Custom size : (32, 40, 80) characters x (1, 2, 4 or 8 lines) ASCII characters, Japanese Kana characters, some symbols : 240 character fonts ü 208 character fonts (5 x 8 dot), 32 character fonts (5 x 10 dot) Backlight 지원 HD 44780 U Dongyang Mirae University 최신인터넷기술(ARDUINO) 5 prepared by Choon Woo Kwon

LCD Controller(HD 44780) 사용 LOGO v Interface MPU - LCD controller - LCD(Liquid Crystal

LCD Controller(HD 44780) 사용 LOGO v Interface MPU - LCD controller - LCD(Liquid Crystal Display) LCD MPU / Arduino / etc. HD 44780 U LCD Dongyang Mirae University 최신인터넷기술(ARDUINO) 6 prepared by Choon Woo Kwon

LCD Controller(HD 44780) 사용 LOGO v MPU - LCD controller Interface Dongyang Mirae University

LCD Controller(HD 44780) 사용 LOGO v MPU - LCD controller Interface Dongyang Mirae University 최신인터넷기술(ARDUINO) 7 prepared by Choon Woo Kwon

HD 44780 U Block Diagram & Pin Functions Dongyang Mirae University 최신인터넷기술(ARDUINO) 8 LOGO

HD 44780 U Block Diagram & Pin Functions Dongyang Mirae University 최신인터넷기술(ARDUINO) 8 LOGO prepared by Choon Woo Kwon

HD 44780 U - 기능 설명 LOGO v Dongyang Mirae University 최신인터넷기술(ARDUINO) 9 prepared

HD 44780 U - 기능 설명 LOGO v Dongyang Mirae University 최신인터넷기술(ARDUINO) 9 prepared by Choon Woo Kwon

HD 44780 U – DDRAM LOGO v DDRAM(Display Data RAM) § 8 -bit 문자코드로

HD 44780 U – DDRAM LOGO v DDRAM(Display Data RAM) § 8 -bit 문자코드로 된 Display 데이터를 저장 § 저장 용량 : 80 character or 80 x 8 bits ü Display로 사용되지 않은 경우 일반 데이터 RAM으로 사용 가능 § DDRAM 주소는 ADD는 AC(address counter)에 16값으로 설정 v 1 -line Display 경우 (N=0) § DDRAM Address § 1 -Line Display § 1 -Line x 8 -Character Display Dongyang Mirae University 최신인터넷기술(ARDUINO) 10 prepared by Choon Woo Kwon

HD 44780 U – DDRAM LOGO v 2 -line Display 경우 (N=1) : 8

HD 44780 U – DDRAM LOGO v 2 -line Display 경우 (N=1) : 8 -char x 2 -line 표시 경우 (Case 1) § 2 -Line Display § 2 -Line x 8 -Character Display Dongyang Mirae University 최신인터넷기술(ARDUINO) 11 prepared by Choon Woo Kwon

HD 44780 U – DDRAM LOGO v 2 -line Display 경우 (N=1) : 8

HD 44780 U – DDRAM LOGO v 2 -line Display 경우 (N=1) : 8 -char x 2 -line 표시 경우(Case 2) § 2 -Line Display § 2 -Line x 8 -Character Display Dongyang Mirae University 최신인터넷기술(ARDUINO) 12 prepared by Choon Woo Kwon

HD 44780 U – CGROM/CGRAM LOGO v CGROM(Character Generator ROM) § 240 characters patterns(8

HD 44780 U – CGROM/CGRAM LOGO v CGROM(Character Generator ROM) § 240 characters patterns(8 -bit character code) ü 208 5 x 8 dot character patterns ü 32 5 x 10 dot character patterns § User-defined character patterns by mask-grogrammed ROM § Character Pattern(5 x 8) 예 ü A 11 -A 4 : character code ü A 3 -A 0 : character patterns의 line position ü O 4 -O 0 : character pattern data ü O 5 -O 7 : ‘ 0’ ü Line 9 – line 15 : ‘ 0’ § Character Pattern(5 x 10) 예 ü ü ü A 11 -A 4 : character code A 3 -A 0 : character patterns의 line position O 4 -O 0 : character pattern data O 5 -O 7 : ‘ 0’ Line 11 – line 15 : ‘ 0’ Dongyang Mirae University 최신인터넷기술(ARDUINO) 13 prepared by Choon Woo Kwon

HD 44780 U – CGROM/CGRAM v CGRAM (Character Generator RAM) LOGO v Character Codes

HD 44780 U – CGROM/CGRAM v CGRAM (Character Generator RAM) LOGO v Character Codes & Character Patterns (ROM Code : A 00) § 사용자가 저장하여 사용할 수 있는 character patterns § Character Codes Table의 첫째 열에 해당 하는 코드 ü Character code : 0000 xxxx / 0001 xxxx ü 8 5 x 8 dot character patterns ü 4 5 x 10 dot character patterns Dongyang Mirae University 최신인터넷기술(ARDUINO) 14 prepared by Choon Woo Kwon

HD 44780 Instruction(명령어) LOGO v Dongyang Mirae University 최신인터넷기술(ARDUINO) 15 prepared by Choon Woo

HD 44780 Instruction(명령어) LOGO v Dongyang Mirae University 최신인터넷기술(ARDUINO) 15 prepared by Choon Woo Kwon

HD 44780 Instruction(명령어) LOGO v Instructions Dongyang Mirae University 최신인터넷기술(ARDUINO) 16 prepared by Choon

HD 44780 Instruction(명령어) LOGO v Instructions Dongyang Mirae University 최신인터넷기술(ARDUINO) 16 prepared by Choon Woo Kwon

HD 44780 Instruction(명령어) LOGO v Instructions (cont) Dongyang Mirae University 최신인터넷기술(ARDUINO) 17 prepared by

HD 44780 Instruction(명령어) LOGO v Instructions (cont) Dongyang Mirae University 최신인터넷기술(ARDUINO) 17 prepared by Choon Woo Kwon

HD 44780 명령어 설명 v v v LOGO Clear Display Return Home Entry Mode

HD 44780 명령어 설명 v v v LOGO Clear Display Return Home Entry Mode Set Display On/Off Control Cursor/Display Shift Function Set CGRAM Address Set DDRAM Address Read Busy Flag and Address Write Data to CG or DDRAM Read Data from CG/DDRAM Dongyang Mirae University 최신인터넷기술(ARDUINO) 18 prepared by Choon Woo Kwon

HD 44780 명령어 설명 LOGO v Instruction Codes Dongyang Mirae University 최신인터넷기술(ARDUINO) 19 prepared

HD 44780 명령어 설명 LOGO v Instruction Codes Dongyang Mirae University 최신인터넷기술(ARDUINO) 19 prepared by Choon Woo Kwon

HD 44780 명령어 설명 LOGO v Instruction Codes Dongyang Mirae University 최신인터넷기술(ARDUINO) 20 prepared

HD 44780 명령어 설명 LOGO v Instruction Codes Dongyang Mirae University 최신인터넷기술(ARDUINO) 20 prepared by Choon Woo Kwon

HD 44780 Instruction-Display 연관성 LOGO v 8 -bit operation, 8 -digit x 1 -line

HD 44780 Instruction-Display 연관성 LOGO v 8 -bit operation, 8 -digit x 1 -line display with internal reset § The HD 44780 U functions must be set by the function set instruction prior to the display. Since the display data RAM can store data for 80 characters, the RAM can be used for displays such as for advertising when combined with the display shift operation. Since the display shift operation changes only the display position with DDRAM contents unchanged, the first display data entered into DDRAM can be output when the return home operation is performed. v 4 -bit operation, 8 -digit x 1 -line display with internal reset § The program must set all functions prior to the 4 -bit operation. When the power is turned on, 8 -bit operation is automatically selected and the first write is performed as an 8 -bit operation. Since DB 0 to DB 3 are not connected, a rewrite is then required. However, since one operation is completed in two accesses for 4 -bit operation, a rewrite is needed to set the functions (see Table 12). Thus, DB 4 to DB 7 of the function set instruction is written twice. nstruction. Dongyang Mirae University 최신인터넷기술(ARDUINO) 21 prepared by Choon Woo Kwon

HD 44780 Instruction-Display 연관성 LOGO v 8 -bit operation, 8 -digit x 2 -line

HD 44780 Instruction-Display 연관성 LOGO v 8 -bit operation, 8 -digit x 2 -line display § For a 2 -line display, the cursor automatically moves from the first to the second line after the 40 th digit of the first line has been written. Thus, if there are only 8 characters in the first line, the DDRAM address must be again set after the 8 th character is completed. Note that the display shift operation is performed for the first and second lines. In the example of Table 13, the display shift is performed when the cursor is on the second line. However, if the shift operation is performed when the cursor is on the first line, both the first and second lines move together. If the shift is repeated, the display of the second line will not move to the first line. The same display will only shift within its own line for the number of times the shift is repeated. § Note: When using the internal reset, the electrical characteristics in the Power Supply Conditions Using Internal Reset Circuit table must be satisfied. If not, the HD 44780 U must be initialized by instructions. See the section, Initializing by Instruction. Dongyang Mirae University 최신인터넷기술(ARDUINO) 22 prepared by Choon Woo Kwon

HD 44780 Instruction-Display 프로그램 예시 LOGO v 8 -Bit Operation, 8 -Digit x 1

HD 44780 Instruction-Display 프로그램 예시 LOGO v 8 -Bit Operation, 8 -Digit x 1 -Line Display Example with Internal Reset Dongyang Mirae University 최신인터넷기술(ARDUINO) 23 prepared by Choon Woo Kwon

HD 44780 Instruction-Display 프로그램 예시 LOGO v 8 -Bit Operation, 8 -Digit x 1

HD 44780 Instruction-Display 프로그램 예시 LOGO v 8 -Bit Operation, 8 -Digit x 1 -Line Display Example with Internal Reset (cont) Dongyang Mirae University 최신인터넷기술(ARDUINO) 24 prepared by Choon Woo Kwon

HD 44780 Instruction-Display 프로그램 예시 LOGO v 8 -Bit Operation, 8 -Digit x 1

HD 44780 Instruction-Display 프로그램 예시 LOGO v 8 -Bit Operation, 8 -Digit x 1 -Line Display Example with Internal Reset (cont) Dongyang Mirae University 최신인터넷기술(ARDUINO) 25 prepared by Choon Woo Kwon

HD 44780 Instruction-Display 프로그램 예시 LOGO v 4 -Bit Operation, 8 -Digit x 1

HD 44780 Instruction-Display 프로그램 예시 LOGO v 4 -Bit Operation, 8 -Digit x 1 -Line Display Example with Internal Reset Dongyang Mirae University 최신인터넷기술(ARDUINO) 26 prepared by Choon Woo Kwon

HD 44780 Instruction-Display 프로그램 예시 LOGO v 8 -Bit Operation, 8 -Digit x 2

HD 44780 Instruction-Display 프로그램 예시 LOGO v 8 -Bit Operation, 8 -Digit x 2 -Line Display Example with Internal Reset Dongyang Mirae University 최신인터넷기술(ARDUINO) 27 prepared by Choon Woo Kwon

HD 44780 Instruction-Display 프로그램 예시 LOGO v 8 -Bit Operation, 8 -Digit x 2

HD 44780 Instruction-Display 프로그램 예시 LOGO v 8 -Bit Operation, 8 -Digit x 2 -Line Display Example with Internal Reset (cont) Dongyang Mirae University 최신인터넷기술(ARDUINO) 28 prepared by Choon Woo Kwon

HD 44780 초기화(Initializing) LOGO v 8 -bit Interface Dongyang Mirae University 최신인터넷기술(ARDUINO) 29 prepared

HD 44780 초기화(Initializing) LOGO v 8 -bit Interface Dongyang Mirae University 최신인터넷기술(ARDUINO) 29 prepared by Choon Woo Kwon

HD 44780 초기화(Initializing) LOGO v 4 -bit Interface Dongyang Mirae University 최신인터넷기술(ARDUINO) 30 prepared

HD 44780 초기화(Initializing) LOGO v 4 -bit Interface Dongyang Mirae University 최신인터넷기술(ARDUINO) 30 prepared by Choon Woo Kwon

LOGO LCD(Liquid Crystal Display - 패러럴 LCD 디스플레이(4 -bit 모드) (p 108) - 패러럴

LOGO LCD(Liquid Crystal Display - 패러럴 LCD 디스플레이(4 -bit 모드) (p 108) - 패러럴 LCD 디스플레이(8 -bit 모드) (p 113) Dongyang Mirae University 최신인터넷기술(ARDUINO) 31 prepared by Choon Woo Kwon

패러럴 LCD 디스플레이(4 -bit 모드) (p 108) LOGO v 패러럴 LCD 디스플레이(4 -bit 모드)

패러럴 LCD 디스플레이(4 -bit 모드) (p 108) LOGO v 패러럴 LCD 디스플레이(4 -bit 모드) § Character LCD 모듈 : 16 x 1 LCD Module ü Hitachi HD 44780 호환 컨트롤러 사용 ü 데이터 처리 : 4 -bit bus • 회로 측면에서 배선이 용이 § LCD 관련 프로그래밍 라이브러리 : Liquid Crystal Library ü #include <Liquid. Crystal. h> ü 아두이노 IDE 포함 Dongyang Mirae University 최신인터넷기술(ARDUINO) 32 prepared by Choon Woo Kwon

패러럴 LCD 디스플레이(4 bit) - 배선도 LOGO 1 3 5 7 9 11 13

패러럴 LCD 디스플레이(4 bit) - 배선도 LOGO 1 3 5 7 9 11 13 15 Dongyang Mirae University 최신인터넷기술(ARDUINO) 33 prepared by Choon Woo Kwon

LOGO 패러럴 LCD 디스플레이(4 bit) - 회로도(Schematic) Dongyang Mirae University 최신인터넷기술(ARDUINO) 34 prepared by

LOGO 패러럴 LCD 디스플레이(4 bit) - 회로도(Schematic) Dongyang Mirae University 최신인터넷기술(ARDUINO) 34 prepared by Choon Woo Kwon

패러럴 LCD 디스플레이(4 bit) – 스케치(1) // include the library code; #include<Liquid. Crystal. h>

패러럴 LCD 디스플레이(4 bit) – 스케치(1) // include the library code; #include<Liquid. Crystal. h> 아두이노의 LCD 라이브러리를 사용하기 위해 헤더 파일을 추가 // initialize the library with the numbers of the interface pins Liquid. Crystal lcd(12, 11, 5, 4, 3, 2); 라이브러리 사용을 위해 초기화 (DB : Data Bit) //lcd(RS, Enable, DB 0, DB 1, DB 3, DB 4) void setup() { // setup the LCD’s number of columns and rows; lcd. begin(8, 2); } void loop() { lcd. set. Cursor(0, 0); 사용하는 LCD는 1행 16열이지만 LCD Library 를 그대로 이용하기 위해서 2행 8열로 Library 를 초기화 (아두이노 LCD 라이브러리는 원래 16문자 2줄 로 나타내는 LCD(1602 LCD)를 위해 만들어져 있기 때문에 LCD 초기화 방법을 다르게 함) LCD에 Display할 좌표 지정 LCD를 8열로 초기화했기 때문에 한 번에 8글 자 이상 표현 불가 8글자 넘는 글자는 lcd. set. Cursor() 함수를 이 용하여 행을 0 ->1로 변경한 다음 Display 처리 // print a message to the LCD lcd. print("Hello, w"); // set the cursor to column 0, line 1 // note : line 1 is the second row, since counting begins with 0 lcd. set. Cursor(0, 1); lcd. print("orld!"); } (Hello world) delay(1000); Dongyang Mirae University Hello. LOGO world “Hello, world!” 글자를 LCD에 표시 최신인터넷기술(ARDUINO) 35 prepared by Choon Woo Kwon

패러럴 LCD 디스플레이(4 bit) – 스케치(2) // include the library code: #include <Liquid. Crystal.

패러럴 LCD 디스플레이(4 bit) – 스케치(2) // include the library code: #include <Liquid. Crystal. h> char a; int start=0; // initialize the library with the numbers of the interface pins Liquid. Crystal lcd(12, 11, 5, 4, 3, 2); void setup() { // set up the LCD's number of columns and rows: lcd. begin(16, 2); // initialize the serial communications: Serial. begin(9600); } } // when characters arrive over the serial port. . . if (Serial. available()) { // wait a bit for the entire message to arrive start = 1; delay(100); // clear the screen lcd. clear(); // read all the available characters while (Serial. available() > 0) { // display each character to the LCD lcd. write(a=Serial. read()); Serial. write(a); } } void loop() { if (start == 0) { lcd. set. Cursor(0, 0); lcd. clear(); lcd. print("+ -"); delay(700); lcd. clear(); lcd. print("- +"); delay(700); } Dongyang Mirae University Serial. Display LOGO (Serial. Display) Serial 모니터 창에 입력한 글 자를 LCD에 표시 최신인터넷기술(ARDUINO) 36 prepared by Choon Woo Kwon

패러럴 LCD 디스플레이(4 bit) – 스케치(3) // include the library code: #include <Liquid. Crystal.

패러럴 LCD 디스플레이(4 bit) – 스케치(3) // include the library code: #include <Liquid. Crystal. h> // initialize the library with the numbers of the interface pins Liquid. Crystal lcd(12, 11, 5, 4, 3, 2); void setup() { // set up the LCD's number of columns and rows: lcd. begin(16, 2); } void loop() { // set the cursor to (0, 0): lcd. set. Cursor(0, 0); // print from 0 to 9: // for (int this. Char = 0; this. Char < 10; this. Char++) { } Auto. Scroll LOGO // for (int this. Char = 0; this. Char < 10; this. Char++) { lcd. print(this. Char); delay(500); } // turn off automatic scrolling lcd. no. Autoscroll(); } // clear screen for the next loop: lcd. clear(); for (int this. Char = 0; this. Char < 10; this. Char++) { lcd. print(this. Char); delay(500); // set the cursor to (16, 1): lcd. set. Cursor(16, 1); // set the display to automatically scroll: lcd. autoscroll(); // print from 0 to 9: Dongyang Mirae University (Auto. Scroll) Serial 모니터 창에 입력한 글 자를 LCD에 표시 최신인터넷기술(ARDUINO) 37 prepared by Choon Woo Kwon

패러럴 LCD 디스플레이(4 bit) – 스케치(4) Cursor. Blink LOGO // include the library code:

패러럴 LCD 디스플레이(4 bit) – 스케치(4) Cursor. Blink LOGO // include the library code: #include <Liquid. Crystal. h> // initialize the library with the numbers of the interface pins Liquid. Crystal lcd(12, 11, 5, 4, 3, 2); void setup() { // set up the LCD's number of columns and rows: lcd. begin(8, 2); // Print a message to the LCD. lcd. print("hello, w"); lcd. set. Cursor(0, 1); lcd. print("orld!"); } void loop() { // Turn off the blinking cursor: lcd. no. Blink(); delay(3000); // Turn on the blinking cursor: lcd. blink(); delay(3000); } (Cursor. Blink) LCD에 Cursor가 3초 간격으로 Blink 상태가 변경 : ON-OFF Dongyang Mirae University 최신인터넷기술(ARDUINO) 38 prepared by Choon Woo Kwon

패러럴 LCD 디스플레이(4 bit) – 스케치(5) // include the library code: #include <Liquid. Crystal.

패러럴 LCD 디스플레이(4 bit) – 스케치(5) // include the library code: #include <Liquid. Crystal. h> // initialize the library with the numbers of the interface pins Liquid. Crystal lcd(12, 11, 5, 4, 3, 2); // reset at 'z': if (this. Char > 'z') { delay(2000); lcd. clear(); // go to (0, 0): lcd. home(); // start again at 0 this. Char = 'a'; int this. Char = 'a'; void setup() { // set up the LCD's number of columns and rows: lcd. begin(16, 2); // turn on the cursor: lcd. cursor(); } void loop() { // reverse directions at 'h': if (this. Char == 'h' || this. Char == 'v') { // go right for the next letter lcd. right. To. Left(); } // reverse again at 'o': if (this. Char == 'o') { // go left for the next letter lcd. left. To. Right(); } Dongyang Mirae University Text. Direction LOGO } } // print the character lcd. write(this. Char); // wait a second: delay(500); // increment the letter: this. Char++; (Text. Direction) LCD에 알파벳이 a-z까지 표시하 는데 입력 방향이 변경 : Left>Right, Right->Left 최신인터넷기술(ARDUINO) 39 prepared by Choon Woo Kwon

패러럴 LCD 디스플레이(8 bit) - 배선도 LOGO 1 3 5 7 9 11 13

패러럴 LCD 디스플레이(8 bit) - 배선도 LOGO 1 3 5 7 9 11 13 15 Dongyang Mirae University 최신인터넷기술(ARDUINO) 41 prepared by Choon Woo Kwon

LOGO 패러럴 LCD 디스플레이(8 bit) - 회로도(Schematic) Dongyang Mirae University 최신인터넷기술(ARDUINO) 42 prepared by

LOGO 패러럴 LCD 디스플레이(8 bit) - 회로도(Schematic) Dongyang Mirae University 최신인터넷기술(ARDUINO) 42 prepared by Choon Woo Kwon

패러럴 LCD 디스플레이(8 bit) - 스케치 int int int DI = 12; RW =

패러럴 LCD 디스플레이(8 bit) - 스케치 int int int DI = 12; RW = 11; DB[] = {3, 4, 5, 6, 7, 8, 9, 10}; Enable = 2; digital. Write(Enable, LOW); delay. Microseconds(1); void Lcd. Command. Write(int value){ // poll all the pins int i=0; for(i=DB[0]; i<=DI; i++){ digital. Write(i, value & 01); value >>= 1; } } // send a pulse to enable digital. Write(Enable, HIGH); delay. Microseconds(1); // pause 1 ms according to datasheet digital. Write(Enable, LOW); delay. Microseconds(1); // pause 1 ms according to datasheet void Lcd. Data. Write(int value){ // poll all the pins int i = 0; digital. Write(DI, HIGH); digital. Write(RW, LOW); for(i=DB[0]; i<=DB[7]; i++){ digital. Write(i, value & 01); value >>= 1; } Dongyang Mirae University // send a pulse to enable digital. Write(Enable, HIGH); delay. Microseconds(1); digital. Write(Enable, LOW); delay. Microseconds(1); // pause 1 ms according to datasheet void init. LCD(){ delay(100); digital. Write(Enable, LOW); delay. Microseconds(1); } LOGO // initiatize LCD after a short pause // needed by the LCDs controller Lcd. Command. Write(0 x 3 A); // function set; // 8 -bit interface, 2 display lines, display ON delay(10); Lcd. Command. Write(0 x 0 E); // display control; // turn display ON, cursor ON, no blinking delay(10); Lcd. Command. Write(0 x 01); // clear display, set cursor position to zero delay(10); Lcd. Command. Write(0 x 06); // entry mode set; // increment automatically, no display shift delay(10); } LCD 라이브러리를 사용하지 않은 관계로, HD 44780 Controller 초기화나 DDRAM 데이터 쓰기 등을 위해서는 직접 컨트롤러에 접근(Access)하여야 함. 이러한 처리로 Sketch code가 복잡하며 HD 44780 Data Sheet의 참조가 필요 최신인터넷기술(ARDUINO) 43 prepared by Choon Woo Kwon

패러럴 LCD 디스플레이(8 bit) - 스케치 // this is the function used to send

패러럴 LCD 디스플레이(8 bit) - 스케치 // this is the function used to send data to the // LCD screen in the proper format, the others are // working at lower level void print. LCD(const char *s){ int count = 0; while(*s){ if(count == 8){ Lcd. Command. Write(0 x. C 0); // jump to the second part of the display; delay(5); } if(count>=16){ break; } Lcd. Data. Write(*s++); count++; } } LOGO void loop() { // put your main code here, to run repeatedly: Lcd. Command. Write(0 x 02); delay(10); } // write the welcome message print. LCD("Dept of Computer"); delay(500); void setup() { // put your setup code here, to run once: int i = 0; for(i=Enable; i<=DI; i++){ pin. Mode(i, OUTPUT); } init. LCD(); } Dongyang Mirae University 최신인터넷기술(ARDUINO) 44 prepared by Choon Woo Kwon

시리얼 LCD 디스플레이 - 배선도 LOGO D 1 Dongyang Mirae University 최신인터넷기술(ARDUINO) 46 prepared

시리얼 LCD 디스플레이 - 배선도 LOGO D 1 Dongyang Mirae University 최신인터넷기술(ARDUINO) 46 prepared by Choon Woo Kwon

시리얼 LCD 디스플레이 - 스케치 LOGO void setup() { Serial. begin(9600); } void loop()

시리얼 LCD 디스플레이 - 스케치 LOGO void setup() { Serial. begin(9600); } void loop() { Serial. print("$CLEARrn"); Serial. print("$GO 1 4rn"); Serial. print("$PRINT Welcome torn"); Serial. print("$GO 2 1rn"); Serial. print("$PRINT www. jkelec. co. krrn"); Serial. print("$CURSOR 1 1rn"); delay(1000); } Dongyang Mirae University 최신인터넷기술(ARDUINO) 47 prepared by Choon Woo Kwon

LOGO Dongyang Mirae University 최신인터넷기술(ARDUINO) 48 prepared by Choon Woo Kwon

LOGO Dongyang Mirae University 최신인터넷기술(ARDUINO) 48 prepared by Choon Woo Kwon