CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Nokia6100 LCD drivers for Epson & Philips

 
Post new topic   Reply to topic    CCS Forum Index -> Code Library
View previous topic :: View next topic  
Author Message
PICoHolic



Joined: 04 Jan 2005
Posts: 224

View user's profile Send private message

Nokia6100 LCD drivers for Epson & Philips
PostPosted: Wed Jan 06, 2010 2:55 am     Reply with quote

Those drivers are based on James P. Lynch codes, ported to CCS.

S1D15G00.h
Code:

#ifndef  S1D15G00_H
#define  S1D15G00_H
///////////////////////////////////////////////////////////////////////////////
#include <string.h>
///////////////////////////////////////////////////////////////////////////////
#define S_DISON  0xAF // Display on
#define S_DISOFF 0xAE // Display off
#define S_DISNOR 0xA6 // Normal display
#define S_DISINV 0xA7 // Inverse display
#define S_COMSCN 0xBB // Common scan direction
#define S_DISCTL 0xCA // Display control
#define S_SLPIN  0x95 // Sleep in
#define S_SLPOUT 0x94 // Sleep out
#define S_PASET  0x75 // Page address set
#define S_CASET  0x15 // Column address set
#define S_DATCTL 0xBC // Data scan direction, etc.
#define S_RGBSET8 0xCE // 256-color position set
#define S_RAMWR  0x5C // Writing to memory
#define S_RAMRD  0x5D // Reading from memory
#define S_PTLIN  0xA8 // Partial display in
#define S_PTLOUT 0xA9 // Partial display out
#define S_RMWIN  0xE0 // Read and modify write
#define S_RMWOUT 0xEE // End
#define S_ASCSET 0xAA // Area scroll set
#define S_SCSTART 0xAB // Scroll start set
#define S_OSCON  0xD1 // Internal oscillation on
#define S_OSCOFF 0xD2 // Internal oscillation off
#define S_PWRCTR 0x20 // Power control
#define S_VOLCTR 0x81 // Electronic volume control
#define S_VOLUP  0xD6 // Increment electronic control by 1
#define S_VOLDOWN 0xD7 // Decrement electronic control by 1
#define S_TMPGRD 0x82 // Temperature gradient set
#define S_EPCTIN 0xCD // Control EEPROM
#define S_EPCOUT 0xCC // Cancel EEPROM control
#define S_EPMWR 0xFC // Write into EEPROM
#define S_EPMRD 0xFD // Read from EEPROM
#define S_EPSRRD1 0x7C // Read register 1
#define S_EPSRRD2 0x7D // Read register 2
#define S_NOP 0x25 // NOP instruction
///////////////////////////////////////////////////////////////////////////////
void S1D15G00_write_data(int8 data)
{
   NLCD_CS = 0;
   
   //Disable SPI:
   SSPEN = 0;
   SSP2STAT = 0x00;
   
   //Tx first data bit:
   NLCD_SDO = 1;  //set data bit
   NLCD_SCLK= 1;  //1 clock pulse
   delay_cycles(4);
   NLCD_SCLK= 0;  //clk low
   NLCD_SDO = 0;  //data low
   
   //re-enable SPI:
   SSPEN = 1;
   SSP2STAT = 0x40;
   spi_write2(data);
   
   NLCD_CS = 1;
}
///////////////////////////////////////////////////////////////////////////////
void S1D15G00_write_command(int8 command)
{
   NLCD_CS = 0;
   
   //Disable SPI:
   SSPEN = 0;
   SSP2STAT = 0x00;
   
   //Tx first data bit:
   NLCD_SDO = 0;  //clear data bit
   NLCD_SCLK= 1;  //1 clock pulse
   delay_cycles(4);
   NLCD_SCLK= 0;  //clk low
   NLCD_SDO = 0;  //data low
   
   //re-enable SPI:
   SSPEN = 1;
   SSP2STAT = 0x40;
   spi_write2(command);
   
   NLCD_CS = 1;
}
///////////////////////////////////////////////////////////////////////////////
void S1D15G00_LCDClearScreen()
{
   long i; // loop counter
   // Row address set (command 0x2B)
   S1D15G00_write_command(S_PASET);
   S1D15G00_write_data(0);
   S1D15G00_write_data(131);
   // Column address set (command 0x2A)
   S1D15G00_write_command(S_CASET);
   S1D15G00_write_data(0);
   S1D15G00_write_data(131);
   // set the display memory to BLACK
   S1D15G00_write_command(S_RAMWR);
   for(i = 0; i < ((131 * 131) / 2); i++)
   {
      S1D15G00_write_data(0x00);
      S1D15G00_write_data(0x00);
      S1D15G00_write_data(0x00);
   }
}
///////////////////////////////////////////////////////////////////////////////
void S1D15G00_LCDWhiteScreen()
{
   long i; // loop counter
   // Row address set (command 0x2B)
   S1D15G00_write_command(S_PASET);
   S1D15G00_write_data(0);
   S1D15G00_write_data(131);
   // Column address set (command 0x2A)
   S1D15G00_write_command(S_CASET);
   S1D15G00_write_data(0);
   S1D15G00_write_data(131);
   // set the display memory to BLACK
   S1D15G00_write_command(S_RAMWR);
   for(i = 0; i < ((131 * 131) / 2); i++)
   {
      S1D15G00_write_data(0xFF);
      S1D15G00_write_data(0xFF);
      S1D15G00_write_data(0xFF);
   }
}
///////////////////////////////////////////////////////////////////////////////
void S1D15G00_init()
{
   NLCD_CS = 1;
   
   // Hardware reset
   NLCD_RESET = 0;
   delay_ms(10);
   NLCD_RESET = 1;
   delay_ms(10);
   // Display control
   S1D15G00_write_command(S_DISCTL);
   S1D15G00_write_data(0x00); // P1: 0x00 = 2 divisions, switching period=8 (default)
   S1D15G00_write_data(0x20); // P2: 0x20 = nlines/4 - 1 = 132/4 - 1 = 32)
   S1D15G00_write_data(0x00); // P3: 0x00 = no inversely highlighted lines
   // COM scan
   S1D15G00_write_command(S_COMSCN);
   S1D15G00_write_data(1); // P1: 0x01 = Scan 1->80, 160<-81
   // Internal oscilator ON
   S1D15G00_write_command(S_OSCON);
   // Sleep out
   S1D15G00_write_command(S_SLPOUT);
   // Power control
   S1D15G00_write_command(S_PWRCTR);
   S1D15G00_write_data(0x0f); // reference voltage regulator on, circuit voltage follower on, BOOST ON
   // Inverse display
   S1D15G00_write_command(S_DISINV);
   // Data control
   S1D15G00_write_command(S_DATCTL);
   S1D15G00_write_data(0x01); // P1: 0x01 = page address inverted, column address normal, address scan in column direction
   S1D15G00_write_data(0x00); // P2: 0x00 = RGB sequence (default value)
   S1D15G00_write_data(0x02); // P3: 0x02 = Grayscale -> 16 (selects 12-bit color, type A)
   // Voltage control (contrast setting)
   S1D15G00_write_command(S_VOLCTR);
   S1D15G00_write_data(38); // P1 = 40 volume value (experiment with this value to get the best contrast)
   S1D15G00_write_data(3); // P2 = 3 resistance ratio (only value that works)
   // allow power supply to stabilize
   delay_ms(50);
   // turn on the display
   S1D15G00_write_command(S_DISON);
   
}
///////////////////////////////////////////////////////////////////////////////
void S1D15G00_LCDSetPixel(int x, int y, int16 color)
{
   int16 temp_color=0;
   // Row address set (command 0x2B)
   S1D15G00_write_command(S_PASET);
   S1D15G00_write_data(y);
   S1D15G00_write_data(y);
   // Column address set (command 0x2A)
   S1D15G00_write_command(S_CASET);
   S1D15G00_write_data(x);
   S1D15G00_write_data(x);
   // Now illuminate the pixel (2nd pixel will be ignored)
   temp_color = color << 4;
   S1D15G00_write_command(S_RAMWR);
   S1D15G00_write_data(make8(temp_color,1));
   S1D15G00_write_data(make8(color,1) | make8(temp_color,0));
   S1D15G00_write_data(make8(color,0));
}
///////////////////////////////////////////////////////////////////////////////
void S1D15G00_LCDPutChar(char c, int x, int y, int8 size, int16 fColor, int16 bColor)
{
   int8 i,j;
   unsigned int8 nCols;
   unsigned int8 nRows;
   unsigned int8 nBytes;
   unsigned char PixelRow;
   unsigned char Mask;
   unsigned int16 Word0;
   unsigned int16 Word1;
   //unsigned char *pFont;
   unsigned char pChar[16];
   //unsigned char *FontTable[] = {(unsigned char *)FONT6x8, (unsigned char *)FONT8x8,
   //(unsigned char *)FONT8x16};
   // get pointer to the beginning of the selected font table
   // &
   // get the nColumns, nRows and nBytes
   switch(size)
   {
      case 0:
         nCols = FONT6x8[0][0];
         nRows = FONT6x8[0][1];
         nBytes= FONT6x8[0][2];
         memcpy(pChar, FONT6x8[c - 0x1F], nBytes);
      break;
     
      case 1:
         nCols = FONT8x8[0][0];
         nRows = FONT8x8[0][1];
         nBytes= FONT8x8[0][2];
         memcpy(pChar, FONT8x8[c - 0x1F], nBytes);
      break;
     
      case 2:
         nCols = FONT8x16[0][0];
         nRows = FONT8x16[0][1];
         nBytes= FONT8x16[0][2];
         memcpy(pChar, FONT8x16[c - 0x1F], nBytes);
      break;
   }
   // Row address set (command 0x2B)
   S1D15G00_write_command(S_PASET);
   S1D15G00_write_data(y);
   S1D15G00_write_data(y + nRows - 1);
   // Column address set (command 0x2A)
   S1D15G00_write_command(S_CASET);
   S1D15G00_write_data(x);
   S1D15G00_write_data(x + nCols - 1);
   // WRITE MEMORY
   S1D15G00_write_command(S_RAMWR);
   // loop on each row, working backwards from the bottom to the top
   for (i = nRows - 1; i != 255; i--)
   {
      // copy pixel row from font table and then decrement row
      PixelRow = pChar[i];
      // loop on each pixel in the row (left to right)
      // Note: we do two pixels each loop
      Mask = 0x80;
      for (j = 0; j < nCols; j += 2) {
      // if pixel bit set, use foreground color; else use the background color
      // now get the pixel color for two successive pixels
      if ((PixelRow & Mask) == 0)
         Word0 = bColor;
      else
         Word0 = fColor;
      Mask >>= 1;
      if ((PixelRow & Mask) == 0)
         Word1 = bColor;
      else
         Word1 = fColor;
      Mask >>= 1;
      // use this information to output three data bytes
      S1D15G00_write_data((Word0 >> 4) & 0xFF);
      S1D15G00_write_data(((Word0 & 0xF) << 4) | ((Word1 >> 8) & 0xF));
      S1D15G00_write_data(Word1 & 0xFF);
      }
   }
   // terminate the Write Memory command
   S1D15G00_write_command(S_NOP);
}
///////////////////////////////////////////////////////////////////////////////
void S1D15G00_LCDPutStr(char *pString, int x, int y, int Size, int16 fColor, int16 bColor)
{
   // loop until null-terminator is seen
   while (*pString != '\0')
   {
      // draw the character
      S1D15G00_LCDPutChar(*pString++, x, y, Size, fColor, bColor);
      // advance the y position
      if (Size == SMALL)
         x = x + 6;
      else
         x = x + 8;
      // bail out if y exceeds 131
      if (y > 131) break;
   }
}
///////////////////////////////////////////////////////////////////////////////
void S1D15G00_LCDWrite132x132bmp(int8 bmp)
{
   long j; // loop counter
   // Data control (need to set "normal" page address for Olimex photograph)
   S1D15G00_write_command(S_DATCTL);
   S1D15G00_write_data(0x00); // P1: 0x00 = page address normal, column address normal, address scan in column direction
   S1D15G00_write_data(0x00); // P2: 0x00 = RGB sequence (default value)
   S1D15G00_write_data(0x02); // P3: 0x02 = Grayscale -> 16
   // Display OFF
   S1D15G00_write_command(S_DISOFF);
   // Column address set (command 0x2A)
   S1D15G00_write_command(S_CASET);
   S1D15G00_write_data(0);
   S1D15G00_write_data(131);
   // Page address set (command 0x2B)
   S1D15G00_write_command(S_PASET);
   S1D15G00_write_data(0);
   S1D15G00_write_data(131);
   // WRITE MEMORY
   S1D15G00_write_command(S_RAMWR);
   for(j = 0; j < 25740; j++)
   {
      switch (bmp)
      {
         case 0:
            S1D15G00_write_data(bmp0[j]);
         break;
         
         case 1:
            S1D15G00_write_data(bmp1[j]);
         break;
         
         case 2:
            S1D15G00_write_data(bmp2[j]);
         break;
         
         case 3:
            //S1D15G00_write_data(bmp3[j]);
         break;
      }
   }
   // Data control (return to "inverted" page address)
   S1D15G00_write_command(S_DATCTL);
   S1D15G00_write_data(0x01); // P1: 0x01 = page address inverted, column address normal, address scan in column direction
   S1D15G00_write_data(0x00); // P2: 0x00 = RGB sequence (default value)
   S1D15G00_write_data(0x02); // P3: 0x02 = Grayscale -> 16
   // Display On
   S1D15G00_write_command(S_DISON);
}
///////////////////////////////////////////////////////////////////////////////
void S1D15G00_LCDWriteIcon(int8 icon, int16 color)
{
   int16 i;
   
   switch (icon)
   {
      case 0:
         for (i=0; i<548; i++)
            S1D15G00_LCDSetPixel(PixelSet0[i][0], PixelSet0[i][1], color);
      break;
     
      case 1:
         for (i=0; i<688; i++)
            S1D15G00_LCDSetPixel(PixelSet1[i][0], PixelSet1[i][1], color);
      break;
     
      case 2:
         for (i=0; i<303; i++)
            S1D15G00_LCDSetPixel(PixelSet2[i][0], PixelSet2[i][1], color);
      break;
     
      case 3:
         for (i=0; i<630; i++)
            S1D15G00_LCDSetPixel(PixelSet3[i][0], PixelSet3[i][1], color);
      break;
   }
}
///////////////////////////////////////////////////////////////////////////////
#endif


