JUTF43 Initial Version
1. LCD 세팅
USER DEFINE모드로 사용을 해야 내가 UART로 전송한 데이터를 사용합니다.
참고로!! MASS STORAGE 모드로 선택을 할 경우에는 Boot모드이다. ICBanq의 로고의 BMP파일을 볼수 있습니다.
2. LCD와 TEST board연결
TFTLCD에서는 5V/TX1/RX1/GND만 연결하면 사용할수 있습니다.
PC에서 바로 시리얼로 보내려면 컨버터가 있어야해서 나의 경우는 MCU borad(WIZwiki-W7500)를 사용합니다.
WIZwiki-W7500의 Datasheet는 아래의 링크를 가서 확인 하면됩니다.
http://wizwiki.net/wiki/doku.php?id=products:w7500:documents
Test board와 연결은 다음과 같습니다.
3. 코드
Command설명입니다
ex ) $l,1,10,10,100,100,#
Cmd | description |
$(0x24) | START |
l(L의 소문자),1 | Line 그리기 |
1,1 | 시작 x,y 좌표 |
100,100 | 끝 x,y좌표 |
#(0x63) | STOP |
mbed코드
mbed가 궁금하다면?
4. 결과
484 x 272인 TFT LCD에 (10,10) -> (100,100)까지만 선을 그어봤습니다.
JUTF43/lcd_cmd.h
- Committer:
- eunkyoungkim
- Date:
- 2015-08-26
- Revision:
- 0:e4340e1e2d7f
File content as of revision 0:e4340e1e2d7f:
#pragma once bool lcd_connect(int portnum); void lcd_disconnect(); bool lcd_is_open(); void set_receive_window(HWND h, UINT msg); bool send_command(char* str); bool lcd_connect_check(); bool lcd_set_double_buffer_mode(); bool lcd_set_single_buffer_mode(); bool lcd_brightness(int val); bool lcd_flip(); bool lcd_usb_mass_storage(); bool lcd_reset(); bool lcd_set_color(unsigned char r, unsigned char g, unsigned char b); bool lcd_draw_line(int x, int y, int endx, int endy); bool lcd_draw_rect(int x, int y, int w, int h, bool bfill); bool lcd_draw_rect_gradient(int x, int y, int w, int h, unsigned char sr, unsigned char sg, unsigned char sb, unsigned char er, unsigned char eg, unsigned char eb); bool lcd_draw_rect_rounded(int x, int y, int w, int h, int rad, bool bfill); bool lcd_draw_thickline(int x, int y, int endx, int endy, int thick); bool lcd_draw_circle(int x, int y, int r, bool bfill); bool lcd_draw_ellipse(int x, int y, int rx, int ry, bool bfill); bool lcd_image_load(int index, char* fname); bool lcd_image_draw(int index, int x, int y); bool lcd_image_draw_rect(int index, int x, int y, int sx, int sy, int w, int h); bool lcd_image_draw_scale(int index, int x, int y, int w, int h); bool lcd_image_draw_scale_rect(int index, int dx, int dy, int dw, int dh, int sx, int sy, int sw, int sh); bool lcd_image_release(int index); bool lcd_textcolor(unsigned char r, unsigned char g, unsigned char b); bool lcd_textout(char* str, int x, int y); bool lcd_set_touchmode(bool bAsync); bool lcd_get_touch(unsigned short *x, unsigned short *y); bool lcd_run_script(char* fname); int lcd_get_serial_data(unsigned char* buf);