Deepak Rathore
Member level 2
hello friends..
Currently i am working on Micromedia Stellaris ARM Cortex M3 board.it has inbulit TFT LCD display having a touch screen also.
I am now trying to start the Touch screen on the TFT display.
it has two analog input and two drive output to the touch screen
The analog input is connected to the PORTB(PB4:XL,PB5:YD)
Drive A = PE0(PORTE 0 pin)
Drive B = PE1(PORTE 1 pin)
I have config the ADC for the analog input that is connected to the PORTB
I am reading the X and Y cordinates from the following code
the above code is not working,and i don't know how to send the info which analog input is send fr A to D conversion to ADCSSMUX0 register during reading of Xcord,Ycord.
please help
Deepak
Currently i am working on Micromedia Stellaris ARM Cortex M3 board.it has inbulit TFT LCD display having a touch screen also.
I am now trying to start the Touch screen on the TFT display.
it has two analog input and two drive output to the touch screen
The analog input is connected to the PORTB(PB4:XL,PB5:YD)
Drive A = PE0(PORTE 0 pin)
Drive B = PE1(PORTE 1 pin)
I have config the ADC for the analog input that is connected to the PORTB
I am reading the X and Y cordinates from the following code
Code:
int main()
{
unsigned long int Xcord, Ycord;
ADC_Init();
Delay();
Xcord = ReadX();
Ycord = ReadY();
}
unsigned long int GetX()
{
unsigned long int ReadX;
GPIO_PORTE_DATA_R = 0x00000001;
Delay_ms(5);
ReadX = Read_ADC0(0x20);
return ReadX;
}
//=============================================================================================
unsigned long int GetY()
{
unsigned long int ReadY;
GPIO_PORTE_DATA_R = 0x00000002;
Delay_ms(5);
ReadY = Read_ADC0(0x10);
return ReadY;
}
}
the above code is not working,and i don't know how to send the info which analog input is send fr A to D conversion to ADCSSMUX0 register during reading of Xcord,Ycord.
please help
Deepak