PCF8833.h
Code:

#ifndef  PCF8833_H
#define  PCF8833_H
///////////////////////////////////////////////////////////////////////////////
#include <string.h>
///////////////////////////////////////////////////////////////////////////////
// Philips PCF8833 LCD controller command codes
#define P_NOP 0x00 // nop
#define P_SWRESET 0x01 // software reset
#define P_BSTROFF 0x02 // booster voltage OFF
#define P_BSTRON 0x03 // booster voltage ON
#define P_RDDIDIF 0x04 // read display identification
#define P_RDDST 0x09 // read display status
#define P_SLEEPIN 0x10 // sleep in
#define P_SLEEPOUT 0x11 // sleep out
#define P_PTLON 0x12 // partial display mode
#define P_NORON 0x13 // display normal mode
#define P_INVOFF 0x20 // inversion OFF
#define P_INVON 0x21 // inversion ON
#define P_DALO 0x22 // all pixel OFF
#define P_DAL 0x23 // all pixel ON
#define P_SETCON 0x25 // write contrast
#define P_DISPOFF 0x28 // display OFF
#define P_DISPON 0x29 // display ON
#define P_CASET 0x2A // column address set
#define P_PASET 0x2B // page address set
#define P_RAMWR 0x2C // memory write
#define P_RGBSET 0x2D // colour set
#define P_PTLAR 0x30 // partial area
#define P_VSCRDEF 0x33 // vertical scrolling definition
#define P_TEOFF 0x34 // test mode
#define P_TEON 0x35 // test mode
#define P_MADCTL 0x36 // memory access control
#define P_SEP 0x37 // vertical scrolling start address
#define P_IDMOFF 0x38 // idle mode OFF
#define P_IDMON 0x39 // idle mode ON
#define P_COLMOD 0x3A // interface pixel format
#define P_SETVOP 0xB0 // set Vop
#define P_BRS 0xB4 // bottom row swap
#define P_TRS 0xB6 // top row swap
#define P_DISCTR 0xB9 // display control
#define P_DOR 0xBA // data order
#define P_TCDFE 0xBD // enable/disable DF temperature compensation
#define P_TCVOPE 0xBF // enable/disable Vop temp comp
#define P_EC 0xC0 // internal or external oscillator
#define P_SETMUL 0xC2 // set multiplication factor
#define P_TCVOPAB 0xC3 // set TCVOP slopes A and B
#define P_TCVOPCD 0xC4 // set TCVOP slopes c and d
#define P_TCDF 0xC5 // set divider frequency
#define P_DF8COLOR 0xC6 // set divider frequency 8-color mode
#define P_SETBS 0xC7 // set bias system
#define P_RDTEMP 0xC8 // temperature read back
#define P_NLI 0xC9 // n-line inversion
#define P_RDID1 0xDA // read ID1
#define P_RDID2 0xDB // read ID2
#define P_RDID3 0xDC // read ID3
///////////////////////////////////////////////////////////////////////////////
void PCF8833_write_data(int8 data)
{
   NLCD_CS = 0;
   
   //Disable SPI:
   SSPEN = 0;
   SSP2STAT = 0x00;
   
   //Tx first data bit:
   NLCD_SDO = 1;  //set data bit
   NLCD_SCLK= 1;  //1 clock pulse
   delay_cycles(4);
   NLCD_SCLK= 0;  //clk low
   NLCD_SDO = 0;  //data low
   
   //re-enable SPI:
   SSPEN = 1;
   SSP2STAT = 0x40;
   spi_write2(data);
   
   NLCD_CS = 1;
}
///////////////////////////////////////////////////////////////////////////////
void PCF8833_write_command(int8 command)
{
   NLCD_CS = 0;
   
   //Disable SPI:
   SSPEN = 0;
   SSP2STAT = 0x00;
   
   //Tx first data bit:
   NLCD_SDO = 0;  //clear data bit
   NLCD_SCLK= 1;  //1 clock pulse
   delay_cycles(4);
   NLCD_SCLK= 0;  //clk low
   NLCD_SDO = 0;  //data low
   
   //re-enable SPI:
   SSPEN = 1;
   SSP2STAT = 0x40;
   spi_write2(command);
   
   NLCD_CS = 1;
}
///////////////////////////////////////////////////////////////////////////////
void PCF8833_init()
{
   NLCD_CS = 1;
   
   // Hardware reset
   NLCD_RESET = 0;
   delay_ms(50);
   NLCD_RESET = 1;
   delay_ms(50);
   // Sleep out (command 0x11)
   PCF8833_write_command(P_SLEEPOUT);
   // Inversion on (command 0x21)
   PCF8833_write_command(P_INVOFF); // seems to be required for this controller
   // Color Interface Pixel Format (command 0x3A)
   PCF8833_write_command(P_COLMOD);
   PCF8833_write_data(0x03); // 0x03 = 12 bits-per-pixel
   // Memory access controler (command 0x36)
   PCF8833_write_command(P_MADCTL);
   PCF8833_write_data(0x00); // 0xC0 = mirror x and y, reverse rgb
   // Write contrast (command 0x25)
   PCF8833_write_command(P_SETCON);
   PCF8833_write_data(0x30); // contrast 0x30
   delay_ms(50);
   // Display On (command 0x29)
   PCF8833_write_command(P_DISPON);
   
}
///////////////////////////////////////////////////////////////////////////////
void PCF8833_LCDClearScreen(void) {
   int16 i; // loop counter
   // Row address set (command 0x2B)
   PCF8833_write_command(P_PASET);
   PCF8833_write_data(0);
   PCF8833_write_data(131);
   // Column address set (command 0x2A)
   PCF8833_write_command(P_CASET);
   PCF8833_write_data(0);
   PCF8833_write_data(131);
   // set the display memory to BLACK
   PCF8833_write_command(P_RAMWR);
   For (i = 0; i < ((131 * 131) / 2); i++)
   {
      PCF8833_write_data((BLACK >> 4) & 0xFF);
      PCF8833_write_data(((BLACK & 0xF) << 4) | ((BLACK >> 8) & 0xF));
      PCF8833_write_data(BLACK & 0xFF);
   }
}
///////////////////////////////////////////////////////////////////////////////
void PCF8833_LCDSetPixel(int x, int y, int16 color)
{
   // Row address set (command 0x2B)
   PCF8833_write_command(P_PASET);
   PCF8833_write_data(y);
   PCF8833_write_data(y);
   // Column address set (command 0x2A)
   PCF8833_write_command(P_CASET);
   PCF8833_write_data(x);
   PCF8833_write_data(x);
   
   PCF8833_write_command(P_RAMWR);
   PCF8833_write_data((unsigned char)((color >> 4) & 0xFFFF));
   PCF8833_write_data((unsigned char)(((color & 0x0F) << 4) | 0x00));
   PCF8833_write_command(P_NOP);
   }
