Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
LCD ITDB02-3.2S on Olimex Board
28-11-2011, 10:05 AM,
#1
LCD ITDB02-3.2S on Olimex Board
Hello,

I have trouble to get this 16Bit LCD working on PIC32-Pinguino.
Since i have an ITead LCD Shield for the Arduino, i shortened the Resistors on the Shield and wanted to make this shield compatible with the Olimex board.
The not ascending Port Numbers which prohibit the use of
Code:
LCD_DATA_BUS = data;

Could be solved by using (pins[x] is the pinmask)

Code:
if(data & 0b0000000000000001){ PORTDSET = pins[0]; }else{ PORTDCLR = pins[0]; }
  if(data & 0b0000000000000010){ PORTDSET = pins[1]; }else{ PORTDCLR = pins[1]; }
  if(data & 0b0000000000000100){ PORTBSET = pins[20]; }else{ PORTBCLR = pins[20]; }
  if(data & 0b0000000000001000){ PORTDSET = pins[3]; }else{ PORTDCLR = pins[3]; }
  if(data & 0b0000000000010000){ PORTDSET = pins[4]; }else{ PORTDCLR = pins[4]; }
  if(data & 0b0000000000100000){ PORTDSET = pins[5]; }else{ PORTDCLR = pins[5]; }
  if(data & 0b0000000001000000){ PORTDSET = pins[6]; }else{ PORTDCLR = pins[6]; }
  if(data & 0b0000000010000000){ PORTDSET = pins[7]; }else{ PORTDCLR = pins[7]; }
  if(data & 0b0000000100000000){ PORTBSET = pins[8]; }else{ PORTBCLR = pins[8]; }
  if(data & 0b0000001000000000){ PORTBSET = pins[9]; }else{ PORTBCLR = pins[9]; }  
  if(data & 0b0000010000000000){ PORTGSET = pins[10]; }else{ PORTGCLR = pins[10]; }
  if(data & 0b0000100000000000){ PORTGSET = pins[11]; }else{ PORTGCLR = pins[11]; }
  if(data & 0b0001000000000000){ PORTGSET = pins[12]; }else{ PORTGCLR = pins[12]; }
  if(data & 0b0010000000000000){ PORTGSET = pins[13]; }else{ PORTGCLR = pins[13]; }
  if(data & 0b0100000000000000){ PORTBSET = pins[14]; }else{ PORTBCLR = pins[14]; }
  if(data & 0b1000000000000000){ PORTBSET = pins[15]; }else{ PORTBCLR = pins[15]; }
Note that pin D02 does not work here as i am getting a very distorted Signal, so i used Pin A6.
Well, i am getting signals on the different Pins and even on the LCD with right Levels but the LCD stays just White.
Somehow the WR Signal does not seem to be right as the Pulses are very Short (<0.1us).

Also i have seen that the guys from ChipKit do initialize this Display a little bit different (its an 3.2S). But changing this didn´t do anything.

Has someone any idea why this is not working on the Olimex pic32 board ?

Regards
Reply
28-11-2011, 07:52 PM,
#2
RE: LCD ITDB02-3.2S on Olimex Board
3.2s ? uahuh!
Your if is right? if(data & 0b0000000000000001) returning true? if that bit is on?
Reply
28-11-2011, 10:23 PM,
#3
RE: LCD ITDB02-3.2S on Olimex Board
Hello !

Why so upset ? Smile

Yes this does work indeed.

For testing:
Code:
void test(int data){
   if(data & 0b0000000000000001){ PORTDSET = 0x04; }else{ PORTDCLR = 0x04; }
   if(data & 0b0000000000000010){ PORTDSET = 0x08; }else{ PORTDCLR = 0x08; }
}
void setup()
{
  pinMode(0, OUTPUT);
  pinMode(1, OUTPUT);
  test(1);
}
void loop(){}
This sets Pin D0 to HIGH, test(2) sets Pin D1 HIGH and test(3) Pin D0 and D1 to HIGH.

But still only White Screen...
Reply
30-11-2011, 08:15 PM,
#4
RE: LCD ITDB02-3.2S on Olimex Board
TDR, have you changed your ITEAD LCD Shield Jumpers to 16bit mode?
Reply
30-11-2011, 11:17 PM,
#5
RE: LCD ITDB02-3.2S on Olimex Board
Yes, they are set to 16Bit.
I get Signals on DB0-DB15 pins of the LCD.

Reply
04-12-2011, 04:06 PM,
#6
RE: LCD ITDB02-3.2S on Olimex Board
It is working now,

I had to change the bit Order and delay the WR signal.

Have to sort the code a bit Smile
Reply
04-12-2011, 05:00 PM,
#7
RE: LCD ITDB02-3.2S on Olimex Board
Fine, I think you made a good work! thanks!
Reply
05-12-2011, 01:40 PM,
#8
RE: LCD ITDB02-3.2S on Olimex Board
Hi,
Can you share your code so that we can add it to the next release ?
Thank you.

(04-12-2011, 05:00 PM)Anunakin Wrote: Fine, I think you made a good work! thanks!

It is easier to complain than it is to do, but it is better to do than it is to complain.
Reply
29-02-2012, 09:40 PM,
#9
RE: LCD ITDB02-3.2S on Olimex Board

(05-12-2011, 01:40 PM)regis Wrote: Hi,
Can you share your code so that we can add it to the next release ?
Thank you.

(04-12-2011, 05:00 PM)Anunakin Wrote: Fine, I think you made a good work! thanks!

Regis, I made a new version for 8 bits ITDB02 Display and OLIMEX Boards ... sorry all for long time wait ... Angel

I go send it when I have a 16 bit working here ...

I see same problem on pin 2 (pinguino olimex silk D2), as tdr told us.

That pin works very well at low frequencies, but it cant handle on high frequencies, needed by ITDB02. Huh

Reply
01-03-2012, 12:34 AM,
#10
RE: LCD ITDB02-3.2S on Olimex Board
Is this D2 which is for BUT (button), cpu pin 52, and is also connected to CON4-3 and cpu pin 46?

If so, that may be why!

John
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)