Jump to content
43oh

2.4" 320 x 240 Color LCD Booster Pack (with and without touch panel)


Recommended Posts

  • Replies 37
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

New LCD BoosterPacks are here. Both are 2.4" 320x240, one with touch panel, one without. Both feature the same pinout as their "little" 2.2" brother, same configuration options and SD socket. Can be

@@CorB, the pinout is the same as my 2.2" 320x240 LCD, touch controller same as 2.2" Touch LCD. I will add this information here later on and also update my lib (there are only 3 lines that have to b

Here's the pinout (LCDs are preconfigured for new pinout.) Pos/Pin CS_Dis CS_SD D/C New(1) P2.5 P2.4 P1.3 Legacy(2) P1.0 P2.5 P1.4 P2.0 Touch IRQ P2.1 Touch CS As for the library, u

Posted Images

Hi,

 

@@RobG. Thanks for the answer but ... its not a response that helps me much. I have shared the part of the Energia code that I have changed, that part shows a change for the CS pin to 2_5 and the D/C to 1_3. You now mention a change to an RS pin. Which pin do you mean by this ? In your mail where you mentioned the changes there is no mention of an RS pin. Sorry to bother but I would like to get it working also on Energia.

 

cheers

Cor

Link to post
Share on other sites

That would mean the changes I made are the changes that should be made ... unfortunately I only get a white screen in Energia. Must be something else that blocks the code from working properly. So no touch yet. And to further complicate ... it seems the LCD is hampering the function of the Anaren Air Boosterpack I am using in conjunction. The Anaren signals incoming data on P2_6 and I had the feeling the LCD isnt using that pin at all. But when I mount the LCD the RF still works but doesnt signal incoming RF packages. Ah ... thats what fiddling with MCUs is all about ;)

 

 

EDIT: just found out things work as planned if I connect the LCD with only 6 lines (+3v3,GND, CS, D/C, MOSI, CLK) ... 

 

Problem Solved ... IRQ was interfering.

Link to post
Share on other sites

I dont see the reason for the conflict yet. My IRQ listens for incoming RF packs at 2_6. That pin isnt part of your LCD boosterpack. When I connect the boosterpack with 6 cables the LCD and RF operate as planned. The moment I plug the LCD directly on top of the RF the RF starts to show odd data. My normal packages do not come through anymore. I have been using the same setup with another LCDpack (Itead) without problems. Anybody with a guess where the weak spot probably resides ? 

Link to post
Share on other sites

Hello,

 

For those that like to expand (like I do) this LCD boosterpack library with more fonts and flexibility to choose them without too much worry about the size of the font etc. Based on several other sources on the internet I have add to the file fonts.h. 

typedef struct Fontstruct {
  u_char bytesperchar;
  u_char pixelsx;
  u_char pixelsy;
  u_char startchar;
  const u_char *data;

} Fontstruct;

Fontstruct currentFont;  //used to store the current Font

//example font array
const u_char kaiTi[77*50] = //ms Gothic22pt bold
{

// @0 '0' (15 pixels wide)
0xF0, 0x07, //     #######
0xF8, 0x0F, //    #########
0x7C, 0x1F, //   ##### #####
0x3C, 0x3E, //   ####   #####
0x1E, 0x3C, //  ####     ####
0x1E, 0x3C, //  ####     ####
0x1E, 0x78, //  ####      ####
0x0F, 0x78, // ####       ####
0x0F, 0x78, // ####       ####
.....
.....
0xE0, 0x01, //      ####
0xF0, 0x00, //     ####
0x70, 0x00, //     ###
0x78, 0x00, //    ####
0x3C, 0x00, //   ####
0x1C, 0x00, //   ###
0xFE, 0x1F, //  ############
0xFE, 0x1F, //  ############
0x00, 0x00, //
0x00, 0x00, //


};


// a simple function used to fill currentFont with kaiTi settings;
Fontstruct * FS_kaiTi()
{
currentFont.bytesperchar=50;
currentFont.pixelsx=15;
currentFont.pixelsy=25;
curresntFont.startchar=0x30;
currentFont.data=&kaiTi[0];


return &currentFont;
}

And below a simple way to show a character.


void drawLargeChar(u_int x, u_int y, char c) {
FS_kaiTi();//select font


u_char charbyte = 0;
u_char row = 0;
u_char bit = 0x01;
u_int col=0;


u_char oc = c- currentFont.startchar;
setArea(x, y, x + currentFont.pixelsx, y + currentFont.pixelsy);


while (charbyte < currentFont.bytesperchar) // no of bytes for a char
{
while ((row<8)) {
if (currentFont.data[oc*currentFont.bytesperchar+charbyte] & bit) {
//foreground colour
writeData(colorHighByte);
writeData(colorLowByte);
} else {
//background colour
writeData(bgColorHighByte);
writeData(bgColorLowByte);
}
bit <<= 1; // shift the bitmask
row++;
col++;
 }
 row=0; //start with 1st column of character
 bit = 0x01; //bit0 is the initial bit
 charbyte++; // next byte
}
}

cheers

CorB

 

 

 

Link to post
Share on other sites

Hi Rob,

 

The SPI of the LCD works as planned at least as long as I have the boosterpack on 6 cables. Ive measured all contactpoints of the boosterpack agains ground and VCC and found no false connections. Ive also checked adjacent pins for possible connections, none too. Maybe the metal frame of the LCD has effect on the receiption of RF data. Although the Anaren Air Boosterpack sticks sideways out of the Launchpad.

 

cheers

Cor

Link to post
Share on other sites

Hi Rob,

 

And the reception did not change for the RF ? Thats where my problems reside. When I simply connect the LCD with cables to the Anaren air (mounted on the launchpad) everything works as planned. If I lock the LCD onto the launchpad I get odd readings. 

 

How did you pull the pins up ? Using the internal resistors ?

 

regards

Cor

Link to post
Share on other sites
  • 4 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...