Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

240c128 LCD not working (JHD240128D)

Status
Not open for further replies.

Sajjadkhan

Full Member level 5
Joined
Sep 25, 2010
Messages
307
Helped
17
Reputation
34
Reaction score
16
Trophy points
1,298
Location
Rawalpindi,Pakistan
Activity points
4,199
Hi mates,

I bought the following LCD two days back and hook it with PIC16f887.

**broken link removed**

The thing is that i did whatever i can but can't make it to work. I have triple check my connections.

Maybe this lcd is not supported. Also there is no MD pin on LCD. By the way what is MD pin?

anyways here is my unmanaged code;
Code:
#include        "__T6963C.h"

// T6963C module connections
char T6963C_dataPort at PORTD;                   // DATA port

sbit T6963C_ctrlwr  at RB5_bit;                  // WR write signal
sbit T6963C_ctrlrd  at RB4_bit;                  // RD read signal
sbit T6963C_ctrlcd  at RB2_bit;                  // CD command/data signal
sbit T6963C_ctrlrst at RB1_bit;                  // RST reset signal
sbit T6963C_ctrlwr_Direction  at TRISB5_bit;     // WR write signal
sbit T6963C_ctrlrd_Direction  at TRISB4_bit;     // RD read signal
sbit T6963C_ctrlcd_Direction  at TRISB2_bit;     // CD command/data signal
sbit T6963C_ctrlrst_Direction at TRISB1_bit;     // RST reset signal

// Signals not used by library, they are set in main function
sbit T6963C_ctrlce at RB3_bit;                   // CE signal
sbit T6963C_ctrlfs at RC4_bit;                   // FS signal
sbit T6963C_ctrlmd at RC5_bit;                   // MD signal
sbit T6963C_ctrlce_Direction  at TRISB3_bit;     // CE signal direction
sbit T6963C_ctrlfs_Direction  at TRISC4_bit;     // FS signal direction
sbit T6963C_ctrlmd_Direction  at TRISC5_bit;     // MD signal direction

// End T6963C module connections



void main() {
  delay_ms(100);

  ANSEL  = 0;                   // Configure AN pins as digital I/O
  ANSELH = 0;
  C1ON_bit = 0;                 // Disable comparators
  C2ON_bit = 0;

  TRISA = 0;
  TRISB = 0;
  TRISC = 0;
  TRISD = 0;
  
  PortA = 0;
  PortB = 0;
  PortC = 0;
  PortD = 0;
  

  T6963C_ctrlce_Direction = 0;
  T6963C_ctrlce = 0;            // Enable T6963C
  T6963C_ctrlfs_Direction = 0;
  T6963C_ctrlfs = 0;            // Font Select 8x8
 // T6963C_ctrlmd_Direction = 0;
  //T6963C_ctrlmd = 0;            // Column number select

  delay_ms(100);
  // Initialize T6963C
  T6963C_init(240, 128, 8);
  delay_ms(100);

T6963C_write_text("WELCOME !", 0, 0, T6963C_ROM_MODE_XOR);
T6963C_rectangle(20, 20, 219, 107, T6963C_WHITE);


  while(1)
  {
  }
}

AS there is no MD pin so i disable the MD line in the code.

Any help will be appreciated, thanks.
 