///////////////////////////////////////////////////////////////////////////////
void PCF8833_LCDPutChar(char c, int x, int y, int8 size, int16 fColor, int16 bColor)
{
   int8 i,j;
   unsigned int8 nCols;
   unsigned int8 nRows;
   unsigned int8 nBytes;
   unsigned char PixelRow;
   unsigned char Mask;
   unsigned int16 Word0;
   unsigned int16 Word1;
   unsigned char pChar[16];
   // get pointer to the beginning of the selected font table
   // &
   // get the nColumns, nRows and nBytes
   switch(size)
   {
      case 0:
         nCols = FONT6x8[0][0];
         nRows = FONT6x8[0][1];
         nBytes= FONT6x8[0][2];
         memcpy(pChar, FONT6x8[c - 0x1F], nBytes);
      break;
     
      case 1:
         nCols = FONT8x8[0][0];
         nRows = FONT8x8[0][1];
         nBytes= FONT8x8[0][2];
         memcpy(pChar, FONT8x8[c - 0x1F], nBytes);
      break;
     
      case 2:
         nCols = FONT8x16[0][0];
         nRows = FONT8x16[0][1];
         nBytes= FONT8x16[0][2];
         memcpy(pChar, FONT8x16[c - 0x1F], nBytes);
      break;
   }
   // Row address set (command 0x2B)
   PCF8833_write_command(P_PASET);
   PCF8833_write_data(y);
   PCF8833_write_data(y + nRows - 1);
   // Column address set (command 0x2A)
   PCF8833_write_command(P_CASET);
   PCF8833_write_data(x);
   PCF8833_write_data(x + nCols - 1);
   // WRITE MEMORY
   PCF8833_write_command(P_RAMWR);
   // loop on each row, working backwards from the bottom to the top
   for (i=0; i < nRows; i++) //for (i = nRows - 1; i != 255; i--)
   {
      // copy pixel row from font table and then decrement row
      PixelRow = pChar[i]; //PixelRow = *pChar--;
      // loop on each pixel in the row (left to right)
      // Note: we do two pixels each loop
      Mask = 0x80;
      for (j = 0; j < nCols; j += 2)
      {
         // if pixel bit set, use foreground color; else use the background color
         // now get the pixel color for two successive pixels
         if ((PixelRow & Mask) == 0)
            Word0 = bColor;
         else
            Word0 = fColor;
         Mask = Mask >> 1;
         if ((PixelRow & Mask) == 0)
            Word1 = bColor;
         else
            Word1 = fColor;
         Mask = Mask >> 1;
         // use this information to output three data bytes
         PCF8833_write_data((Word0 >> 4) & 0xFF);
         PCF8833_write_data(((Word0 & 0xF) << 4) | ((Word1 >> 8) & 0xF));
         PCF8833_write_data(Word1 & 0xFF);
      }
   }
   // terminate the Write Memory command
   PCF8833_write_command(P_NOP);
}
///////////////////////////////////////////////////////////////////////////////
void PCF8833_LCDPutStr(char *pString, int x, int y, int Size, int16 fColor, int16 bColor)
{
   // loop until null-terminator is seen
   while (*pString != '\0')
   {
      // draw the character
      PCF8833_LCDPutChar(*pString++, x, y, Size, fColor, bColor);
      // advance the y position
      if (Size == SMALL)
         x = x + 6;
      else
         x = x + 8;
      // bail out if y exceeds 131
      if (y > 131) break;
   }
}
///////////////////////////////////////////////////////////////////////////////
void PCF8833_LCDWrite132x132bmp(int8 bmp)
{
   long j; // loop counter
   // Memory access controler (command 0x36)
   //PCF8833_write_command(MADCTL);
   //PCF8833_write_data(0x48); // no mirror Y (temporary to satisfy Olimex bmptoarray utility)
   // Display OFF
   PCF8833_write_command(P_DISPOFF);
   // Column address set (command 0x2A)
   PCF8833_write_command(P_CASET);
   PCF8833_write_data(0);
   PCF8833_write_data(131);
   // Page address set (command 0x2B)
   PCF8833_write_command(P_PASET);
   PCF8833_write_data(0);
   PCF8833_write_data(131);

   // WRITE MEMORY
   PCF8833_write_command(P_RAMWR);
   for(j = 0; j < 25740; j++)
   {
      switch (bmp)
      {
         case 0:
            PCF8833_write_data(bmp0[j]);
         break;
         
         case 1:
            PCF8833_write_data(bmp1[j]);
         break;
         
         case 2:
            PCF8833_write_data(bmp2[j]);
         break;
         
         case 3:
            //PCF8833_write_data(bmp3[j]);
         break;
      }
   }
   
   // Memory access controler (command 0x36)
   //PCF8833_write_command(MADCTL);
   //PCF8833_write_data(0xC8); // restore to (mirror x and y, reverse rgb)
   // Display On
   PCF8833_write_command(P_DISPON);
}
///////////////////////////////////////////////////////////////////////////////
void PCF8833_LCDWriteIcon(int8 icon, int16 color)
{
   int16 i;
   
   switch (icon)
   {
      case 0:
         for (i=0; i<548; i++)
            PCF8833_LCDSetPixel(PixelSet0[i][0], PixelSet0[i][1], color);
      break;
     
      case 1:
         for (i=0; i<688; i++)
            PCF8833_LCDSetPixel(PixelSet1[i][0], PixelSet1[i][1], color);
      break;
     
      case 2:
         for (i=0; i<303; i++)
            PCF8833_LCDSetPixel(PixelSet2[i][0], PixelSet2[i][1], color);
      break;
     
      case 3:
         for (i=0; i<630; i++)
            PCF8833_LCDSetPixel(PixelSet3[i][0], PixelSet3[i][1], color);
      break;
   }
}
///////////////////////////////////////////////////////////////////////////////
#endif


