NXP Semiconductors
UM10817
OM13503, PCA8539 demo board
UM10817
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2014. All rights reserved.
User manual
Rev. 1 — 3 September 2014
9 of 13
4. Display module
The display is a Passive Matrix Vertically Aligned (PMVA) negative display providing a
very dark background with a very wide and symmetric viewing angle.
5. Software code example
The PCA8539 data sheet contains all the commands and their description. In order to
write software for this driver, it is necessary to read the datasheet.
Below, an example for the configuration of the module is listed. Exact details of how to
write the functions are left to the programmer. This example shows the data to be sent to
the PCA8539 to configure it for use with the module on this board.
//Configure PCA8539
I2CWrite = PCA8539_ADDR;
I2CWrite = 0b10000000;
// control byte
I2CWrite = 0x01;
// Initialize
I2CWrite = 0b10000000;
// control byte
I2CWrite = 0x02;
// OTP refresh
delay_ms(20);
I2CWrite = PCA8539_ADDR;
I2CWrite = 0b10000000;
// control byte
I2CWrite = 0x21;
// Enable CLKOUT signal
I2CWrite = 0b10000000;
// control byte
I2CWrite = 0x50;
// Set multiplex mode to 1:18
I2CWrite = 0b11000000;
// control byte
I2CWrite = 0x40;
// Set to frame inversion mode
I2CWrite = 0b11000000;
// control byte
I2CWrite = 0x2A;
// Display address increments by 1
2CWrite = 0b11000000;
// control byte
I2CWrite = 0x90;
// set frame frequency to 160 Hz
I2CWrite = 0b11000000;
// control byte
I2CWrite = 0x04;
// Display config. segment data L to R
I2CWrite = 0b11100000;
// control byte
I2CWrite = 0xAC;
// Set MSB Vlcd to 01100
I2CWrite = 0b11100000;
// control byte
I2CWrite = 0x9D;
// Set LSB Vlcd to 1101
// MSB=0xAC, LSB=0x9D, resulting in 10.15V
I2CWrite = 0b11100000;
// control byte
I2CWrite = 0x85;
// Enable charge pump and set to 3x
I2CWrite = 0b11100000;
// control byte
I2CWrite = 0x05;
// Enable temperature comp. of Vlcd
I2CWrite = 0b11000000;
// control byte
I2CWrite = 0x24;
// Enable display
I2CWrite = 0b10000000;
// control byte