It is mentioned Reverse (MD). It might be three things. Either it reverses the display like Black Text on Clear Background / Clear Text on Black Background or it might be MODE select pin that is 4-bit or 8-bit mode (I don't know whether GLCD work in 4 bit mode) or TEXT MODE selection i.e., Character size switching.
 

Besides the data lines DB0-DB7, the typical control lines of a T6963C based GLCD are WR, RD, CE, C/D, RST and FS, which your version of the GLCD provides.

Without examining the __T6963C.h header file, it would be difficult to determine with certainty to what exactly these signals are referring.

You may find the attached guide as helpful in writing your own routines, also the following link offers a T6963C driver for AVR which can be ported to the PIC family:

Toshiba T6963C / Atmel AVR Driver

BigDog
 

Attachments

  • T6963rr.pdf
    31.8 KB · Views: 122

Maybe you did not initialize it correctly.
I will post my source code here this night. But it is used on AVR mcu.
 

Without examining the __T6963C.h header file, it would be difficult to determine with certainty to what exactly these signals are referring.

BigDog

Here is the header file which i picked from mikroC installation folder in examples.

signals are not defined here.

View attachment __T6963C.zip

- - - Updated - - -

Update:

when i write simple text nothing happens but when i try to draw square, circle etc, i get jumbled up text shifting left and right like "jkhas*^*$*#0jam as as almf alap" full of screen. i think this means that lcd is initialized but whats wrong? that i dont know.
 

Attached files are source file and head files. They have been successfully run on AVR.
Below picture is one picture displayed on 240128 LCD with this program.
No.2-1.jpg
 

Attachments

  • T6963C.c.txt
    5.3 KB · Views: 120
  • T6963C.h.txt
    3.6 KB · Views: 113

Which Compiler are you using?

Just using mikroC T6963 header file will not work. The function definitions are inside compiled library .mcl file. The code is not disclosed. Other compilers can't understand .mcl files. If you just use GLCD header file of mikroC in other compiler then it includes only defines and function prototypes.
 
Last edited:

I am using MikroC pro for PIC build 5.61.

I have managed to drive the lcd. I was not initializing the graphic and text i.e. T6963C_graphics(1); and T6963C_text(1);

So for graphic i need more memory so i switched to PIC18f452 which was laying around.

I have managed to display text but i am unable to display graphics. here is the code below:

Code:
#include        "__T6963C.h"

// T6963C module connections
char T6963C_dataPort at PORTD;                   // DATA port

sbit T6963C_ctrlwr  at RB5_bit;                  // WR write signal
sbit T6963C_ctrlrd  at RB4_bit;                  // RD read signal
sbit T6963C_ctrlcd  at RB2_bit;                  // CD command/data signal
sbit T6963C_ctrlrst at RB1_bit;                  // RST reset signal
sbit T6963C_ctrlwr_Direction  at TRISB5_bit;     // WR write signal
sbit T6963C_ctrlrd_Direction  at TRISB4_bit;     // RD read signal
sbit T6963C_ctrlcd_Direction  at TRISB2_bit;     // CD command/data signal
sbit T6963C_ctrlrst_Direction at TRISB1_bit;     // RST reset signal

// Signals not used by library, they are set in main function
sbit T6963C_ctrlce at RB3_bit;                   // CE signal
sbit T6963C_ctrlfs at RC4_bit;                   // FS signal
sbit T6963C_ctrlce_Direction  at TRISB3_bit;     // CE signal direction
sbit T6963C_ctrlfs_Direction  at TRISC4_bit;     // FS signal direction

// End T6963C module connections

// ------------------------------------------------------
// GLCD Picture name: test 240x128.bmp
// GLCD Model: T6963C 240x128
// ------------------------------------------------------

const code char test240x128[3840] = {
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,  15, 240,   0,   0,   0,   0,   0,   0,   7, 252,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, 255,   0,   0,   0, 255, 224,   0,
  0, 127, 254,   0,   0,  31, 255, 240,   0,  63, 255, 128,   0,   0,   0,   0,   0,   0,   0,   0,  31, 192,   7, 255, 224,   0,   3, 255, 252,   0,
  0, 255, 255, 128,   0,  31, 255, 240,   0, 255, 255, 192,   0,   0,   0,   0,   0,   0,   0,   0,  63, 192,  15, 255, 248,   0,  15, 255, 255,   0,
  3, 255, 255, 192,   0,  63, 255, 240,   1, 255, 255, 240,   0,   0,   0,   0,   0,   0,   0,   0, 127, 192,  63, 255, 252,   0,  31, 255, 255, 128,
  3, 255, 255, 224,   0,  63, 255, 240,   3, 255, 255, 248,   0,   0,   0,   0,   0,   0,   0,   0, 255, 192,  63, 255, 254,   0,  63, 255, 255, 128,
  7, 255, 255, 240,   0,  63, 255, 240,   7, 255, 255, 252,   0,   0,   0,   0,   0,   0,   0,   3, 255, 192, 127, 255, 255,   0, 127, 255, 255, 192,
 15, 255, 255, 240,   0, 127, 255, 240,   7, 255, 255, 252,   0,   0,   0,   0,   0,   0,   0,   7, 255, 192, 255, 255, 255,   0, 255, 255, 255, 224,
 15, 248, 255, 248,   0, 127, 255, 240,  15, 255, 159, 254,   0,   0,   0,   0,   0,   0,   0,  31, 255, 192, 255, 143, 255, 128, 255, 251, 255, 224,
 15, 248, 127, 248,   0, 127, 255, 240,  15, 255,  31, 254,   0,   0,   0,   0,   0,   0,   0, 255, 255, 192, 255, 135, 255, 128, 255, 241, 255, 224,
 31, 240, 127, 248,   0, 127, 255, 240,  15, 255,  31, 254,   0,   0,   0,   0,   0,   0,   7, 255, 255, 193, 255,   7, 255, 129, 255, 241, 255, 240,
 31, 240, 127, 252,   0, 255, 255, 240,  15, 255,  31, 255,   0,   0,   0,   0,   0,   0,   7, 255, 255, 193, 255,   7, 255, 193, 255, 241, 255, 240,
 31, 240, 127, 252,   0, 255, 255, 240,  31, 255,  31, 255,   0,   3, 255, 131, 255, 128,   7, 255, 255, 193, 255,   7, 255, 193, 255, 241, 255, 240,
 31, 240, 127, 252,   0, 255, 255, 240,  31, 255,  31, 255,   0,   3, 255, 131, 255, 128,   7, 255, 255, 193, 255,   7, 255, 193, 255, 241, 255, 240,
 31, 240, 127, 252,   1, 255, 255, 240,  31, 255,  31, 255,   0,   1, 255, 131, 255,   0,   7, 255, 255, 193, 255,   7, 255, 193, 255, 241, 255, 240,
 31, 240, 127, 252,   1, 253, 255, 240,  31, 255,  31, 255,   0,   1, 255, 131, 255,   0,   7, 255, 255, 193, 255,   7, 255, 193, 255, 241, 255, 240,
 31, 240, 127, 252,   1, 253, 255, 240,  31, 255,  31, 255,   0,   1, 255, 199, 255,   0,   0,  31, 255, 193, 255,   7, 255, 193, 255, 241, 255, 240,
 31, 240, 255, 252,   3, 253, 255, 240,  31, 255,  31, 255,   0,   0, 255, 199, 254,   0,   0,  15, 255, 193, 255,  15, 255, 193, 255, 241, 255, 240,
 31, 240, 255, 252,   3, 253, 255, 240,  31, 255,  31, 255,   0,   0, 255, 199, 254,   0,   0,   7, 255, 193, 255,  15, 255, 193, 255, 241, 255, 240,
  0,   0, 255, 252,   3, 249, 255, 240,  31, 255,  31, 255,   0,   0, 255, 199, 254,   0,   0,   7, 255, 192,   0,  15, 255, 193, 255, 241, 255, 240,
  0,   1, 255, 248,   7, 249, 255, 240,  31, 255,  31, 255,   0,   0, 127, 199, 252,   0,   0,   7, 255, 192,   0,  31, 255, 128, 255, 241, 255, 224,
  0,   1, 255, 248,   7, 249, 255, 240,  31, 255,  31, 255,   0,   0, 127, 199, 252,   0,   0,   7, 255, 192,   0,  31, 255, 128, 255, 241, 255, 224,
  0,   3, 255, 248,   7, 249, 255, 240,  31, 255,  31, 255,   0,   0, 127, 239, 252,   0,   0,   7, 255, 192,   0,  63, 255, 128, 127, 251, 255, 192,
  0,   3, 255, 248,   7, 241, 255, 240,  31, 255,  31, 255,   0,   0,  63, 239, 248,   0,   0,   7, 255, 192,   0,  63, 255, 128, 127, 255, 255, 128,
  0,   3, 255, 240,  15, 241, 255, 240,  31, 255,  31, 255,   0,   0,  63, 239, 248,   0,   0,   7, 255, 192,   0,  63, 255,   0,  63, 255, 255,   0,
  0,   7, 255, 240,  15, 241, 255, 240,  31, 255,  31, 255,   0,   0,  63, 239, 248,   0,   0,   7, 255, 192,   0, 127, 255,   0,  15, 255, 252,   0,
  0,   7, 255, 224,  15, 241, 255, 240,  31, 255,  31, 255,   0,   0,  63, 239, 248,   0,   0,   7, 255, 192,   0, 127, 254,   0,  63, 255, 255,   0,
  0,  15, 255, 224,  31, 225, 255, 240,  31, 255,  31, 255,   0,   0,  31, 255, 240,   0,   0,   7, 255, 192,   0, 255, 254,   0, 127, 255, 255, 128,
  0,  15, 255, 224,  31, 225, 255, 240,  31, 255,  31, 255,   0,   0,  31, 255, 240,   0,   0,   7, 255, 192,   0, 255, 254,   0, 127, 255, 255, 192,
  0,  31, 255, 192,  31, 225, 255, 240,  31, 255,  31, 255,   0,   0,  31, 255, 240,   0,   0,   7, 255, 192,   1, 255, 252,   0, 255, 255, 255, 224,
  0,  31, 255, 192,  63, 225, 255, 240,  31, 255,  31, 255,   0,   0,  15, 255, 224,   0,   0,   7, 255, 192,   1, 255, 252,   0, 255, 251, 255, 224,
  0,  63, 255, 128,  63, 193, 255, 240,  31, 255,  31, 255,   0,   0,  15, 255, 224,   0,   0,   7, 255, 192,   3, 255, 248,   0, 255, 241, 255, 224,
  0,  63, 255, 128,  63, 193, 255, 240,  31, 255,  31, 255,   0,   0,  15, 255, 224,   0,   0,   7, 255, 192,   3, 255, 248,   1, 255, 241, 255, 240,
  0,  63, 255,   0, 127, 193, 255, 240,  31, 255,  31, 255,   0,   0,  31, 255, 240,   0,   0,   7, 255, 192,   3, 255, 240,   1, 255, 241, 255, 240,
  0, 127, 255,   0, 127, 129, 255, 240,  31, 255,  31, 255,   0,   0,  31, 255, 240,   0,   0,   7, 255, 192,   7, 255, 240,   1, 255, 241, 255, 240,
  0, 127, 254,   0, 127, 255, 255, 255,  31, 255,  31, 255,   0,   0,  31, 255, 240,   0,   0,   7, 255, 192,   7, 255, 224,   1, 255, 241, 255, 240,
  0, 255, 254,   0, 127, 255, 255, 255,  31, 255,  31, 255,   0,   0,  31, 255, 240,   0,   0,   7, 255, 192,  15, 255, 224,   1, 255, 241, 255, 240,
  0, 255, 252,   0, 127, 255, 255, 255,  31, 255,  31, 255,   0,   0,  63, 255, 248,   0,   0,   7, 255, 192,  15, 255, 192,   1, 255, 241, 255, 240,
  1, 255, 252,   0, 127, 255, 255, 255,  31, 255,  31, 255,   0,   0,  63, 239, 248,   0,   0,   7, 255, 192,  31, 255, 192,   1, 255, 241, 255, 240,
  1, 255, 248,   0, 127, 255, 255, 255,  31, 255,  31, 255,   0,   0,  63, 239, 248,   0,   0,   7, 255, 192,  31, 255, 128,   1, 255, 241, 255, 240,
  3, 255, 248,   0, 127, 255, 255, 255,  31, 255,  31, 255,   0,   0,  63, 239, 248,   0,   0,   7, 255, 192,  63, 255, 128,   1, 255, 241, 255, 240,
  3, 255, 240,   0, 127, 255, 255, 255,  31, 255,  31, 255,   0,   0, 127, 239, 252,   0,   0,   7, 255, 192,  63, 255,   0,   1, 255, 241, 255, 240,
  7, 255, 240,   0, 127, 255, 255, 255,  31, 255,  31, 255,   0,   0, 127, 239, 252,   0,   0,   7, 255, 192, 127, 255,   0,   1, 255, 241, 255, 240,
  7, 255, 224,   0, 127, 255, 255, 255,  31, 255,  31, 255,   0,   0, 127, 207, 252,   0,   0,   7, 255, 192, 127, 254,   0,   1, 255, 241, 255, 240,
 15, 255, 192,   0,   0,   1, 255, 240,  15, 255,  31, 254,   0,   0, 255, 199, 254,   0,   0,   7, 255, 192, 255, 252,   0,   1, 255, 241, 255, 240,
 15, 255, 192,   0,   0,   1, 255, 240,  15, 255,  31, 254,   0,   0, 255, 199, 254,   0,   0,   7, 255, 192, 255, 252,   0,   0, 255, 241, 255, 224,
 31, 255, 255, 248,   0,   1, 255, 240,  15, 255,  63, 254,   0,   0, 255, 199, 254,   0,   0,   7, 255, 193, 255, 255, 255, 128, 255, 249, 255, 224,
 31, 255, 255, 248,   0,   1, 255, 240,   7, 255, 255, 252,   0,   0, 255, 199, 254,   0,   0,   7, 255, 193, 255, 255, 255, 128, 255, 255, 255, 224,
 31, 255, 255, 248,   0,   1, 255, 240,   7, 255, 255, 252,   0,   1, 255, 199, 255,   0,   0,   7, 255, 193, 255, 255, 255, 128, 127, 255, 255, 192,
 31, 255, 255, 248,   0,   1, 255, 240,   3, 255, 255, 248,   0,   1, 255, 131, 255,   0,   0,   7, 255, 193, 255, 255, 255, 128, 127, 255, 255, 192,
 31, 255, 255, 248,   0,   1, 255, 240,   1, 255, 255, 240,   0,   1, 255, 131, 255,   0,   0,   7, 255, 193, 255, 255, 255, 128,  63, 255, 255, 128,
 31, 255, 255, 248,   0,   1, 255, 240,   0, 255, 255, 224,   0,   3, 255, 131, 255, 128,   0,   7, 255, 193, 255, 255, 255, 128,  15, 255, 255,   0,
 31, 255, 255, 248,   0,   1, 255, 240,   0,  63, 255, 128,   0,   3, 255, 131, 255, 128,   0,   7, 255, 193, 255, 255, 255, 128,   7, 255, 252,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   7, 254,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, 255, 224,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0
};


void main() 
{
  PortA = 0;
  PortB = 0;
  PortC = 0;
  PortD = 0;


  T6963C_ctrlce_Direction = 0;
  T6963C_ctrlce = 0;            // Enable T6963C
  T6963C_ctrlfs_Direction = 0;
  T6963C_ctrlfs = 0;            // Font Select 8x8
  delay_ms(100);
  // Initialize T6963C
  T6963C_init(240, 128, 8);
  delay_ms(10);
  T6963C_graphics(1);
  T6963C_text(1);
  delay_ms(10);
  T6963C_image(test240x128);
  //T6963C_write_text("1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ", 0, 0, T6963C_ROM_MODE_XOR);





  while(1)
  {
  }
}

I have commented the write_txt command because it was working. focusing only on graphics now. for the first 2 times lcd printed the image and afterwards when i messed up with FS(font size) and wide and narrow option in Glcd tool, it didnt work. i put everything back as they were but no good.

Any advice for what i am doing wrong?
 


Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
sbit T6963C_ctrlwr  at LATB5_bit;                  // WR write signal
sbit T6963C_ctrlrd  at LATB4_bit;                  // RD read signal
sbit T6963C_ctrlcd  at LATB2_bit;                  // CD command/data signal
sbit T6963C_ctrlrst at LATB1_bit;                  // RST reset signal
sbit T6963C_ctrlwr_Direction  at TRISB5_bit;       // WR write signal
sbit T6963C_ctrlrd_Direction  at TRISB4_bit;       // RD read signal
sbit T6963C_ctrlcd_Direction  at TRISB2_bit;       // CD command/data signal
sbit T6963C_ctrlrst_Direction at TRISB1_bit;       // RST reset signal
 
// Signals not used by library, they are set in main function
sbit T6963C_ctrlce at LATB3_bit;                   // CE signal
sbit T6963C_ctrlfs at LATC4_bit;                   // FS signal
sbit T6963C_ctrlce_Direction  at TRISB3_bit;       // CE signal direction
sbit T6963C_ctrlfs_Direction  at TRISC4_bit;       // FS signal direction

 

Thanks i'll try this and report you back now.

- - - Updated - - -

Nope,nothing happened. Still blank LCD.
 

So i wan't adding TRISA = TRISB = TRISC = TRISD = 0x00;

i thought lcd declaration would have handled it, but what can i say, i m still learning. thanks man.
 

I had also changed the graphics data (array). There was wide and narrow types. 5120 bytes for narrow, 3180 bytes for wide. I used wide. I didn't test the code. Try with both arrays and reply.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top