336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

http://www.waveshare.com/2.2inch-320x240-touch-lcd-a.htm




 

 Symbol

 Discription

 Function

 1

 GND

 GND

 GND

 2

 3

 3.3V

 3.3V Power Supply

 3.3V Power Supply

 4

 5

 

 

 

 6

 

 

 

 7

 

 

 

 8

 X

 

 

 9

 X

 

 

 10

 X

 

 

 11

 X

 

 

 12

 X

 

 

 13

 X

 

 

 14

 X

 

 

 15

 X

 

 

 16

 X

 

 

 17

 X

 

 

 18

 X

 

 

 19

 T_IRQ

 

 

 20

 X

 

 

 21

 T_Busy

 

 

 22

 X

 

 

 23

 T_CS

 

 

 24

 X

 

 

 25

 T_DCLK

 

 

 26

 X

 

 

 27

 T_DIN

 

 

 28

 X

 

 

 29

 T_DOUT

 

 

 30

 X

 

 

 31

 RESET

 

 

 32

 

 

 33

 MISO

 

 

 34

 X

 

 

 35

 SCK

 

 

 36

 X

 

 

 37

 CS

 

 

 38

 

 

 39

 RS

 Register Selection

 RS = 1 : Data Register

 RS = 0 : Instruction Register

 40



http://www.waveshare.com/wiki/2.2inch_320x240_Touch_LCD_(A)

#include <avr/io.h>

#include <util/delay.h>


#include "LTM022A69B.h"

#include "LCD_lib.h"

#include"touch.h"



unsigned char read_res ;


 typedef struct 

{

unsigned int  x;        //LCD麟coordinates


unsigned int  y;

unsigned long x_ad_val;     //ADC value

unsigned long y_ad_val;      

unsigned char  pen_status;//The pen of the state

 

}_touch_dot;


extern _touch_dot touch_dot;


void display_touch_debug()

{        //ADC results show

        lcd_display_string("READ SUCCESS:",BLACK,GREEN,1,3);

        lcd_display_number(14,3,read_res,6);


        lcd_display_string("X AD Val:",BLACK,GREEN,1,4);

        lcd_display_number(10,4,touch_dot.x_ad_val,6);


        lcd_display_string("Y AD Val:",BLACK,GREEN,1,5);

        lcd_display_number(10,5,touch_dot.y_ad_val,6);


        //Display coordinates

        lcd_display_string("X:",BLACK,GREEN,1,6);

        lcd_display_number(10,6,touch_dot.x,5);

        lcd_display_string("Y:",BLACK,GREEN,1,7);

        lcd_display_number(10,7,touch_dot.y,5);


}


int main(void)

{

unsigned int i;

DDRA=0XFF;

PORTA=0X00;

// DDRE |= (1<<PE4);


DDRE &= ~(1<<PE4);

PORTE &= ~(1<<PE4);



lcd_init();

        lcd_display_string( "experiment:Touch screen    ", BLACK, GREEN, 0, 0 );

        lcd_display_string( "CPU:ATMAGE128A-AU          ", BLACK, GREEN, 0, 1 );

        lcd_display_string( "www.WaveShare.net          ", BLACK, GREEN, 0, 2 );

// _delay_ms(5000);

while(1)

{

read_res=Read_Continue();

lcd_draw_bigdot(BLACK,(touch_dot.x-20),(touch_dot.y-2));

// for(i=0;i<100;i++)

// {

// lcd_draw_bigdot(BLACK,50,i);

// }

// lcd_draw_line(BLACK,0,0,20,20);

}


}


'졸업작품 > LCD Touch Screen' 카테고리의 다른 글

LCD TouchScreen (LG12864F)  (0) 2016.07.26
Posted by ElectricShock
:
BLOG main image
잡동사니들(지극히 개인취향인...) (다른글에도 댓글 부탁해요♥) You May Leave English Messages on GuestBook. by ElectricShock

공지사항

카테고리

분류 전체보기 (782)
Programming(=프로그래밍) (3)
MiDi (2)
Animation (4)
Blender (3D Graphic Program.. (10)
Blendtuts.com (Series) (1)
Blender 기초 팁들 (2)
Processing (디지털미디어과) (2)
Music (1)
Books in the world (0)
Communication(CAN, UART, et.. (12)
MCU Examples (PIC 기반) (7)
Transistor (1)
Mikro C Pro (11)
Mikro Pascal (1)
Proton IDE (0)
Robot (0)
Swift 3D (1)
Dummies Series (1)
All about Hacking (0)
제2 외국어 (1)
PIC 해외서적들 (3)
AVR (25)
PIC (MikroC) (MPLAB) (4)
Assembly (2)
ARM (3)
Arduino (26)
PSpice (1)
Proteus ISIS (14)
CodeVision (2)
FPGA (15)
MPLAB (24)
PCB (the Procedure) (15)
3D Printer (5)
PICKIT3 (6)
Matlab (11)
RaspBerry PI (15)
BeagleBone (1)
Android Studio (17)
졸업작품 (172)
Korea History (0)
Issue(사회) (73)
Multimeter 리뷰 (1)
Oscilloscope (1)
A (34)
B (19)
J (6)
C (32)
P (12)
T (37)
H (12)
I (12)
M (44)
R (5)
E (5)
F (2)
D (9)
O (2)
L (7)
S (9)
W (2)
V (6)
G (14)
Visual C++ or Visual Studio (2)
Android App Development (0)

최근에 올라온 글

최근에 달린 댓글

최근에 받은 트랙백