PIN PCD85441PINS[5] = {
{ &PORTB, 0x01<<12 }, // RB12 is SDIN1
{ &PORTB, 0x01<<11 }, // RB11 is SCLK1
{ &PORTB, 0x01<<13 }, // RB13 is DC1
{ &PORTB, 0x01<<14 }, // RB14 is SCE1
{ &PORTB, 0x01<<15 }, // RB15 is RST1
};
PIN PCD85442PINS[5] = {
{ &PORTB, 0x01<<7 }, // RB7 is SDIN2
{ &PORTB, 0x01<<6 }, // RB6 is SCLK2
{ &PORTB, 0x01<<8 }, // RB8 is DC2
{ &PORTB, 0x01<<9 }, // RB9 is SCE2
{ &PORTB, 0x01<<10 }, // RB10 is RST2
};
PIN PCD85443PINS[5] = {
{ &PORTB, 0x01<<2 }, // RB2 is SDIN3
{ &PORTB, 0x01<<1 }, // RB1 is SCLK3
{ &PORTB, 0x01<<3 }, // RB3 is DC3
{ &PORTB, 0x01<<4 }, // RB4 is SCE3
{ &PORTB, 0x01<<5 }, // RB5 is RST3
};
int main( void ){
GLCD GLCD1, GLCD2, GLCD3;
PCD8544 PCD85441, PCD85442, PCD85443;
GLCD1 = *GLCDConstruct( 84, 48 );
GLCD2 = *GLCDConstruct( 84, 48 );
GLCD3 = *GLCDConstruct( 84, 48 );
PCD85441 = *PCD8544Construct( PCD85441PINS, GLCD1.pBuffer );
PCD85442 = *PCD8544Construct( PCD85442PINS, GLCD2.pBuffer );
PCD85443 = *PCD8544Construct( PCD85443PINS, GLCD3.pBuffer );
PCD8544WriteCommand( &PCD85441, FUNCTION_SET | CHIP_ACTIVE );
PCD8544WriteCommand( &PCD85442, FUNCTION_SET | CHIP_ACTIVE );
PCD8544WriteCommand( &PCD85443, FUNCTION_SET | CHIP_ACTIVE );
while( 1 ){
GLCDText57( &GLCD1, 1, 10, "Hello World! from LCD1", 1, BLACK );
GLCDText57( &GLCD2, 1, 10, "Hello World! from LCD2", 1, BLACK );
GLCDText57( &GLCD3, 1, 10, "Hello World! from LCD3", 1, BLACK );
PCD8544WriteBuffer( &PCD85441 );
PCD8544WriteBuffer( &PCD85442 );
PCD8544WriteBuffer( &PCD85443 );
}
}