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;
AS there is no MD pin so i disable the MD line in the code.
Any help will be appreciated, thanks.
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.