Associate
April 25, 2012
Question
STM32F1 ADC LCD WITHOUT CONTROLER
- April 25, 2012
- 8 replies
- 2396 views
Posted on April 25, 2012 at 10:18
Hi,
I want to communicate with my touch screen without controler. I can display pictures, lines, colors, circles, texts... I've a 4-wire resistive touch screen on my lcd (4,3'' TFT COLOR). For the moment, I can see the voltage on the multimeter with this code.void TFT_43M_TACTIL_X (void)
{ GPIO_InitTypeDef GPIO_InitStruct; GPIO_InitStruct.GPIO_Pin=GPIO_Pin_1; //Touch screen x2 GPIO_InitStruct.GPIO_Speed=GPIO_Speed_50MHz; GPIO_InitStruct.GPIO_Mode=GPIO_Mode_Out_PP; GPIO_Init(GPIOC,&GPIO_InitStruct);GPIO_InitStruct.GPIO_Pin=GPIO_Pin_0; //Touch screen y2
GPIO_InitStruct.GPIO_Speed=GPIO_Speed_50MHz; GPIO_InitStruct.GPIO_Mode=GPIO_Mode_AIN; GPIO_Init(GPIOC,&GPIO_InitStruct);GPIO_InitStruct.GPIO_Pin=GPIO_Pin_1; //Touch screen x1
GPIO_InitStruct.GPIO_Speed=GPIO_Speed_50MHz; GPIO_InitStruct.GPIO_Mode=GPIO_Mode_Out_PP; GPIO_Init(GPIOB,&GPIO_InitStruct);GPIO_InitStruct.GPIO_Pin=GPIO_Pin_0; //Touch screen y1
GPIO_InitStruct.GPIO_Speed=GPIO_Speed_50MHz; GPIO_InitStruct.GPIO_Mode=GPIO_Mode_AIN; GPIO_Init(GPIOB,&GPIO_InitStruct); //(*GPIOC).BSRR=0x00000002; // bit 1 en sortie port C==> X2 GPIO_SetBits(GPIOC,GPIO_Pin_1); // bit 1 en sortie port C==> X2 }void TFT_43M_TACTIL_Y (void)
{ GPIO_InitTypeDef GPIO_InitStruct; GPIO_InitStruct.GPIO_Pin=GPIO_Pin_1; //Touch screen x2 GPIO_InitStruct.GPIO_Speed=GPIO_Speed_50MHz; GPIO_InitStruct.GPIO_Mode=GPIO_Mode_AIN; GPIO_Init(GPIOC,&GPIO_InitStruct);GPIO_InitStruct.GPIO_Pin=GPIO_Pin_0; //Touch screen y2
GPIO_InitStruct.GPIO_Speed=GPIO_Speed_50MHz; GPIO_InitStruct.GPIO_Mode=GPIO_Mode_Out_PP; GPIO_Init(GPIOC,&GPIO_InitStruct);GPIO_InitStruct.GPIO_Pin=GPIO_Pin_1; //Touch screen x1
GPIO_InitStruct.GPIO_Speed=GPIO_Speed_50MHz; GPIO_InitStruct.GPIO_Mode=GPIO_Mode_AIN; GPIO_Init(GPIOB,&GPIO_InitStruct);GPIO_InitStruct.GPIO_Pin=GPIO_Pin_0; //Touch screen y1
GPIO_InitStruct.GPIO_Speed=GPIO_Speed_50MHz; GPIO_InitStruct.GPIO_Mode=GPIO_Mode_Out_PP; GPIO_Init(GPIOB,&GPIO_InitStruct); //(*GPIOC).BSRR=0x00000001; // bit 0 en sortie port C==> Y2 GPIO_SetBits(GPIOC,GPIO_Pin_0); // bit 0 en sortie port C==> Y2 } Now I want to configure the ADC and try to use the touchscreen, but I've no idea how to do this? If you can help me. Thank you Boby #touch-screen