View previous topic :: View next topic |
Author |
Message |
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Wed Feb 23, 2011 11:07 pm |
|
|
The program that I posted uses hardware SPI, so you need these
connections between the two boards:
Code: |
PIC ADS7843 board
SCK PIN_C3 ----> DCLK pin 3
SDI PIN_C4 <---- DOUT pin 7
SDO PIN_C5 ----> DIN pin 5
\CS PIN_C2 ----> \CS pin 4
GND pin 12 ----- Vss pin 10
|
Also, both boards should have a Vdd voltage of +5v.
I don't think the BUSY signal is needed. You don't have to connect it
to the PIC. |
|
|
arunkish
Joined: 23 Dec 2008 Posts: 83
|
|
Posted: Fri Feb 25, 2011 5:33 am |
|
|
Dear PCM Programmer
Thanks a lot and it solved my problem. I do have another question for you..
I use this TFT
http://www.topwaydisplay.com/Pub/Manual/LMT057DNAFWU-AAA-Manual-Rev0.3.pdf
Everything works fine. But I do face 2 problems.
1) I am trying to set a bigger font size. But it never works. I just have 8x8 font size.
2) I have a routine to display a picture of 32x32 size, but how should i make the same routine to display a 16x16 picture. I modified the code and successfully written one on my own to display it, but it takes lot of time as it draws pixel by pixel. But the routine that already exists uses memory mapping and so it does not take much time. Please advise.
Code: |
void ShowBMP160(int32 X,int32 Y)
{
uchar i,j,k,Buffer[5];
int16 p;
int32 addr;
// Display RAM pointer
addr=Y*5; //
addr=addr<<7; //
addr=addr+X*2; // same as addr= X*2 + Y*320*2
p=0; // Data ROM pointer
for(i=0;i<32;i++)
{
Buffer[0]=4;
Buffer[1]=0x81;
Buffer[2]=addr;
Buffer[3]=addr>>8;
Buffer[4]=addr>>16;
WritePKG(Buffer);
for(j=0;j<2;j++) // sprit one line data to 8 packet
{
SdCmd(0x84); // send data packet
SdCmd(32); // no of byte in one packet
for(k=0;k<16;k++) // no of pixels in one packet
{
SdCmd(pic05[p]); // low byte
SdCmd(pic05[p+1]); // high byte
p+=2;
}
CmdEnd();
}
addr+=640; // next line
}
} |
Here is my code that takes lot of time
Code: |
void showpic(int16 x,int16 y)
{
static int32 i=0;
int16 j,k;
uchar Buffer[5],Buffer1[6];
for(j=0;j<y;j++)
{
for(k=0;k<x;k++)
{
Buffer[0]=3;
Buffer[1]=0x20;
Buffer[2]=pic05[i++];
Buffer[3]=pic05[i++];
WritePKG(Buffer);
delay_ms(5);
Buffer1[0]=5;
Buffer1[1]=0x23;
Buffer1[2]=k;
Buffer1[3]=k>>8;
Buffer1[4]=j;
Buffer1[5]=j>>8;
WritePKG(Buffer1);
delay_ms(5);
// Draw_Dot(k,j);
}
}
} |
|
|
|
wipsri
Joined: 10 May 2011 Posts: 6
|
need the details |
Posted: Fri Jul 22, 2011 10:46 am |
|
|
Dear arunkish
I need to develop the TFT display with Touchscreen for my project. Can you please tell me where can I get the TFT and touch board in INDIA which you used.
Thanks in advance.... |
|
|
|