NOK6100.h
Code:

#ifndef  NOK6100_H
#define  NOK6100_H
///////////////////////////////////////////////////////////////////////////////
//Select one (comment one):
//#define  EPSON_DRV
#define  PHILIPS_DRV
///////////////////////////////////////////////////////////////////////////////
#bit  NLCD_CS     =  PORTB.1
#bit  NLCD_RESET  =  PORTB.0
#bit  NLCD_SCLK   =  PORTD.6
#bit  NLCD_SDO    =  PORTD.4
///////////////////////////////////////////////////////////////////////////////
const unsigned char FONT6x8[97][8] = {
0x06,0x08,0x08,0x00,0x00,0x00,0x00,0x00, // columns, rows, num_bytes_per_char
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // space 0x20
0x20,0x20,0x20,0x20,0x20,0x00,0x20,0x00, // !
0x50,0x50,0x50,0x00,0x00,0x00,0x00,0x00, // "
0x50,0x50,0xF8,0x50,0xF8,0x50,0x50,0x00, // #
0x20,0x78,0xA0,0x70,0x28,0xF0,0x20,0x00, // $
0xC0,0xC8,0x10,0x20,0x40,0x98,0x18,0x00, // %
0x40,0xA0,0xA0,0x40,0xA8,0x90,0x68,0x00, // &
0x30,0x30,0x20,0x40,0x00,0x00,0x00,0x00, // '
0x10,0x20,0x40,0x40,0x40,0x20,0x10,0x00, // (
0x40,0x20,0x10,0x10,0x10,0x20,0x40,0x00, // )
0x00,0x20,0xA8,0x70,0x70,0xA8,0x20,0x00, // *
0x00,0x20,0x20,0xF8,0x20,0x20,0x00,0x00, // +
0x00,0x00,0x00,0x00,0x30,0x30,0x20,0x40, // ,
0x00,0x00,0x00,0xF8,0x00,0x00,0x00,0x00, // -
0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x00, // .
0x00,0x08,0x10,0x20,0x40,0x80,0x00,0x00, // / (forward slash)
0x70,0x88,0x88,0xA8,0x88,0x88,0x70,0x00, // 0 0x30
0x20,0x60,0x20,0x20,0x20,0x20,0x70,0x00, // 1
0x70,0x88,0x08,0x70,0x80,0x80,0xF8,0x00, // 2
0xF8,0x08,0x10,0x30,0x08,0x88,0x70,0x00, // 3
0x10,0x30,0x50,0x90,0xF8,0x10,0x10,0x00, // 4
0xF8,0x80,0xF0,0x08,0x08,0x88,0x70,0x00, // 5
0x38,0x40,0x80,0xF0,0x88,0x88,0x70,0x00, // 6
0xF8,0x08,0x08,0x10,0x20,0x40,0x80,0x00, // 7
0x70,0x88,0x88,0x70,0x88,0x88,0x70,0x00, // 8
0x70,0x88,0x88,0x78,0x08,0x10,0xE0,0x00, // 9
0x00,0x00,0x20,0x00,0x20,0x00,0x00,0x00, // :
0x00,0x00,0x20,0x00,0x20,0x20,0x40,0x00, // ;
0x08,0x10,0x20,0x40,0x20,0x10,0x08,0x00, // <
0x00,0x00,0xF8,0x00,0xF8,0x00,0x00,0x00, // =
0x40,0x20,0x10,0x08,0x10,0x20,0x40,0x00, // >
0x70,0x88,0x08,0x30,0x20,0x00,0x20,0x00, // ?
0x70,0x88,0xA8,0xB8,0xB0,0x80,0x78,0x00, // @ 0x40
0x20,0x50,0x88,0x88,0xF8,0x88,0x88,0x00, // A
0xF0,0x88,0x88,0xF0,0x88,0x88,0xF0,0x00, // B
0x70,0x88,0x80,0x80,0x80,0x88,0x70,0x00, // C
0xF0,0x88,0x88,0x88,0x88,0x88,0xF0,0x00, // D
0xF8,0x80,0x80,0xF0,0x80,0x80,0xF8,0x00, // E
0xF8,0x80,0x80,0xF0,0x80,0x80,0x80,0x00, // F
0x78,0x88,0x80,0x80,0x98,0x88,0x78,0x00, // G
0x88,0x88,0x88,0xF8,0x88,0x88,0x88,0x00, // H
0x70,0x20,0x20,0x20,0x20,0x20,0x70,0x00, // I
0x38,0x10,0x10,0x10,0x10,0x90,0x60,0x00, // J
0x88,0x90,0xA0,0xC0,0xA0,0x90,0x88,0x00, // K
0x80,0x80,0x80,0x80,0x80,0x80,0xF8,0x00, // L
0x88,0xD8,0xA8,0xA8,0xA8,0x88,0x88,0x00, // M
0x88,0x88,0xC8,0xA8,0x98,0x88,0x88,0x00, // N
0x70,0x88,0x88,0x88,0x88,0x88,0x70,0x00, // O
0xF0,0x88,0x88,0xF0,0x80,0x80,0x80,0x00, // P 0x50
0x70,0x88,0x88,0x88,0xA8,0x90,0x68,0x00, // Q
0xF0,0x88,0x88,0xF0,0xA0,0x90,0x88,0x00, // R
0x70,0x88,0x80,0x70,0x08,0x88,0x70,0x00, // S
0xF8,0xA8,0x20,0x20,0x20,0x20,0x20,0x00, // T
0x88,0x88,0x88,0x88,0x88,0x88,0x70,0x00, // U
0x88,0x88,0x88,0x88,0x88,0x50,0x20,0x00, // V
0x88,0x88,0x88,0xA8,0xA8,0xA8,0x50,0x00, // W
0x88,0x88,0x50,0x20,0x50,0x88,0x88,0x00, // X
0x88,0x88,0x50,0x20,0x20,0x20,0x20,0x00, // Y
0xF8,0x08,0x10,0x70,0x40,0x80,0xF8,0x00, // Z
0x78,0x40,0x40,0x40,0x40,0x40,0x78,0x00, // [
0x00,0x80,0x40,0x20,0x10,0x08,0x00,0x00, // \ (back slash)
0x78,0x08,0x08,0x08,0x08,0x08,0x78,0x00, // ]
0x20,0x50,0x88,0x00,0x00,0x00,0x00,0x00, // ^
0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x00, // _
0x60,0x60,0x20,0x10,0x00,0x00,0x00,0x00, // ` 0x60
0x00,0x00,0x60,0x10,0x70,0x90,0x78,0x00, // a
0x80,0x80,0xB0,0xC8,0x88,0xC8,0xB0,0x00, // b
0x00,0x00,0x70,0x88,0x80,0x88,0x70,0x00, // c
0x08,0x08,0x68,0x98,0x88,0x98,0x68,0x00, // d
0x00,0x00,0x70,0x88,0xF8,0x80,0x70,0x00, // e
0x10,0x28,0x20,0x70,0x20,0x20,0x20,0x00, // f
0x00,0x00,0x70,0x98,0x98,0x68,0x08,0x70, // g
0x80,0x80,0xB0,0xC8,0x88,0x88,0x88,0x00, // h
0x20,0x00,0x60,0x20,0x20,0x20,0x70,0x00, // i
0x10,0x00,0x10,0x10,0x10,0x90,0x60,0x00, // j
0x80,0x80,0x90,0xA0,0xC0,0xA0,0x90,0x00, // k
0x60,0x20,0x20,0x20,0x20,0x20,0x70,0x00, // l
0x00,0x00,0xD0,0xA8,0xA8,0xA8,0xA8,0x00, // m
0x00,0x00,0xB0,0xC8,0x88,0x88,0x88,0x00, // n
0x00,0x00,0x70,0x88,0x88,0x88,0x70,0x00, // o
0x00,0x00,0xB0,0xC8,0xC8,0xB0,0x80,0x80, // p 0x70
0x00,0x00,0x68,0x98,0x98,0x68,0x08,0x08, // q
0x00,0x00,0xB0,0xC8,0x80,0x80,0x80,0x00, // r
0x00,0x00,0x78,0x80,0x70,0x08,0xF0,0x00, // s
0x20,0x20,0xF8,0x20,0x20,0x28,0x10,0x00, // t
0x00,0x00,0x88,0x88,0x88,0x98,0x68,0x00, // u
0x00,0x00,0x88,0x88,0x88,0x50,0x20,0x00, // v
0x00,0x00,0x88,0x88,0xA8,0xA8,0x50,0x00, // w
0x00,0x00,0x88,0x50,0x20,0x50,0x88,0x00, // x
0x00,0x00,0x88,0x88,0x78,0x08,0x88,0x70, // y
0x00,0x00,0xF8,0x10,0x20,0x40,0xF8,0x00, // z
0x10,0x20,0x20,0x40,0x20,0x20,0x10,0x00, // {
0x20,0x20,0x20,0x00,0x20,0x20,0x20,0x00, // |
0x40,0x20,0x20,0x10,0x20,0x20,0x40,0x00, // }
0x40,0xA8,0x10,0x00,0x00,0x00,0x00,0x00, // ~
0x70,0xD8,0xD8,0x70,0x00,0x00,0x00,0x00}; // DEL
const unsigned char FONT8x8[97][8] = {
0x08,0x08,0x08,0x00,0x00,0x00,0x00,0x00, // columns, rows, num_bytes_per_char
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // space 0x20
0x30,0x78,0x78,0x30,0x30,0x00,0x30,0x00, // !
0x6C,0x6C,0x6C,0x00,0x00,0x00,0x00,0x00, // "
0x6C,0x6C,0xFE,0x6C,0xFE,0x6C,0x6C,0x00, // #
0x18,0x3E,0x60,0x3C,0x06,0x7C,0x18,0x00, // $
0x00,0x63,0x66,0x0C,0x18,0x33,0x63,0x00, // %
0x1C,0x36,0x1C,0x3B,0x6E,0x66,0x3B,0x00, // &
0x30,0x30,0x60,0x00,0x00,0x00,0x00,0x00, // '
0x0C,0x18,0x30,0x30,0x30,0x18,0x0C,0x00, // (
0x30,0x18,0x0C,0x0C,0x0C,0x18,0x30,0x00, // )
0x00,0x66,0x3C,0xFF,0x3C,0x66,0x00,0x00, // *
0x00,0x30,0x30,0xFC,0x30,0x30,0x00,0x00, // +
0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x30, // ,
0x00,0x00,0x00,0x7E,0x00,0x00,0x00,0x00, // -
0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x00, // .
0x03,0x06,0x0C,0x18,0x30,0x60,0x40,0x00, // / (forward slash)
0x3E,0x63,0x63,0x6B,0x63,0x63,0x3E,0x00, // 0 0x30
0x18,0x38,0x58,0x18,0x18,0x18,0x7E,0x00, // 1
0x3C,0x66,0x06,0x1C,0x30,0x66,0x7E,0x00, // 2
0x3C,0x66,0x06,0x1C,0x06,0x66,0x3C,0x00, // 3
0x0E,0x1E,0x36,0x66,0x7F,0x06,0x0F,0x00, // 4
0x7E,0x60,0x7C,0x06,0x06,0x66,0x3C,0x00, // 5
0x1C,0x30,0x60,0x7C,0x66,0x66,0x3C,0x00, // 6
0x7E,0x66,0x06,0x0C,0x18,0x18,0x18,0x00, // 7
0x3C,0x66,0x66,0x3C,0x66,0x66,0x3C,0x00, // 8
0x3C,0x66,0x66,0x3E,0x06,0x0C,0x38,0x00, // 9
0x00,0x18,0x18,0x00,0x00,0x18,0x18,0x00, // :
0x00,0x18,0x18,0x00,0x00,0x18,0x18,0x30, // ;
0x0C,0x18,0x30,0x60,0x30,0x18,0x0C,0x00, // <
0x00,0x00,0x7E,0x00,0x00,0x7E,0x00,0x00, // =
0x30,0x18,0x0C,0x06,0x0C,0x18,0x30,0x00, // >
0x3C,0x66,0x06,0x0C,0x18,0x00,0x18,0x00, // ?
0x3E,0x63,0x6F,0x69,0x6F,0x60,0x3E,0x00, // @ 0x40
0x18,0x3C,0x66,0x66,0x7E,0x66,0x66,0x00, // A
0x7E,0x33,0x33,0x3E,0x33,0x33,0x7E,0x00, // B
0x1E,0x33,0x60,0x60,0x60,0x33,0x1E,0x00, // C
0x7C,0x36,0x33,0x33,0x33,0x36,0x7C,0x00, // D
0x7F,0x31,0x34,0x3C,0x34,0x31,0x7F,0x00, // E
0x7F,0x31,0x34,0x3C,0x34,0x30,0x78,0x00, // F
0x1E,0x33,0x60,0x60,0x67,0x33,0x1F,0x00, // G
0x66,0x66,0x66,0x7E,0x66,0x66,0x66,0x00, // H
0x3C,0x18,0x18,0x18,0x18,0x18,0x3C,0x00, // I
0x0F,0x06,0x06,0x06,0x66,0x66,0x3C,0x00, // J
0x73,0x33,0x36,0x3C,0x36,0x33,0x73,0x00, // K
0x78,0x30,0x30,0x30,0x31,0x33,0x7F,0x00, // L
0x63,0x77,0x7F,0x7F,0x6B,0x63,0x63,0x00, // M
0x63,0x73,0x7B,0x6F,0x67,0x63,0x63,0x00, // N
0x3E,0x63,0x63,0x63,0x63,0x63,0x3E,0x00, // O
0x7E,0x33,0x33,0x3E,0x30,0x30,0x78,0x00, // P 0x50
0x3C,0x66,0x66,0x66,0x6E,0x3C,0x0E,0x00, // Q
0x7E,0x33,0x33,0x3E,0x36,0x33,0x73,0x00, // R
0x3C,0x66,0x30,0x18,0x0C,0x66,0x3C,0x00, // S
0x7E,0x5A,0x18,0x18,0x18,0x18,0x3C,0x00, // T
0x66,0x66,0x66,0x66,0x66,0x66,0x7E,0x00, // U
0x66,0x66,0x66,0x66,0x66,0x3C,0x18,0x00, // V
0x63,0x63,0x63,0x6B,0x7F,0x77,0x63,0x00, // W
0x63,0x63,0x36,0x1C,0x1C,0x36,0x63,0x00, // X
0x66,0x66,0x66,0x3C,0x18,0x18,0x3C,0x00, // Y
0x7F,0x63,0x46,0x0C,0x19,0x33,0x7F,0x00, // Z
0x3C,0x30,0x30,0x30,0x30,0x30,0x3C,0x00, // [
0x60,0x30,0x18,0x0C,0x06,0x03,0x01,0x00, // \ (back slash)
0x3C,0x0C,0x0C,0x0C,0x0C,0x0C,0x3C,0x00, // ]
0x08,0x1C,0x36,0x63,0x00,0x00,0x00,0x00, // ^
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF, // _
0x18,0x18,0x0C,0x00,0x00,0x00,0x00,0x00, // ` 0x60
0x00,0x00,0x3C,0x06,0x3E,0x66,0x3B,0x00, // a
0x70,0x30,0x3E,0x33,0x33,0x33,0x6E,0x00, // b
0x00,0x00,0x3C,0x66,0x60,0x66,0x3C,0x00, // c
0x0E,0x06,0x3E,0x66,0x66,0x66,0x3B,0x00, // d
0x00,0x00,0x3C,0x66,0x7E,0x60,0x3C,0x00, // e
0x1C,0x36,0x30,0x78,0x30,0x30,0x78,0x00, // f
0x00,0x00,0x3B,0x66,0x66,0x3E,0x06,0x7C, // g
0x70,0x30,0x36,0x3B,0x33,0x33,0x73,0x00, // h
0x18,0x00,0x38,0x18,0x18,0x18,0x3C,0x00, // i
0x06,0x00,0x06,0x06,0x06,0x66,0x66,0x3C, // j
0x70,0x30,0x33,0x36,0x3C,0x36,0x73,0x00, // k
0x38,0x18,0x18,0x18,0x18,0x18,0x3C,0x00, // l
0x00,0x00,0x66,0x7F,0x7F,0x6B,0x63,0x00, // m
0x00,0x00,0x7C,0x66,0x66,0x66,0x66,0x00, // n
0x00,0x00,0x3C,0x66,0x66,0x66,0x3C,0x00, // o
0x00,0x00,0x6E,0x33,0x33,0x3E,0x30,0x78, // p 0x70
0x00,0x00,0x3B,0x66,0x66,0x3E,0x06,0x0F, // q
0x00,0x00,0x6E,0x3B,0x33,0x30,0x78,0x00, // r
0x00,0x00,0x3E,0x60,0x3C,0x06,0x7C,0x00, // s
0x08,0x18,0x3E,0x18,0x18,0x1A,0x0C,0x00, // t
0x00,0x00,0x66,0x66,0x66,0x66,0x3B,0x00, // u
0x00,0x00,0x66,0x66,0x66,0x3C,0x18,0x00, // v
0x00,0x00,0x63,0x6B,0x7F,0x7F,0x36,0x00, // w
0x00,0x00,0x63,0x36,0x1C,0x36,0x63,0x00, // x
0x00,0x00,0x66,0x66,0x66,0x3E,0x06,0x7C, // y
0x00,0x00,0x7E,0x4C,0x18,0x32,0x7E,0x00, // z
0x0E,0x18,0x18,0x70,0x18,0x18,0x0E,0x00, // {
0x0C,0x0C,0x0C,0x00,0x0C,0x0C,0x0C,0x00, // |
0x70,0x18,0x18,0x0E,0x18,0x18,0x70,0x00, // }
0x3B,0x6E,0x00,0x00,0x00,0x00,0x00,0x00, // ~
0x1C,0x36,0x36,0x1C,0x00,0x00,0x00,0x00}; // DEL
const unsigned char FONT8x16[97][16] = {
0x08,0x10,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // columns, rows, num_bytes_per_char
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // space 0x20
0x00,0x00,0x18,0x3C,0x3C,0x3C,0x18,0x18,0x18,0x00,0x18,0x18,0x00,0x00,0x00,0x00, // !
0x00,0x63,0x63,0x63,0x22,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // "
0x00,0x00,0x00,0x36,0x36,0x7F,0x36,0x36,0x36,0x7F,0x36,0x36,0x00,0x00,0x00,0x00, // #
0x0C,0x0C,0x3E,0x63,0x61,0x60,0x3E,0x03,0x03,0x43,0x63,0x3E,0x0C,0x0C,0x00,0x00, // $
0x00,0x00,0x00,0x00,0x00,0x61,0x63,0x06,0x0C,0x18,0x33,0x63,0x00,0x00,0x00,0x00, // %
0x00,0x00,0x00,0x1C,0x36,0x36,0x1C,0x3B,0x6E,0x66,0x66,0x3B,0x00,0x00,0x00,0x00, // &
0x00,0x30,0x30,0x30,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // '
0x00,0x00,0x0C,0x18,0x18,0x30,0x30,0x30,0x30,0x18,0x18,0x0C,0x00,0x00,0x00,0x00, // (
0x00,0x00,0x18,0x0C,0x0C,0x06,0x06,0x06,0x06,0x0C,0x0C,0x18,0x00,0x00,0x00,0x00, // )
0x00,0x00,0x00,0x00,0x42,0x66,0x3C,0xFF,0x3C,0x66,0x42,0x00,0x00,0x00,0x00,0x00, // *
0x00,0x00,0x00,0x00,0x18,0x18,0x18,0xFF,0x18,0x18,0x18,0x00,0x00,0x00,0x00,0x00, // +
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x18,0x30,0x00,0x00, // ,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // -
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x00, // .
0x00,0x00,0x01,0x03,0x07,0x0E,0x1C,0x38,0x70,0xE0,0xC0,0x80,0x00,0x00,0x00,0x00, // / (forward slash)
0x00,0x00,0x3E,0x63,0x63,0x63,0x6B,0x6B,0x63,0x63,0x63,0x3E,0x00,0x00,0x00,0x00, // 0 0x30
0x00,0x00,0x0C,0x1C,0x3C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x3F,0x00,0x00,0x00,0x00, // 1
0x00,0x00,0x3E,0x63,0x03,0x06,0x0C,0x18,0x30,0x61,0x63,0x7F,0x00,0x00,0x00,0x00, // 2
0x00,0x00,0x3E,0x63,0x03,0x03,0x1E,0x03,0x03,0x03,0x63,0x3E,0x00,0x00,0x00,0x00, // 3
0x00,0x00,0x06,0x0E,0x1E,0x36,0x66,0x66,0x7F,0x06,0x06,0x0F,0x00,0x00,0x00,0x00, // 4
0x00,0x00,0x7F,0x60,0x60,0x60,0x7E,0x03,0x03,0x63,0x73,0x3E,0x00,0x00,0x00,0x00, // 5
0x00,0x00,0x1C,0x30,0x60,0x60,0x7E,0x63,0x63,0x63,0x63,0x3E,0x00,0x00,0x00,0x00, // 6
0x00,0x00,0x7F,0x63,0x03,0x06,0x06,0x0C,0x0C,0x18,0x18,0x18,0x00,0x00,0x00,0x00, // 7
0x00,0x00,0x3E,0x63,0x63,0x63,0x3E,0x63,0x63,0x63,0x63,0x3E,0x00,0x00,0x00,0x00, // 8
0x00,0x00,0x3E,0x63,0x63,0x63,0x63,0x3F,0x03,0x03,0x06,0x3C,0x00,0x00,0x00,0x00, // 9
0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x00, // :
0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x18,0x18,0x18,0x30,0x00,0x00, // ;
0x00,0x00,0x00,0x06,0x0C,0x18,0x30,0x60,0x30,0x18,0x0C,0x06,0x00,0x00,0x00,0x00, // <
0x00,0x00,0x00,0x00,0x00,0x00,0x7E,0x00,0x00,0x7E,0x00,0x00,0x00,0x00,0x00,0x00, // =
0x00,0x00,0x00,0x60,0x30,0x18,0x0C,0x06,0x0C,0x18,0x30,0x60,0x00,0x00,0x00,0x00, // >
0x00,0x00,0x3E,0x63,0x63,0x06,0x0C,0x0C,0x0C,0x00,0x0C,0x0C,0x00,0x00,0x00,0x00, // ?
0x00,0x00,0x3E,0x63,0x63,0x6F,0x6B,0x6B,0x6E,0x60,0x60,0x3E,0x00,0x00,0x00,0x00, // @ 0x40
0x00,0x00,0x08,0x1C,0x36,0x63,0x63,0x63,0x7F,0x63,0x63,0x63,0x00,0x00,0x00,0x00, // A
0x00,0x00,0x7E,0x33,0x33,0x33,0x3E,0x33,0x33,0x33,0x33,0x7E,0x00,0x00,0x00,0x00, // B
0x00,0x00,0x1E,0x33,0x61,0x60,0x60,0x60,0x60,0x61,0x33,0x1E,0x00,0x00,0x00,0x00, // C
0x00,0x00,0x7C,0x36,0x33,0x33,0x33,0x33,0x33,0x33,0x36,0x7C,0x00,0x00,0x00,0x00, // D
0x00,0x00,0x7F,0x33,0x31,0x34,0x3C,0x34,0x30,0x31,0x33,0x7F,0x00,0x00,0x00,0x00, // E
0x00,0x00,0x7F,0x33,0x31,0x34,0x3C,0x34,0x30,0x30,0x30,0x78,0x00,0x00,0x00,0x00, // F
0x00,0x00,0x1E,0x33,0x61,0x60,0x60,0x6F,0x63,0x63,0x37,0x1D,0x00,0x00,0x00,0x00, // G
0x00,0x00,0x63,0x63,0x63,0x63,0x7F,0x63,0x63,0x63,0x63,0x63,0x00,0x00,0x00,0x00, // H
0x00,0x00,0x3C,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x3C,0x00,0x00,0x00,0x00, // I
0x00,0x00,0x0F,0x06,0x06,0x06,0x06,0x06,0x06,0x66,0x66,0x3C,0x00,0x00,0x00,0x00, // J
0x00,0x00,0x73,0x33,0x36,0x36,0x3C,0x36,0x36,0x33,0x33,0x73,0x00,0x00,0x00,0x00, // K
0x00,0x00,0x78,0x30,0x30,0x30,0x30,0x30,0x30,0x31,0x33,0x7F,0x00,0x00,0x00,0x00, // L
0x00,0x00,0x63,0x77,0x7F,0x6B,0x63,0x63,0x63,0x63,0x63,0x63,0x00,0x00,0x00,0x00, // M
0x00,0x00,0x63,0x63,0x73,0x7B,0x7F,0x6F,0x67,0x63,0x63,0x63,0x00,0x00,0x00,0x00, // N
0x00,0x00,0x1C,0x36,0x63,0x63,0x63,0x63,0x63,0x63,0x36,0x1C,0x00,0x00,0x00,0x00, // O
0x00,0x00,0x7E,0x33,0x33,0x33,0x3E,0x30,0x30,0x30,0x30,0x78,0x00,0x00,0x00,0x00, // P 0x50
0x00,0x00,0x3E,0x63,0x63,0x63,0x63,0x63,0x63,0x6B,0x6F,0x3E,0x06,0x07,0x00,0x00, // Q
0x00,0x00,0x7E,0x33,0x33,0x33,0x3E,0x36,0x36,0x33,0x33,0x73,0x00,0x00,0x00,0x00, // R
0x00,0x00,0x3E,0x63,0x63,0x30,0x1C,0x06,0x03,0x63,0x63,0x3E,0x00,0x00,0x00,0x00, // S
0x00,0x00,0xFF,0xDB,0x99,0x18,0x18,0x18,0x18,0x18,0x18,0x3C,0x00,0x00,0x00,0x00, // T
0x00,0x00,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x3E,0x00,0x00,0x00,0x00, // U
0x00,0x00,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x36,0x1C,0x08,0x00,0x00,0x00,0x00, // V
0x00,0x00,0x63,0x63,0x63,0x63,0x63,0x6B,0x6B,0x7F,0x36,0x36,0x00,0x00,0x00,0x00, // W
0x00,0x00,0xC3,0xC3,0x66,0x3C,0x18,0x18,0x3C,0x66,0xC3,0xC3,0x00,0x00,0x00,0x00, // X
0x00,0x00,0xC3,0xC3,0xC3,0x66,0x3C,0x18,0x18,0x18,0x18,0x3C,0x00,0x00,0x00,0x00, // Y
0x00,0x00,0x7F,0x63,0x43,0x06,0x0C,0x18,0x30,0x61,0x63,0x7F,0x00,0x00,0x00,0x00, // Z
0x00,0x00,0x3C,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x3C,0x00,0x00,0x00,0x00, // [
0x00,0x00,0x80,0xC0,0xE0,0x70,0x38,0x1C,0x0E,0x07,0x03,0x01,0x00,0x00,0x00,0x00, // \ (back slash)
0x00,0x00,0x3C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x3C,0x00,0x00,0x00,0x00, // ]
0x08,0x1C,0x36,0x63,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // ^
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x00, // _
0x18,0x18,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // ` 0x60
0x00,0x00,0x00,0x00,0x00,0x3C,0x46,0x06,0x3E,0x66,0x66,0x3B,0x00,0x00,0x00,0x00, // a
0x00,0x00,0x70,0x30,0x30,0x3C,0x36,0x33,0x33,0x33,0x33,0x6E,0x00,0x00,0x00,0x00, // b
0x00,0x00,0x00,0x00,0x00,0x3E,0x63,0x60,0x60,0x60,0x63,0x3E,0x00,0x00,0x00,0x00, // c
0x00,0x00,0x0E,0x06,0x06,0x1E,0x36,0x66,0x66,0x66,0x66,0x3B,0x00,0x00,0x00,0x00, // d
0x00,0x00,0x00,0x00,0x00,0x3E,0x63,0x63,0x7E,0x60,0x63,0x3E,0x00,0x00,0x00,0x00, // e
0x00,0x00,0x1C,0x36,0x32,0x30,0x7C,0x30,0x30,0x30,0x30,0x78,0x00,0x00,0x00,0x00, // f
0x00,0x00,0x00,0x00,0x00,0x3B,0x66,0x66,0x66,0x66,0x3E,0x06,0x66,0x3C,0x00,0x00, // g
0x00,0x00,0x70,0x30,0x30,0x36,0x3B,0x33,0x33,0x33,0x33,0x73,0x00,0x00,0x00,0x00, // h
0x00,0x00,0x0C,0x0C,0x00,0x1C,0x0C,0x0C,0x0C,0x0C,0x0C,0x1E,0x00,0x00,0x00,0x00, // i
0x00,0x00,0x06,0x06,0x00,0x0E,0x06,0x06,0x06,0x06,0x06,0x66,0x66,0x3C,0x00,0x00, // j
0x00,0x00,0x70,0x30,0x30,0x33,0x33,0x36,0x3C,0x36,0x33,0x73,0x00,0x00,0x00,0x00, // k
0x00,0x00,0x1C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x1E,0x00,0x00,0x00,0x00, // l
0x00,0x00,0x00,0x00,0x00,0x6E,0x7F,0x6B,0x6B,0x6B,0x6B,0x6B,0x00,0x00,0x00,0x00, // m
0x00,0x00,0x00,0x00,0x00,0x6E,0x33,0x33,0x33,0x33,0x33,0x33,0x00,0x00,0x00,0x00, // n
0x00,0x00,0x00,0x00,0x00,0x3E,0x63,0x63,0x63,0x63,0x63,0x3E,0x00,0x00,0x00,0x00, // o
0x00,0x00,0x00,0x00,0x00,0x6E,0x33,0x33,0x33,0x33,0x3E,0x30,0x30,0x78,0x00,0x00, // p 0x70
0x00,0x00,0x00,0x00,0x00,0x3B,0x66,0x66,0x66,0x66,0x3E,0x06,0x06,0x0F,0x00,0x00, // q
0x00,0x00,0x00,0x00,0x00,0x6E,0x3B,0x33,0x30,0x30,0x30,0x78,0x00,0x00,0x00,0x00, // r
0x00,0x00,0x00,0x00,0x00,0x3E,0x63,0x38,0x0E,0x03,0x63,0x3E,0x00,0x00,0x00,0x00, // s
0x00,0x00,0x08,0x18,0x18,0x7E,0x18,0x18,0x18,0x18,0x1B,0x0E,0x00,0x00,0x00,0x00, // t
0x00,0x00,0x00,0x00,0x00,0x66,0x66,0x66,0x66,0x66,0x66,0x3B,0x00,0x00,0x00,0x00, // u
0x00,0x00,0x00,0x00,0x00,0x63,0x63,0x36,0x36,0x1C,0x1C,0x08,0x00,0x00,0x00,0x00, // v
0x00,0x00,0x00,0x00,0x00,0x63,0x63,0x63,0x6B,0x6B,0x7F,0x36,0x00,0x00,0x00,0x00, // w
0x00,0x00,0x00,0x00,0x00,0x63,0x36,0x1C,0x1C,0x1C,0x36,0x63,0x00,0x00,0x00,0x00, // x
0x00,0x00,0x00,0x00,0x00,0x63,0x63,0x63,0x63,0x63,0x3F,0x03,0x06,0x3C,0x00,0x00, // y
0x00,0x00,0x00,0x00,0x00,0x7F,0x66,0x0C,0x18,0x30,0x63,0x7F,0x00,0x00,0x00,0x00, // z
0x00,0x00,0x0E,0x18,0x18,0x18,0x70,0x18,0x18,0x18,0x18,0x0E,0x00,0x00,0x00,0x00, // {
0x00,0x00,0x18,0x18,0x18,0x18,0x18,0x00,0x18,0x18,0x18,0x18,0x18,0x00,0x00,0x00, // |
0x00,0x00,0x70,0x18,0x18,0x18,0x0E,0x18,0x18,0x18,0x18,0x70,0x00,0x00,0x00,0x00, // }
0x00,0x00,0x3B,0x6E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // ~
0x00,0x70,0xD8,0xD8,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; // DEL
///////////////////////////////////////////////////////////////////////////////
// 12-bit color definitions
#define WHITE 0xFFF
#define BLACK 0x000
#define RED 0xF00
#define GREEN 0x0F0
#define BLUE 0x00F
#define CYAN 0x0FF
#define MAGENTA 0xF0F
#define YELLOW 0xFF0
#define BROWN 0xB22
#define ORANGE 0xFA0
#define PINK 0xF6A
// Font size
#define SMALL  0
#define MEDIUM 1
#define LARGE  2
///////////////////////////////////////////////////////////////////////////////
#include "bitmaps.h"
#include "icons.h"
///////////////////////////////////////////////////////////////////////////////
#define  GLCD_WIDTH  132
///////////////////////////////////////////////////////////////////////////////
const int16 GreyColors[32]=
{0x000, 0x111, 0x222, 0x333, 0x444, 0x555, 0x666, 0x777, 0x888, 0x999, 0xaaa,
0xbbb, 0xccc, 0xddd, 0xeee, 0xfff, 0xfff, 0xfff, 0xeee, 0xddd, 0xccc, 0xbbb, 0xaaa, 0x999,
0x888, 0x777, 0x666, 0x555, 0x444, 0x333, 0x222, 0x111};
///////////////////////////////////////////////////////////////////////////////
#ifdef   EPSON_DRV   // S1D15G00 chip?
   #include "S1D15G00.h"
   #define  Nokia6100Init()   S1D15G00_init()
   #define  Nokia6100DisplayOn() S1D15G00_write_command(S_DISON)
   #define  Nokia6100DisplayOff() S1D15G00_write_command(S_DISOFF)
   #define  glcd_pixel(x, y, color)  S1D15G00_LCDSetPixel(x, y, color)
   #define  Nokia6100ClearScreen()   S1D15G00_LCDClearScreen()
   #define  Nokia6100PutChar(c, x, y, size, fColor, bColor)   S1D15G00_LCDPutChar(c, x, y, size, fColor, bColor)
   #define  Nokia6100PutStr(pString, x, y, Size, fColor, bColor)   S1D15G00_LCDPutStr(pString, x, y, Size, fColor, bColor)
   #define  Nokia6100Write132x132bmp(bmp) S1D15G00_LCDWrite132x132bmp(bmp)
   #define  Nokia6100WriteIcon(icon, color)  S1D15G00_LCDWriteIcon(icon, color)
#else                // PCF8833 chip?
   #include "PCF8833.h"
   #define  Nokia6100Init()   PCF8833_init()
   #define  Nokia6100DisplayOn() PCF8833_write_command(P_DISPON)
   #define  Nokia6100DisplayOff()   PCF8833_write_command(P_DISPOFF)
   #define  glcd_pixel(x, y, color)  PCF8833_LCDSetPixel(x, y, color)
   #define  Nokia6100ClearScreen()   PCF8833_LCDClearScreen()
   #define  Nokia6100PutChar(c, x, y, size, fColor, bColor)   PCF8833_LCDPutChar(c, x, y, size, fColor, bColor)
   #define  Nokia6100PutStr(pString, x, y, Size, fColor, bColor)   PCF8833_LCDPutStr(pString, x, y, Size, fColor, bColor)
   #define  Nokia6100Write132x132bmp(bmp) PCF8833_LCDWrite132x132bmp(bmp)
   #define  Nokia6100WriteIcon(icon, color)  PCF8833_LCDWriteIcon(icon, color)
#endif
///////////////////////////////////////////////////////////////////////////////
#endif


Enjoy Wink
future



Joined: 14 May 2004
Posts: 330

View user's profile Send private message

PostPosted: Wed Jan 06, 2010 5:00 pm     Reply with quote

Hi,

Are "bitmaps.h" and "icons.h" from your app or are they missing from the sample code?
PICoHolic



Joined: 04 Jan 2005
Posts: 224

View user's profile Send private message

PostPosted: Thu Jan 07, 2010 2:16 am     Reply with quote

Yes, they are specific to my application.
adalucio



Joined: 16 Mar 2009
Posts: 29

View user's profile Send private message

PostPosted: Sat Nov 27, 2010 9:08 am     Reply with quote

Is there any array of bigger fonts?
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> Code Library All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group