PSoCで外部EEPROMの内容をグラフィック液晶に表示する


psoc_eeprom_01.gif
前回の「PSoCとロータリーエンコーダーでグラフィック液晶の画像を上下左右に動かす」ではソースコード中に書き込んだ画像データをグラフィックLCDに表示した。

今回は不揮発メモリーのEEPROMから画像データを読みだしてグラフィック液晶モジュールに表示する。以下には前回から変更した部分のみを載せている。

psoc_eeprom_02.gif
EEPROMとはI2Cという2線式のインターフェースでデータをやりとりする。このI2Cをサポートするモジュールは「I2CHW」と「I2Cm」がある。以前にリアルタイムクロックを利用したとき(「PSoCとリアルタイムクロックで日時を表示する」)は「I2Cm」を利用したが、今回はより高機能な「I2CHW」を使うことにした。

「Device Editor」の「Selection」画面で「Digital Comm」にある「I2CHW」をダブルクリックしてプロジェクトに追加する。

psoc_eeprom_03.gif
するとモード選択画面が開く。ここで「Single Master Operation」を選択する。これはEEPROMやリアルタイムクロックなど外部のスレーブ機器を利用するためのものだ。

psoc_eeprom_04.gif
そして「Config」メニューの「Interconnect」を選択して画面を切り替え、モジュールの設定をする。

「I2CHW_1」を右クリックして現れたメニューから「Place」を選び配置したら、左側の設定画面の
「CPU_Clk_speed」を「NOT CY8C27xA」に、
「I2C Clock」を「100K Standard」に、
「I2C Pin」を「P[1]5-P[1]7」にする。

さらにポートの設定をする。
「Port_1_2」を「Strong」に、(LED用)
「Port_1_4」を「Pull Up」に、(ロータリーエンコーダー用:A端子)
「Port_1_6」を「Pull Up」に、(ロータリーエンコーダー用:B端子)変更する。

psoc_eeprom_05.gif
これでソースコードを以下のように変更した。

このソースコードではEEPROMに画像データを書き込む処理がコメントアウトされている。書き込みたい時はコメントアウトをはずして書き込む。


//----------------------------------------------------------------------------
// C main line
//----------------------------------------------------------------------------

#include <m8c.h> // part specific constants and macros
#include "PSoCAPI.h" // PSoC API definitions for all User Modules

#include "string.h" //for memcmp()

//PORT
#define GLCD_PORT_DB PRT0DR
#define GLCD_PORT_CTRL PRT2DR
#define GLCD_PORT_DB_DM0 PRT0DM0
#define GLCD_PORT_DB_DM1 PRT0DM1
#define GLCD_PORT_DB_DM2 PRT0DM2

//PORT Mask
#define GLCD_PORT_CTRL_A0 0x01
#define GLCD_PORT_CTRL_CS1 0x02
#define GLCD_PORT_CTRL_CS2 0x04
//#define GLCD_PORT_CTRL_CLK 0x08 //by Timer
#define GLCD_PORT_CTRL_E 0x10
#define GLCD_PORT_CTRL_RW 0x20
#define GLCD_PORT_CTRL_RES 0x40

//Command
#define GLCD_CMD_OFF 0xAE //1010 1110
#define GLCD_CMD_ON 0xAF //1010 1111
#define GLCD_CMD_START_LINE 0xC0 //110x xxxx (0 to 31)
#define GLCD_CMD_PAGE0 0xB8 //1011 1000
#define GLCD_CMD_PAGE1 0xB9 //1011 1001
#define GLCD_CMD_PAGE2 0xBA //1011 1010
#define GLCD_CMD_PAGE3 0xBB //1011 1011
#define GLCD_CMD_COL_ADDR 0x00 //0xxx xxxx (0 to 79)

#define GLCD_CMD_ADC_RIGHT 0xA0 //1010 0000
#define GLCD_CMD_ADC_LEFT 0xA1 //1010 0001
#define GLCD_CMD_STATIC_OFF 0xA4 //1010 0100
#define GLCD_CMD_STATIC_ON 0xA5 //1010 0101
#define GLCD_CMD_DUTY_16 0xA8 //1010 1000
#define GLCD_CMD_DUTY_32 0xA9 //1010 1001
#define GLCD_CMD_RW_MOD_ON 0xE0 //1110 0000
#define GLCD_CMD_RW_MOD_OFF 0xEE //1110 1110 ('END' Command)
#define GLCD_CMD_RESET 0xE2 //1110 0010

const BYTE pcbPage01[] = {0x27,0x9A,0x6B,0x1E,0x6F,0xFB,0xBD,0xEF,0xFF,0xFB,0xFF,0xBD,0xD7,0xFD,0x2E,0xD5,0x2D,0x96,0x01,0xE8,0x16,0x21,0x94,0x4A,0xA1,0x1C,0xC2,0x69,0x14,0x51,0x2C,0x82,0x70,0x10,0x08,0x55,0x11,0x42,0x10,0xC0,0x1C,0x11,0x84,0x52,0x00,0x25,0x00,0x02,0x29,0x04,0xAB,0x10,0x49,0x24,0x94,0x82,0xE8,0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xEB,0xBD,0xFF,0xDD,0xF7,0xFE,0xFF,0xAB,0xFD,0xFF,0x7E,0xB7,0xFF,0xDF,0xF7,0xFB,0xDF,0xFF,0xFF,0xF7,0xBE,0xFB,0xFD,0xFF,0x7F,0xBF,0xFF,0xF7,0xFF,0xFF,0x6F,0xFF,0xFF,0x7B,0xFF,0xDF,0xFD,0xFF};
const BYTE pcbPage02[] = {0x59,0xEE,0x79,0x95,0xD5,0x56,0xE9,0x6E,0x37,0xDE,0xB3,0xBE,0x4B,0x3D,0x87,0x50,0x25,0x04,0x02,0x80,0x4A,0x21,0x14,0x82,0x56,0x51,0x26,0x91,0xD2,0x09,0x55,0x84,0x52,0x09,0x28,0x10,0x24,0x00,0x80,0x00,0x04,0xC3,0x10,0x60,0x00,0x00,0x48,0x02,0x00,0x00,0x00,0x02,0x00,0x81,0x00,0x0C,0x02,0x08,0xD6,0x81,0x5A,0xE0,0x94,0x40,0x2E,0x8B,0xED,0x37,0xFF,0x1F,0xFF,0xF7,0xBF,0xFF,0xFB,0xFF,0x7F,0xFE,0xF7,0xFD,0x7F,0xAF,0xFE,0xAF,0xF5,0xBE,0xDF,0xF7,0x7A,0xBF,0xED,0xB7,0xFD,0xAF,0x75,0x1F,0x9F,0x67,0x2B,0x13,0x98,0x0F,0xD0,0x25,0x8A,0x55,0x02,0x11,0xC9,0x24,0x12,0x81,0x64,0xA1,0x14,0x52,0x08,0xA4,0x16,0x01,0xA5,0x12,0x80,0x0A,0xC1,0x28,0x80,0x74,0x00,0x1D,0x02,0x08,0x06,0x81,0x40,0x0A,0x00,0x80,0x20,0x00,0x00,0x08,0x00,0x00,0x90,0x04,0x00,0x20,0x00,0x04,0x00,0x01,0x40,0x00,0x10,0x00,0x00,0x08,0x84,0x00
,0x01,0x80,0x20,0x00,0x11,0x00,0x00,0x08,0x02,0x00,0x00,0x10,0x82,0x00,0x40,0x20,0x10,0x82,0x10,0x41,0x20,0x09,0x80,0xA9,0x00,0xC9,0x28,0xD4,0x62,0x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0xBB,0xFD,0xDF,0xFF,0x7F,0xDF,0xFF,0xF7,0x7B,0xBE,0xEF,0x7F,0xAB,0xFD,0xDF};
const BYTE pcbPage04[] = {0x09,0x27,0x31,0x4A,0x59,0x2E,0x91,0x6C,0x0A,0xD1,0x65,0x34,0x93,0x88,0x71,0x8C,0x51,0x24,0x92,0x40,0xBA,0x80,0x82,0xE0,0x1A,0x05,0x50,0x05,0x42,0x32,0x89,0x16,0x41,0x14,0xC1,0x54,0xF2,0xB1,0xE8,0xFC,0x6F,0xF6,0x7B,0xAE,0xDB,0x6D,0xB5,0xD4,0xEF,0x11,0xEC,0x12,0xCD,0x72,0x0E,0xE2,0x7F,0x11,0xED,0x5F,0xF6,0xBF,0xEF,0x37,0xFB,0xFF,0x7F,0xB6,0xFF,0xFB,0xFD,0xFE,0xEF,0x78,0xEE,0x34,0x92,0x61,0x1A,0x85,0x65,0x12,0xC9,0x15,0x41,0x4D,0x22,0x89,0x24,0x82,0x10,0xA1,0x08,0xC5,0x20,0x92,0x10,0x49,0x24,0xA6,0x92,0x91,0xC8,0x6C,0x26,0x31,0x0E,0x12,0x09,0x06,0x82,0x21,0x00,0x04,0x00,0x00,0x88,0x04,0xA0,0x04,0x10,0x02,0x08,0x02,0x00,0x42,0x00,0x00,0x10,0x00,0x00,0x00,0x40,0x00,0x10,0x00,0x08,0x00,0x04,0x00,0x01,0x80,0x00,0x80,0x40,0x00,0x08,0x01,0x00,0x00,0x10,0x00,0x04,0x40,0x00,0x00,0x50,0x02,0x20,0x04
,0x00,0x45,0x00,0x11,0x8A,0x80,0x49,0xE0,0x32,0x98,0xD4,0x74,0x8E,0xF6,0xAF,0xD2,0xBD,0xE7,0x3A,0xCB,0x7D,0x96,0xEB,0x35,0xDD,0x65,0xBE,0xD5,0xEF,0x71,0xBE,0xD5,0x6E,0x77,0x9A,0xED,0x57,0xFA,0x2D,0xF5,0x9F,0xEA,0x75,0x9E,0xEF,0xB2,0xEF,0xB9,0xEE,0x37,0xDA,0x6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,0x00,0x00,0x80,0x0C,0x02,0xA0,0x95,0x42,0x35,0x81,0x6E,0x12,0xA9,0x08,0xF7,0x10,0xCD,0x72,0x09,0x69,0x94,0x49,0x24,0x22,0x90,0x06,0x72,0x0A,0xEF,0x72,0x1D,0xF7,0xFB,0x6F,0xFD,0xEF,0x7D,0xFF,0xFF,0x6F,0xFF,0xDD,0xF6,0xFF,0xED,0xB6,0xFF,0xAE,0xD1,0x7E,0xAB,0x6D,0xB4,0x97,0x15,0xCA,0x15,0x42,0x29,0x14,0x02,0x48,0x0A,0x21,0x89,0x08,0xA6,0x00,0x52,0x01,0x88,0xE2,0x10,0x2A,0x00,0x95,0x42,0x10,0xD2,0x08,0x65,0x12,0x4A,0x11,0xC9,0x24,0x12,0xC8,0x26,0x80,0x40,0x24,0x01,0x00,0x02,0x20,0x02,0x01,0x00,0x12,0x00,0x01,0x00,0x10,0x00,0x00,0x48,0x00,0x01,0x10,0x02,0x00,0x00,0x20,0x02,0x00,0x00,0x00,0xA0,0x00,0x10,0x00,0x08,0x04,0x02,0x00,0x80,0x00,0x10,0x80,0x20,0x01,0x20,0x90,0x41,0x28,0x06,0x90,0x25,0x02,0x11,0xC0,0x0A,0xC0,0x72,0x90,0x68,0x9D,0xF0,0x0E,0xFB,0x4A,0x3A,0xCE
,0x73,0xA9,0x5E,0xA1,0xFF,0x08,0xEF,0xB5,0x54,0xB7,0xCA,0xBE,0xD1,0x6E,0xB5,0x8B,0xE9,0x7E,0xB7,0x8A,0xFB,0x55,0xED,0x75,0xAF,0x5D,0xA6,0xFF,0xA1,0xFF,0x14,0xEF,0xF6,0x1B,0xEB,0x9C,0x77,0xAE,0xD3,0x5A,0xED,0xBB,0xEC,0x9F,0xF6,0x2B,0xFD,0x96,0xEB,0x7B,0xF5,0x1A,0xED,0xFF,0x12,0xFF,0xAA,0xFD,0x97,0xFB,0x2D,0xF7,0x9B,0xED,0x75,0xDF,0xEB,0x7D,0x96,0xFD,0xAF,0xD5,0xBF,0xD6,0xF9,0x2F,0xFA,0xAF,0xFA,0x9F,0xEA,0xBF,0xEE,0x73,0xBF,0xEA,0xBE,0xDB,0xFD,0x77,0xBB,0xDE,0x77,0xDB,0x6E,0xFD,0x97,0xFA,0xEF,0x7B,0xBD,0xDF,0xF5,0xFF,0x6B,0xBF,0xED,0x77,0xFD,0x6F,0xBF,0xDF,0xF6,0x7B,0xBE,0xEF,0xFB,0x5E,0xFF,0xD7,0x7D,0xDF,0xF7,0x3F,0xEF,0xF6,0xBB,0xDD,0xFF,0xDB,0x7D,0xFF,0xAD,0xFF,0xDF,0xEA,0x7F,0xDB,0x7D,0xDF,0x75,0xDF,0x6B,0xFD,0xEF,0x3E,0xD7,0xFA,0xBD,0xEF,0xB5,0x1F,0xDE,0x0F,0x67,0x13,0x09,0x27,0x81,0x44,0x52,0x60};
const BYTE pcbPage07[] = {0x88,0x00,0x90,0x00,0x89,0x00,0x50,0x00,0x8D,0x60,0x14,0x42,0xB9,0x04,0xB1,0x4D,0x24,0x53,0x0C,0xE3,0x34,0x8B,0xB5,0xD2,0x29,0xD6,0x29,0xD5,0x08,0xF6,0x01,0xFA,0x05,0xEB,0x7D,0x97,0xEA,0xFF,0xDF,0x76,0xDB,0xFF,0xFF,0xBF,0xEF,0xFE,0xDF,0x7E,0xB7,0x5D,0x4F,0x15,0xCB,0x2D,0x82,0x55,0x00,0x0A,0xA0,0x00,0x08,0x44,0x02,0x10,0x81,0x00,0x50,0x22,0x08,0x00,0xD4,0x02,0x69,0x0A,0x20,0x98,0x06,0x11,0x89,0x44,0x02,0x09,0x00,0x84,0x01,0xA0,0x15,0x82,0x50,0x4A,0x15,0xE2,0x08,0x4A,0x20,0x89,0x00,0x40,0x21,0x00,0x00,0x00,0x80,0x41,0x00,0x00,0x10,0x01,0x00,0x00,0x00,0x00,0x00,0x90,0x00,0x20,0x04,0x00,0x02,0x00,0x00,0x40,0x00,0x00,0x40,0x10,0x00,0x00,0x48,0x04,0x40,0x10,0x04,0x40,0x10,0x05,0x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x97,0xD0,0x6F,0x96,0xE9,0x6E,0x95,0x7E,0x8F,0x75,0x8F,0x56,0x67,0x13,0x48,0x0F,0x60,0x09,0x24,0x93,0x08,0x81,0x40,0x28,0x04,0xC2,0x10,0x42,0x20,0x00,0x0A,0x80,0x22,0x88,0x00,0x42,0x28,0x02,0x10,0x01,0x2C,0x02,0x01,0x20,0x0A,0x00,0x00,0x09,0x80,0x10,0x00,0x04,0x00,0x00,0x20,0x0A,0x40,0x2A,0x92,0x09,0xE0,0x1E,0xA1,0x08,0x85,0x50,0x00,0x08,0x04,0x00,0x00,0x00,0x20,0x80,0x00,0x20,0x00,0x08,0x01,0x00,0x10,0x01,0x00,0x40,0x00,0x40,0x30,0x00,0x08,0x24,0x91,0x00,0x0A,0x40,0x21,0x08,0x82,0xC0,0x72,0x08,0xE0,0x5C,0xA4,0xF6,0x11,0xEE,0x31,0x8E,0xF1,0x16,0x59,0x94,0x4E,0xF7,0x10,0xEE,0x12,0xEE,0x51,0x2D,0xD6,0x6F,0x11,0xEA,0x2D,0xF2,0x0D,0xF2
,0x5E,0x61,0x3E,0xC2,0x7F,0x21,0x9D,0xE6,0x79,0x0D,0xF5,0x4E,0x75,0xBB,0x95,0xEE,0x33,0x9D,0xD7,0x59,0xE6,0x7F,0xA1,0xBF,0xD5,0x57,0xF5,0x9A,0x76,0xDB,0x6E,0xB1,0xDE,0x57,0xD9,0x6D,0xD6,0x3E,0xD3,0xE9,0x7F,0x96,0x6B,0xFC,0x17,0xEF,0xD8,0x77,0xDE,0x6A,0xEF,0xFB,0x2D,0xD6,0xFB,0x2D,0xD6,0x5B,0xFE,0x9B,0xED,0x57,0xFB,0x6D,0xB6,0xDF,0x72,0xDF,0x6A,0xFD,0x37,0xDA,0x6F,0xB9,0xEF,0xF5,0x3E,0xD7,0xFA,0x6B,0xBD,0xDE,0xF5,0x3F,0xED,0xB7,0xDB,0xFD,0x6E,0xB7,0xDB,0x7E,0xD7,0x7B,0xED,0x7E,0xB7,0xFE,0xEB,0x3F,0xEA,0xFF,0x2B,0xFD,0xB6,0xED,0x7F,0xAB,0xDD,0xFF,0x57,0xFB,0x6D,0xBF,0xEA,0xBF,0xD6,0x7F,0xD7,0x72,0xDD,0x77,0xDB,0x7D,0xB6,0xDF,0xF2,0xBF,0xEB,0x3D,0xB6,0x1D,0x0F,0x15,0x87,0x4A,0x03,0x88,0xA5,0xD0,0x02,0xE8,0x30,0x8D,0x50,0x4F,0x70,0x0D,0xB6,0x02,0x2A,0x91,0x06,0x21,0x04,0x02,0x00,0xA1,0x00,0x90,0x48,0x20};
const BYTE pcbPage09[] = {0xBE,0xF6,0xFF,0xDF,0x75,0xDE,0xF7,0x75,0x9B,0xED,0x74,0x8E,0x72,0x89,0x6C,0xB2,0x0E,0xF1,0x88,0x76,0x8A,0x61,0x1C,0x82,0xF5,0x08,0xE7,0x15,0x6A,0x17,0xC9,0x74,0x1E,0xE3,0x9C,0x63,0xAC,0x93,0x48,0x8A,0x60,0x0A,0x21,0x00,0x0A,0x40,0x11,0x44,0x20,0x04,0x00,0xC8,0x26,0x91,0x20,0x0A,0x40,0x2A,0x81,0x24,0x02,0x00,0x80,0x08,0x00,0x02,0x90,0x01,0x00,0x40,0x01,0x00,0x00,0x10,0x01,0x00,0x00,0x00,0x40,0x00,0x10,0x01,0x00,0x50,0x06,0x11,0xC2,0x19,0x64,0x91,0x16,0x4A,0x20,0x89,0x08,0x44,0x22,0x00,0x00,0x00,0x01,0x40,0x00,0x08,0x00,0xA0,0x00,0x20,0x04,0x00,0x14,0x81,0x20,0x08,0x05,0x20,0x8A,0x00,0xD5,0x60,0x12,0xD0,0x68,0x9D,0xD6,0x55,0x6A,0xAE,0x51,0xAD,0x56,0xA9,0xD6,0x56,0x71,0x8E,0x71,0x0E,0xF1,0x0E,0xF3,0x08,0xEF,0x30,0x8D,0xF6,0x0A,0xE9,0x2D,0xB5,0x94,0xE7,0x19,0xD6,0x69,0x96,0x6D,0x92
,0xED,0x35,0x95,0x6E,0x93,0xD9,0x66,0xB9,0xD7,0x29,0x9E,0xD3,0x5D,0xE6,0xBA,0x45,0x7E,0x97,0xD2,0x6D,0xB6,0xAB,0xF6,0x19,0xE6,0x5D,0xB6,0xEB,0x1D,0xF6,0xAB,0xDC,0x76,0x97,0xE9,0x5E,0xEB,0x3D,0xCA,0x7E,0xD7,0x69,0xBF,0xD6,0x5B,0xF5,0xDE,0x63,0xFD,0x2E,0xF7,0xAA,0x5D,0xEF,0xB2,0xDF,0x6F,0xB1,0xDF,0x6A,0xFF,0x13,0xFD,0x97,0x6B,0xFA,0x9F,0xEB,0x7D,0xB5,0xDF,0x6B,0xBB,0xDD,0xEE,0xB5,0xEF,0x9D,0xF6,0xEF,0xB9,0xDE,0x77,0xDB,0x69,0xBE,0xEF,0x9E,0xF3,0xBD,0xD7,0xFB,0xAD,0xFF,0xB5,0xEF,0x3B,0xDE,0x57,0xFB,0xED,0x75,0x9F,0xFF,0xAA,0xFF,0xAD,0xF7,0xAA,0xFD,0x57,0xFD,0xEF,0x35,0xDE,0xEF,0x76,0xEB,0x3D,0xF7,0x1B,0x2D,0x17,0x05,0x26,0x03,0x40,0x24,0x80,0x24,0x20,0x90,0x04,0xD2,0x28,0x8A,0x25,0x92,0x48,0x26,0x11,0x05,0x10,0x06,0x01,0x02,0x01,0xC0,0x00,0x50,0x00,0x54,0x00,0x08,0x06,0x01,0x80,0x42,0x20,0x10,0x00,0x88};
const BYTE pcbPage10[] = {0x77,0xDB,0x7E,0xAF,0xFF,0xF5,0xBF,0xEB,0xFE,0x33,0xDD,0xEA,0x2A,0xED,0x32,0x8D,0x72,0x4D,0x76,0x91,0x6C,0x17,0x01,0x90,0x08,0x06,0x90,0x42,0x29,0x05,0xB2,0x09,0xB6,0x49,0xB6,0x49,0xB6,0x52,0xA9,0x4A,0x68,0x15,0x40,0xAD,0x00,0x40,0x2A,0x00,0x00,0x4A,0x00,0x6A,0x00,0x0A,0x40,0x11,0x02,0x10,0x00,0x00,0x02,0x00,0x20,0x00,0x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x05,0x12,0x00,0x04,0x02,0x00,0x80,0x90,0x40,0x20,0x08,0x12,0x00,0x09,0x00,0x85,0x40,0x01,0x50,0x00,0x10,0x04,0x80,0x42,0x10,0x85,0x60,0x00,0xA8,0x02,0xC9,0x20};
const BYTE pcbPage11[] = {0x41,0x16,0x49,0x37,0x4A,0x3F,0x96,0xF3,0x3D,0x97,0xFD,0x96,0xED,0x46,0x71,0x0E,0xB3,0x89,0x55,0xA0,0x4E,0x01,0x50,0x04,0x00,0x81,0xC0,0x00,0xCA,0x21,0x48,0x15,0x62,0x29,0x96,0x21,0xDE,0x21,0x5E,0xA1,0x59,0x8E,0xF1,0x0C,0xD6,0x21,0x94,0x42,0x20,0x08,0x44,0x22,0x88,0x01,0x44,0x00,0x22,0x00,0x00,0x00,0x10,0x02,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x01,0x80,0x20,0x00,0x00,0x00,0x20,0x00,0x21,0x14,0x81,0x54,0x12,0xC9,0x2A,0xB5,0x88,0x07,0xE8,0x02,0x20,0x08,0x04,0x81,0x48,0xA4,0xA2,0x60,0x98,0x6C,0x12,0xED,0x12,0xE9,0x2E,0x91,0xEE,0x11,0xEE,0x51,0x2D,0x96,0xD1,0x6E,0x32,0x8A,0x68,0x9F,0xC8,0x77,0x14,0xEA,0x16,0xCA,0x69,0xB4,0x57,0xA8,0xAE,0x53,0x69,0x9D,0x56,0x51,0x6D,0xB6,0x51,0xAF,0x70,0x8F,0x71,0xAE,0x91,0xEF,0x50,0x2F,0xF2,0x0A,0xF9,0x14,0xCF,0x70,0xAF,0xB4,0x8B
,0xF6,0x2A,0xD9,0x2E,0xD3,0x2D,0xF2,0x0D,0x76,0xCA,0x2B,0xF9,0x16,0xE9,0x2E,0xF1,0x2D,0xD6,0x2B,0xD9,0x4E,0xF1,0x6E,0x99,0x6D,0xB6,0xD6,0x6B,0x19,0xEE,0xA9,0x76,0x8B,0xFD,0x53,0xBC,0x97,0xF1,0x1E,0xE7,0xB9,0x4D,0xD7,0x79,0xAE,0xB7,0xE8,0x2F,0xF5,0x2B,0xDD,0x77,0x89,0xFE,0xAB,0xDA,0x5D,0xF6,0xAB,0xDE,0x71,0x9E,0xEE,0xB3,0xDE,0x69,0xDF,0x6A,0xDB,0x5F,0xED,0xB7,0xDA,0x6F,0xB2,0xDF,0x6A,0xBD,0xD5,0x6F,0xF5,0x6F,0xAB,0xE9,0x7E,0xAB,0xDD,0x77,0x9A,0xEF,0xB6,0xD3,0x5D,0xEF,0xB2,0x6F,0xF9,0x2F,0xB4,0x1F,0x4F,0x12,0x0D,0x03,0x15,0x01,0x80,0x40,0xA2,0xD8,0xE2,0xE8,0xF5,0xA0,0x16,0x11,0x84,0x56,0x01,0x25,0x00,0x05,0x02,0x40,0x04,0x02,0x80,0x42,0x20,0x00,0x24,0x00,0x04,0x02,0x01,0xA0,0x00,0x40,0x00,0x14,0x00,0x41,0x00,0x89,0x40,0x10,0x60,0x08,0x4C,0x22,0x10,0xAA,0xAB,0x48,0x15,0x44,0x21,0x94,0x80,0xD6,0x60,0xB2};
const BYTE pcbPage12[] = {0x88,0x22,0x80,0x10,0x01,0xA0,0x00,0x4A,0x01,0x2A,0x05,0x92,0x0B,0xD1,0x2E,0xD3,0x28,0x96,0x61,0x9C,0x62,0x09,0x4C,0x2B,0x0E,0x11,0x4E,0x15,0x20,0x8D,0x16,0x80,0x65,0x2A,0x04,0xB3,0x48,0x2F,0x91,0x48,0x6F,0x10,0xDE,0x63,0x18,0x67,0x90,0xEB,0x28,0x95,0x82,0x68,0x14,0xA2,0x00,0x80,0x00,0x00,0x00,0x40,0x04,0x00,0x00,0x00,0x00,0x40,0x08,0x04,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x80,0x40,0x10,0x00,0x0D,0xE0,0x15,0x42,0x6A,0x09,0x6A,0x95,0x6A,0x84,0x72,0x8A,0x70,0x8D,0x72,0x0D,0xF1,0x0C,0xF6,0x95,0x6A,0x95,0x6A,0x9B,0x69,0x96,0x6A,0xA5,0xB2,0x5D,0xA1,0x7C,0x07,0x70,0x9F,0xC8,0x57,0x69,0x34,0x97,0x68,0xAE,0x71,0x0D,0xF6,0x11,0xDE,0x55,0xD2,0x6D,0x16,0xD6,0x73,0x99,0x66,0x99,0xEF,0x30,0xCF,0x35,0xCA,0x55,0xEA,0x9D,0x55,0x6C,0xA6,0xBB,0xC9,0x35,0xAE,0xD2,0x5D,0x65,0x5E,0x21,0xDE,0x32
,0xDB,0x08,0xEF,0x69,0xB6,0x99,0x56,0x6D,0xB3,0xCC,0x73,0x1E,0xE1,0x76,0x89,0x7D,0xA6,0x73,0x9C,0x83,0xFD,0x44,0x7F,0xA2,0x9D,0x72,0x8F,0xF1,0x2E,0xB9,0xCE,0xB3,0x4C,0xF6,0x17,0xEA,0xAA,0x6D,0xB5,0x96,0x6F,0x91,0xDE,0x77,0x92,0x6E,0xB1,0xDD,0x66,0xBF,0x91,0xFF,0x54,0x57,0xEE,0xD1,0x7F,0x54,0xEE,0x37,0xD9,0xAE,0xD7,0x69,0xFE,0x13,0xEE,0xF9,0x0F,0xF5,0x9E,0xF3,0x9E,0xF3,0xAD,0xD6,0xFD,0x15,0xEE,0xB7,0xD9,0x6F,0x76,0x9A,0xED,0xEE,0x77,0x19,0x6F,0x16,0x09,0x0E,0x87,0x41,0x05,0x41,0x00,0x10,0x40,0x12,0x40,0x24,0x02,0x49,0x20,0x15,0x40,0x26,0x0A,0x03,0x09,0x01,0x08,0x00,0x01,0x08,0x80,0x20,0x00,0x10,0x08,0x02,0x00,0x91,0x00,0x20,0x00,0x48,0x00,0x10,0x04,0x42,0x00,0x40,0x11,0xC8,0x20,0x94,0x20,0x95,0x02,0x49,0x24,0x12,0x80,0xED,0x01,0xE8,0x55,0xD0,0x6E,0x31,0x9E,0xE0,0x9B,0xEC,0x57,0xA8,0xF6,0x15,0xEE,0x55};
const BYTE pcbPage13[] = {0xF4,0x15,0xD2,0x68,0x15,0xE4,0x12,0xC9,0x12,0x51,0x0A,0xA0,0x0D,0x40,0x2E,0x11,0xD4,0x13,0x68,0x96,0x69,0x21,0x8C,0x51,0x04,0x81,0x40,0x10,0x00,0x20,0x00,0x00,0x08,0x05,0x12,0xCA,0x22,0x99,0x66,0x11,0xA9,0x56,0xA9,0x54,0x27,0x91,0xE8,0x2E,0x95,0x62,0x18,0xE7,0x10,0xEA,0x10,0x84,0x50,0x00,0x0A,0x80,0x00,0x00,0x00,0x00,0x01,0x80,0x40,0x00,0x00,0x0A,0x28,0x01,0xA0,0x12,0x80,0x00,0x08,0x80,0x50,0x0D,0x60,0x96,0x2A,0xD1,0x2E,0x91,0x6D,0xA5,0x9C,0xE7,0x30,0x9F,0xD1,0x4C,0x77,0xC9,0x74,0x97,0x54,0xE2,0x6F,0x10,0xED,0x16,0xC9,0x76,0x99,0x46,0xFA,0x65,0x2A,0xB7,0x89,0xF5,0x16,0xE9,0xB6,0x99,0x6E,0xF9,0x14,0xEF,0x11,0xED,0x96,0x6B,0x90,0xFF,0x00,0xFF,0x11,0xEE,0x19,0xD6,0x69,0xAE,0x69,0xAE,0xB5,0xD5,0x26,0xEB,0x98,0xEE,0x77,0x11,0x6E,0xA9,0x56,0xBB,0xAC,0x93,0xED,0x35,0xD5,0x2F,0xD0,0x6F
,0xB5,0x91,0xEC,0x77,0x0D,0xF4,0x57,0x55,0xF2,0x1A,0xED,0x15,0xEA,0x6F,0x98,0xE7,0x59,0x6D,0xB6,0x56,0xA9,0xD5,0x6D,0x56,0x69,0x1E,0xF5,0x16,0xE9,0x2D,0xD6,0x79,0x0D,0xF6,0x15,0xDA,0x55,0x6A,0x5F,0xF0,0x0F,0xEA,0x6D,0xB2,0x9D,0xD5,0x6F,0xD0,0x2F,0xDE,0x62,0xBD,0x65,0xBD,0x47,0xB8,0xCF,0x75,0x96,0xDB,0xEC,0x57,0xEA,0x29,0xFF,0x26,0xDB,0x6C,0x17,0xF9,0x96,0xED,0x76,0xAD,0xD6,0x5A,0x6E,0x3B,0x95,0x0A,0x5F,0x03,0x09,0x07,0x00,0x42,0x00,0x40,0x14,0x20,0x80,0x2A,0x00,0x94,0x02,0x10,0x81,0x2A,0x01,0x00,0x0A,0x01,0x00,0x01,0x80,0x42,0x00,0x20,0x00,0x10,0x00,0x04,0x01,0x00,0x41,0x20,0x00,0x00,0x10,0x84,0x00,0x81,0x50,0x00,0x50,0x08,0x4C,0x20,0x14,0x82,0x49,0x20,0x8D,0x50,0x86,0x60,0xAA,0xE0,0x1C,0xE2,0x1C,0xF3,0x8D,0x71,0x9D,0x56,0xA9,0xD6,0x75,0x96,0xF9,0x25,0x9F,0x70,0x8E,0xDA,0x66,0xBB,0xC8,0x2F,0xEA,0x35};
const BYTE pcbPage14[] = {0xE9,0x2E,0x91,0x4A,0x29,0xD5,0x20,0x09,0xA4,0x01,0x10,0x00,0x20,0x05,0x50,0x01,0xEE,0x11,0xC9,0x76,0x89,0xF5,0x08,0xF6,0x89,0x60,0x8C,0x60,0x02,0x40,0x20,0x00,0x00,0x01,0x00,0xA4,0x02,0x08,0x67,0x10,0xEB,0x14,0xCB,0x6C,0xA3,0xEC,0x12,0x6A,0x91,0x4C,0xB7,0x00,0xEF,0x10,0xEA,0x15,0xE8,0x15,0x42,0x68,0x00,0x10,0x02,0x80,0x00,0x00,0x20,0x00,0x00,0x00,0x08,0x00,0x04,0x40,0x02,0x00,0x11,0x88,0x64,0x93,0x69,0x14,0xE7,0x18,0xE7,0x28,0xDF,0xA0,0xDE,0xF6,0xAB,0xEE,0x7A,0xD7,0x79,0xAE,0xF9,0x96,0xF9,0x4F,0xF0,0x2F,0xDA,0x27,0xD8,0x57,0xEA,0x19,0xD4,0x6F,0x95,0xD2,0x69,0xAE,0x51,0xAE,0xE2,0x1A,0xEB,0x58,0xA7,0x58,0xAF,0x54,0xB2,0xAF,0xB2,0x49,0x2D,0xF6,0x09,0xEE,0x75,0x15,0xEE,0x21,0xDD,0x66,0x3A,0x86,0xD9,0x6E,0x91,0xEC,0x57,0x29,0xEF,0x31,0xAE,0xEA,0x15,0xEC,0x77,0x90,0xAF,0xA9,0xF6,0x1B
,0xC8,0x6E,0xB7,0x89,0xF5,0x96,0x69,0x9D,0xD6,0x6B,0x98,0x6F,0xAA,0xAA,0xF7,0x18,0xE7,0x99,0x6D,0xF5,0x16,0xDA,0x67,0x99,0xEF,0x51,0xBE,0x95,0xD6,0x69,0x9D,0xD5,0x6E,0x53,0xBD,0xC2,0x7D,0x93,0xFD,0x04,0xFF,0x92,0xCD,0x76,0xAB,0xEC,0x13,0xDC,0x67,0xFA,0x0D,0xE5,0x3F,0xD0,0x0F,0xE9,0x76,0x9B,0xA6,0xF9,0x16,0xEE,0xB3,0xDD,0x22,0xFF,0x0B,0x69,0x1D,0x26,0x0E,0x03,0x0A,0x81,0x20,0x88,0x01,0x40,0x10,0x40,0x28,0x04,0x22,0x90,0x01,0x08,0x25,0x00,0x01,0x08,0x04,0x02,0x80,0x00,0x00,0x40,0x10,0x00,0x10,0x04,0x00,0x04,0x01,0x20,0x00,0x00,0x10,0x00,0x08,0x04,0x80,0x22,0x00,0x91,0x40,0x20,0x0C,0x40,0x22,0x88,0x54,0x02,0x50,0x09,0xE6,0xA0,0x51,0xA8,0x6D,0x34,0x96,0xD1,0x6D,0xB5,0x4C,0xB7,0xB4,0x8F,0xF2,0x19,0xED,0xB6,0x56,0xA9,0x6E,0xB7,0x90,0xEF,0x75,0x0A,0x76,0xAB,0x09,0xED,0x16,0xA3,0x51,0x2C,0x96,0xC1,0xEA,0xE9};
const BYTE pcbPage15[] = {0xA8,0x97,0x68,0xB7,0x8A,0xE9,0x2E,0xF1,0xAE,0x5A,0xEA,0xB9,0xD0,0xFD,0x62,0xA9,0xD0,0xEF,0x92,0x6B,0x98,0xEE,0x67,0xB9,0x94,0xD7,0x68,0x2B,0x85,0x20,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x41,0x24,0x12,0x0E,0x21,0xDA,0x2F,0xD8,0x57,0x6D,0xB2,0xAE,0x90,0x4F,0x60,0x12,0x59,0x26,0x92,0x69,0x15,0xEA,0x09,0xE4,0x12,0xC8,0x00,0x40,0x10,0x00,0x00,0x00,0x88,0x02,0x00,0x00,0x00,0x94,0x01,0xD4,0x02,0xEA,0x11,0xEE,0x15,0xEF,0x3F,0x7B,0xFE,0x09,0xFE,0x85,0x5E,0x5F,0x75,0xDF,0xFF,0x6B,0xBF,0xFD,0xFF,0xFD,0xFF,0xFF,0xF9,0xFD,0xEF,0xF9,0xEE,0xDD,0xE5,0xFE,0x95,0xEA,0xAD,0xD6,0x59,0xD6,0x69,0xED,0x16,0xF1,0x9E,0x55,0x52,0xED,0x55,0x34,0x96,0xEB,0x29,0xDE,0x17,0xF0,0x8F,0x71,0x9D,0xD5,0x4E,0xF3,0x1D,0xE2,0x9D,0xD6,0x69,0xF6,0x13,0xED,0x71,0x0D,0x76,0x99,0xED,0x16,0xF1,0x9E,0x61,0xBE,0x4B,0x54
,0xEB,0x2C,0xF7,0x0C,0xE3,0x3C,0xA7,0xD9,0x76,0x19,0xCE,0x75,0x6A,0x1D,0xD6,0x6B,0x68,0x9F,0xD1,0x5E,0xE9,0x2E,0xD5,0x6A,0xBE,0x49,0xB6,0xD5,0x4A,0xFF,0x20,0xBF,0xD1,0x2D,0xD6,0x5A,0x6F,0x92,0xEA,0x5B,0x6C,0x52,0x9F,0xE8,0x57,0xAE,0xD1,0x6E,0xB7,0x92,0xE9,0x5A,0xAF,0xB8,0xCF,0x71,0x0D,0x76,0x09,0x0E,0x05,0x46,0x21,0x00,0x22,0x00,0x40,0x08,0x24,0x81,0x20,0x08,0x04,0x50,0x04,0x02,0x40,0x11,0x00,0x0A,0x00,0x00,0x02,0x80,0x60,0x00,0x22,0x00,0x00,0x04,0x40,0x02,0x00,0x00,0x08,0x00,0x04,0x40,0x00,0x02,0xA0,0x01,0x90,0x40,0x20,0x94,0x00,0xA9,0x04,0x91,0x44,0x12,0xC1,0x0A,0xE0,0x51,0xA8,0xF5,0x08,0xEC,0x76,0x15,0x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x9F,0x61,0xBE,0x95,0xD6,0x49,0xFE,0x09,0xFE,0x97,0x68,0xAF,0xD2,0x6D,0xB3,0xCD,0x72,0x5E,0xB3,0x99,0x6D,0xB6,0x89,0xFE,0x25,0x9A,0x0D,0x56,0x06,0x22,0x03,0x10,0x00,0x24,0x00,0x08,0x02,0x50,0x00,0x12,0x08,0x82,0x48,0x01,0x10,0x0A,0x00,0x01,0x08,0x80,0x01,0x00,0x10,0x00,0x20,0x04,0x00,0x00,0x00,0x0A,0x00,0x00,0x10,0x00,0x00,0x08,0x82,0x00,0x80,0x40,0x10,0x44,0x10,0x52,0x18,0x22,0x99,0x00,0xF4,0x12,0x08,0x62,0x90,0x6A,0x90,0xE8,0x16,0xE8,0x56,0x69,0x9D,0x56,0xD2,0x5F,0x62,0x9A,0x6A,0x9B,0x68,0x9F,0x52,0x69,0x6E,0xB1,0xAD,0xB5,0x96,0x6A,0xB5,0x16,0xA9,0x95,0x46,0x6B,0x21,0xAC,0x92,0xC8,0xF7,0xE0,0xFA,0xF9,0xFC,0xFE,0xFE,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF};
const BYTE pcbPage17[] = {0x40,0x14,0x02,0x61,0x0C,0x22,0x89,0x56,0x11,0xC6,0x29,0x96,0xD1,0x2D,0x96,0xEB,0x3E,0x8B,0xFF,0x0E,0xC7,0x2B,0xD1,0x5F,0xE5,0x7A,0xAE,0x5F,0xE1,0x3E,0xC9,0x64,0x91,0x00,0xC0,0x20,0x00,0x48,0x00,0x50,0x08,0x00,0x08,0x02,0x00,0x01,0x88,0x26,0x11,0x05,0xA8,0x57,0x08,0xF6,0x0A,0xE9,0xAA,0x95,0x40,0x95,0x42,0x29,0x8D,0x50,0x4E,0x32,0x89,0x94,0x40,0x08,0x81,0x40,0x10,0x84,0x6B,0x90,0x4D,0x72,0x9D,0xE2,0x1D,0xC9,0x26,0x89,0x40,0x22,0x08,0x00,0x00,0x00,0x24,0x00,0x00,0x01,0x21,0x01,0x0C,0x16,0x61,0x08,0xEA,0x90,0x6A,0x5A,0x7E,0x39,0xF1,0xD4,0xAA,0xC5,0x35,0xCE,0x37,0xE9,0x36,0xEB,0x9F,0xF1,0xDE,0xFF,0x6F,0xDF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xF5,0xFE,0xEB,0xD9,0x75,0x16,0xCB,0x70,0xAF,0xB0,0x8F,0x71,0x9E,0xE1,0x1E,0xE5,0x1A,0xF5,0x16,0xEA,0x2B,0xF5,0x2A,0xAB,0x05,0x8B,0xE0,0x25,0xB0,0x0C
,0x32,0x8C,0x05,0xD6,0x01,0xEA,0x11,0xE8,0x17,0xEA,0x4B,0x96,0xC1,0x65,0x12,0xE9,0x12,0x48,0x2D,0x92,0x0D,0xC2,0x69,0x94,0x52,0xEA,0x37,0xD2,0x2B,0xDA,0x6A,0x9B,0xD1,0x7C,0x87,0x7A,0x2E,0x03,0x29,0x0E,0x01,0x05,0x42,0x20,0x00,0x20,0x00,0x90,0x08,0x04,0x12,0x80,0x01,0x50,0x05,0x00,0x01,0x10,0x02,0x00,0x01,0x40,0x00,0x00,0x80,0x20,0x00,0x08,0x04,0x00,0x80,0x00,0x00,0x09,0x00,0x00,0x00,0x10,0x80,0x21,0x08,0x80,0x20,0x89,0x20,0x84,0x12,0x40,0x28,0x04,0x12,0x80,0x49,0xA2,0x48,0x21,0xD0,0x2A,0x68,0x96,0x52,0xA9,0xED,0x14,0xD7,0x6C,0x12,0xDF,0x50,0x6F,0x91,0xCE,0x71,0xAE,0x91,0xED,0xB6,0x8B,0x69,0x2C,0x97,0x09,0xE7,0x09,0xEA,0x24,0x92,0xCA,0xE8,0xE6,0xF9,0xF4,0xFA,0xFD,0xFE,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF};
const BYTE pcbPage18[] = {0x50,0x29,0x04,0xA2,0x10,0x04,0x00,0xAA,0x01,0x90,0x22,0x88,0x12,0x89,0x64,0x16,0x41,0x1C,0xE6,0x13,0xA8,0xD6,0x29,0x55,0xAA,0x5D,0xB7,0xDD,0x57,0xFB,0xAD,0xF7,0xAA,0xD9,0x64,0x91,0x48,0x24,0x01,0x00,0x00,0x10,0x00,0x00,0x04,0x00,0x20,0x00,0x10,0x05,0x90,0x45,0x52,0x09,0xE6,0x2A,0x8A,0x68,0xA6,0x18,0xE6,0x11,0xA4,0x11,0x94,0x05,0x90,0x4E,0x11,0xE4,0x12,0x48,0xB6,0x42,0xB9,0xEE,0x97,0xE9,0x6C,0x96,0xA9,0x4E,0x20,0x8A,0x20,0x90,0x00,0x40,0x00,0x04,0x00,0x00,0x10,0x00,0x20,0x02,0x00,0x00,0x00,0x20,0x00,0x0A,0x02,0x09,0x25,0x11,0x64,0x94,0xAA,0xD7,0xEA,0xFD,0xFA,0xEF,0xF9,0xDE,0xFF,0x5E,0xF7,0x5D,0xEF,0xF3,0x3E,0xCB,0x7D,0xEF,0x7F,0xBF,0xFF,0xFF,0xFF,0xFF,0xF7,0xFB,0xDD,0x56,0xFE,0x42,0xBA,0xCB,0x68,0x7E,0x09,0xB4,0xCF,0x31,0xDC,0xA7,0x59,0xD6,0x49,0xFF,0x61,0x1E,0x51,0x2C,0x92,0x48
,0x2B,0xDA,0x6E,0x91,0x6D,0xD6,0x53,0xE9,0x2E,0xB1,0x9E,0xE5,0x5A,0x2D,0xD5,0x68,0xAE,0xD1,0x5E,0xE3,0x78,0x8F,0x74,0x4B,0x3E,0x23,0x18,0x0F,0x05,0x92,0x05,0x01,0x80,0x08,0x44,0x20,0x00,0x00,0x4A,0x00,0x00,0xAA,0x00,0x11,0x00,0x0A,0x00,0x00,0x04,0x00,0x01,0x80,0x00,0x40,0x00,0x10,0x00,0x04,0x00,0x01,0x00,0x80,0x10,0x00,0x00,0x00,0x80,0x40,0x10,0x80,0x20,0x88,0x20,0x9A,0x50,0x09,0x01,0x55,0x02,0xF5,0x08,0xA4,0x02,0xD0,0x20,0xD2,0x28,0xD2,0x68,0x2E,0xB1,0x8C,0x77,0x90,0x6F,0x51,0x6E,0x13,0xCD,0x72,0x8D,0x72,0x8E,0x73,0x98,0x57,0x69,0x2E,0x91,0x6F,0x80,0x6F,0x92,0x29,0x84,0xF2,0x88,0xEE,0xF1,0xF4,0xF6,0xF9,0xFC,0xFF,0xFE,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF};
const BYTE pcbPage19[] = {0x9A,0xC1,0x4C,0xE2,0xE8,0x34,0xC5,0x70,0x88,0x6C,0x92,0x00,0x52,0x08,0xA2,0x0A,0x21,0x90,0x25,0x12,0x88,0x66,0x11,0xAD,0x16,0xE1,0x2E,0x91,0x6F,0x9A,0xFF,0xAA,0xFD,0x6E,0xB7,0xDA,0xED,0x50,0xE8,0x0D,0xE0,0x50,0xB0,0xC9,0x60,0x90,0xC0,0x21,0x80,0x00,0x80,0x00,0x02,0x10,0x04,0xA3,0x08,0xAB,0x10,0xEF,0x11,0xE8,0x2C,0x87,0x70,0x8A,0x20,0x91,0x24,0x92,0x09,0xF4,0x17,0xD5,0x6A,0x9D,0xD6,0x55,0x4E,0x61,0x08,0x25,0x00,0x00,0x24,0x00,0x01,0x4C,0x03,0x50,0x28,0x94,0x40,0x20,0x80,0x80,0x08,0x00,0x00,0x08,0x04,0x00,0x00,0x00,0x11,0x00,0x00,0x01,0x42,0x0F,0x17,0x2B,0x3F,0x97,0x6B,0x2F,0xB7,0x8B,0x7C,0x2F,0xF0,0x4E,0xF5,0x95,0x6F,0x95,0xFF,0xED,0x7F,0xBF,0xFF,0xFF,0xFF,0xFF,0xFF,0xEF,0xF5,0xBD,0x96,0xEB,0x5D,0xD5,0x6F,0x90,0xEF,0x71,0x1E,0xF2,0x0F,0xD0,0x47,0xE8,0x21,0x34,0x91,0x0C,0x12,0x8E
,0x41,0xE6,0x11,0xD2,0x69,0x96,0x6A,0xAB,0xDA,0x29,0xDE,0x62,0x9B,0x6D,0x12,0xA9,0x1E,0x26,0x09,0x06,0x13,0x00,0x81,0x10,0x01,0x20,0x04,0x82,0x20,0x00,0x10,0x0A,0x00,0x00,0x25,0x00,0x00,0x01,0x00,0x00,0x20,0x00,0x00,0x00,0x08,0x00,0x20,0x04,0x02,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0xA0,0x00,0x40,0x10,0xC8,0x20,0x88,0x60,0x9E,0x40,0xA4,0x52,0xA5,0x52,0xA8,0x54,0x22,0xD9,0x16,0xC8,0x69,0x36,0x89,0xEE,0x11,0xEE,0x11,0xEE,0x11,0xEE,0x15,0xF2,0x95,0x6A,0xB5,0x4A,0x35,0xD6,0x29,0x97,0x69,0x15,0x8A,0x6D,0x16,0xD1,0x26,0x91,0x65,0x90,0xEF,0xE0,0xF9,0xF6,0xF8,0xFE,0xFE,0xFF,0xFF,0xFE,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFD,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF};
const BYTE pcbPage20[] = {0xEF,0xFD,0x27,0xDB,0x75,0xAA,0xAD,0x75,0x16,0x12,0xC9,0x28,0x17,0x80,0x16,0x80,0x41,0x2C,0x82,0x29,0x02,0xC8,0x15,0x82,0x68,0x05,0x4A,0x52,0x29,0x84,0x6F,0x12,0x6F,0xB9,0xAF,0xFD,0xA6,0xFB,0xAD,0xDA,0x6D,0xA2,0xA8,0x24,0xAB,0x00,0xAD,0x02,0x49,0x2C,0x92,0x88,0x68,0x14,0x80,0x48,0xA2,0x08,0xA6,0x91,0x2A,0x89,0x6E,0x11,0xEE,0x12,0xE9,0x14,0xE5,0x1A,0xD5,0x56,0x71,0x0D,0xE6,0x59,0x2E,0xB1,0x85,0xEA,0x00,0xA4,0x00,0x02,0x40,0x00,0x00,0x09,0x00,0x04,0x20,0x04,0x02,0x09,0x80,0x56,0x00,0x54,0x00,0x90,0x40,0x20,0x01,0x00,0x00,0x01,0x00,0x40,0x00,0x10,0x00,0x22,0x00,0x00,0x01,0x08,0x04,0x96,0x01,0x56,0x68,0x27,0x89,0xF7,0x15,0x9E,0xFD,0x6E,0xD7,0xFF,0xEF,0x3B,0xDF,0xFF,0xFF,0xFF,0xFE,0xFB,0xEE,0xBB,0xED,0x96,0x5B,0xE8,0x2F,0xF5,0x15,0xD6,0x69,0x9E,0x63,0x98,0x6D,0xD5,0x34,0xCA,0x6D,0x55
,0x35,0x96,0x51,0x6E,0x11,0x1E,0x05,0x16,0x02,0x0B,0x00,0x21,0x80,0x20,0x88,0x22,0x08,0x21,0x00,0x11,0x00,0x08,0x00,0x0A,0x00,0x01,0x00,0x04,0x80,0x00,0x01,0x00,0x20,0x02,0x00,0x00,0x40,0x00,0x04,0x01,0x00,0x00,0x00,0x84,0x00,0x01,0xC0,0x00,0xC0,0x70,0x08,0xF0,0x14,0x69,0xA6,0x18,0xE6,0x11,0xE9,0x2E,0x91,0x6E,0x91,0x6E,0x12,0xA9,0x56,0xA9,0x16,0xE9,0x16,0xE9,0x15,0x6E,0x91,0x6E,0x11,0x6D,0x94,0x67,0x98,0xE5,0x36,0x89,0xF6,0x0A,0x6B,0x28,0x96,0x29,0x86,0x69,0x25,0x92,0xE9,0xD4,0x61,0xFE,0xF1,0xFC,0xFF,0xDC,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFB,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF};
const BYTE pcbPage21[] = {0x7D,0x96,0xEF,0x71,0x8D,0xF6,0x4A,0xB9,0xC6,0x79,0x94,0x4A,0xB5,0xCA,0x98,0xE6,0x9B,0xC8,0xF6,0xD2,0x69,0xF6,0xA0,0xDA,0xE2,0x69,0x90,0xC5,0x92,0x48,0x45,0x3A,0x05,0xBA,0x15,0xDE,0x6F,0x72,0xAE,0x5B,0xAD,0xF6,0x14,0xD2,0x0E,0xC2,0x2A,0x81,0x51,0x08,0x04,0x02,0x91,0x49,0x94,0xC1,0xEC,0x92,0x64,0x16,0xA2,0x4A,0x31,0x95,0x0A,0xE9,0x16,0xC9,0x76,0x09,0xD6,0x69,0x55,0x15,0xE6,0x12,0x69,0x16,0xC8,0x26,0xA9,0x14,0x92,0x50,0x00,0x00,0x20,0x00,0x11,0x00,0xA1,0x00,0x00,0x10,0x00,0x00,0x88,0x45,0x20,0x02,0x28,0x02,0x02,0x50,0x02,0x20,0x80,0x40,0x00,0x08,0x00,0x00,0x04,0x00,0x00,0x00,0x08,0x00,0x00,0x08,0x01,0x02,0x20,0x06,0x11,0x2C,0x92,0x6D,0x22,0x9D,0xE3,0xBF,0x5B,0xBE,0xFF,0x7B,0xFE,0xFF,0xFE,0x55,0xFF,0xAA,0x55,0x6B,0xDC,0x77,0x09,0xEC,0xB7,0x90,0x4F,0x74,0x0B,0x2A,0x15,0x02,0x05,0x22
,0x01,0x00,0x41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0x44,0xA1,0x82,0xA0,0x83,0xC0,0xEA,0xE5,0xB4,0xC6,0xB1,0x4A,0x2A,0xD5,0x11,0xEE,0x31,0x8D,0x72,0x09,0x52,0x29,0x80,0x6E,0xA0,0x0A,0x00,0xA2,0x09,0x00,0x00,0x00,0x00,0x80,0x00,0x04,0x00,0x04,0x00,0x10,0x20,0x40,0x88,0x00,0x00,0x09,0x00,0x14,0xA2,0x12,0x59,0x04,0x55,0x02,0x50,0x6C,0x20,0xB0,0x88,0x40,0x08,0x84,0x00,0x02,0x00,0x00,0x22,0x00,0x00,0x00,0x08,0x00,0x81,0x01,0x12,0x8A,0x2D,0x15,0x6E,0x52,0x15,0xDB,0x47,0x3F,0x8F,0x73,0x5C,0x63,0x1D,0x02,0x01,0x15,0x02,0x00,0xA0,0x02,0x00,0x10,0x00,0x91,0x08,0x00,0x01
,0x90,0x04,0x02,0x00,0x00,0x82,0x00,0x00,0x40,0x00,0x00,0x00,0x90,0x00,0x02,0x00,0x00,0x40,0x21,0x00,0x00,0x02,0x00,0x00,0xC0,0x00,0x60,0x80,0x28,0xA4,0x92,0xC8,0x36,0xC1,0x3A,0x85,0x72,0x89,0x76,0x8A,0xB1,0x4E,0x69,0x24,0x9B,0xA4,0x9B,0xE4,0x12,0xAA,0x51,0xAE,0x32,0x89,0x54,0x4A,0x6D,0x32,0x88,0xD6,0x2A,0xC9,0x6E,0x21,0x9E,0x92,0x4A,0x2A,0x91,0x54,0x8A,0x65,0x92,0xE9,0xD4,0xF2,0xF5,0xFA,0xFC,0xF6,0xFF,0xFF,0xFB,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xDF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF};
const BYTE pcbPage23[] = {0xA9,0xFD,0x95,0xED,0xEE,0xB7,0xD9,0xEE,0x35,0xEB,0xBD,0xB4,0xD7,0xAD,0xF2,0x2D,0xD6,0x70,0x9E,0xD7,0x71,0x8D,0x74,0xAF,0x94,0xEB,0x1C,0xEE,0x97,0x6A,0xAF,0x5E,0xB3,0x1E,0xEF,0x17,0xFE,0x17,0x6B,0x7E,0x2A,0xDF,0x69,0x1D,0xF6,0x88,0x77,0xA8,0x8A,0xE8,0x6C,0x22,0xA8,0xD0,0x22,0xC9,0x61,0x81,0x51,0x8B,0x43,0xA1,0x87,0x53,0x0A,0xD7,0x61,0x3A,0x86,0x59,0x64,0xB7,0x89,0x75,0x95,0x49,0x6D,0x94,0x67,0x9D,0x62,0xBD,0x80,0x54,0xA1,0x10,0x84,0xA0,0x90,0x00,0x40,0x20,0x89,0x00,0x84,0x40,0x01,0x00,0x84,0x02,0x00,0x81,0x00,0xC0,0x80,0x11,0x00,0x00,0x16,0x81,0x21,0x09,0x04,0x22,0x15,0x05,0x16,0x60,0x0C,0xF0,0x01,0x80,0x80,0x04,0x80,0x00,0x40,0x00,0x08,0x00,0x00,0x04,0x81,0x40,0x01,0x23,0x00,0x16,0x1A,0x20,0xC9,0x24,0x81,0x20,0x08,0x05,0x40,0x01,0x08,0x00,0x40,0x01,0x08,0x00,0x00,0x10,0x00,0x00
,0x20,0x00,0x00,0x00,0x40,0x00,0x00,0x10,0x00,0x04,0x00,0x00,0x00,0x40,0x00,0x80,0x68,0x80,0x70,0x08,0xA8,0x94,0x53,0xA8,0x56,0x8A,0x69,0x16,0xD1,0x0A,0xEC,0x12,0xCD,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,0xD7,0x48,0x75,0x96,0x6A,0x91,0x44,0x52,0x82,0x40,0x42,0x01,0xC2,0x00,0x80,0x04,0x80,0x48,0x80,0x44,0x40,0x60,0x30,0x88,0x2E,0x03,0x88,0x07,0x40,0x0A,0x20,0x90,0x00,0x40,0x10,0x04,0x00,0x01,0x08,0x85,0x40,0x15,0x20,0x16,0x02,0x50,0x1C,0x80,0xF0,0x00,0x88,0x40,0x01,0x10,0x20,0x00,0x00,0x12,0x00,0x00,0x00,0x00,0x00,0x40,0x08,0x00,0x04,0x00,0x40,0x04,0x00,0x00,0x00,0x1C,0x08,0x00,0x12,0x00,0x00,0x00
,0x00,0x80,0x80,0x40,0x40,0x08,0xE0,0x10,0xA8,0x44,0x2A,0xD2,0x29,0x8A,0x69,0x2C,0x92,0x9D,0x42,0x69,0x2C,0x92,0x2D,0x92,0x4D,0xA0,0x6E,0x13,0xA8,0x55,0xA6,0x12,0xE9,0x94,0x15,0xE4,0x16,0x89,0xF2,0x08,0xEF,0x10,0x49,0x5E,0x22,0x98,0x47,0x28,0xA5,0x12,0xC9,0x48,0xE6,0xFA,0xD0,0xFB,0xFC,0xFA,0xFF,0xFD,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xBF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0xFF,0xFF,0xFF,0xFF,0xFF,0xFB,0xFF,0xFF,0xFF,0xFF,0xDF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x7F,0xFF,0xFF,0xFF,0xFF,0xF7,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF};
const BYTE pcbPage25[] = {0x7F,0xEF,0x7F,0xFB,0x3F,0xDD,0xFF,0xEF,0x7B,0xBE,0xEF,0xFE,0x37,0xFD,0xAF,0xF6,0x3B,0xDD,0x6F,0xF6,0x1B,0xFD,0xAF,0xDF,0x77,0xBB,0xDD,0x6F,0xBF,0x5F,0xF7,0xBF,0x6E,0xBF,0xAD,0x7F,0xAD,0xFF,0x2F,0xFF,0x1F,0xF6,0x5F,0xB7,0x5F,0x6B,0x7E,0xAB,0xBD,0x57,0x6A,0xB5,0x8D,0xF2,0x0D,0xE6,0x1B,0xE5,0x17,0xEB,0x15,0xAE,0x85,0xF7,0x0A,0xE9,0x16,0xD1,0x6E,0x11,0xEE,0x15,0xE6,0x9B,0xE5,0x4A,0x71,0x0E,0x61,0xB4,0x07,0x68,0x27,0x08,0x57,0x2D,0x12,0x49,0x39,0x0D,0x36,0x01,0x4A,0x29,0x12,0x09,0x04,0x0A,0x01,0xA2,0x00,0x04,0x00,0x00,0x00,0x80,0x00,0x80,0x48,0x00,0x00,0x15,0x81,0x04,0x14,0x10,0x00,0x50,0x08,0x84,0x61,0x20,0x90,0x0A,0xEA,0x30,0x8A,0x6D,0x29,0xA6,0x19,0xE4,0x10,0x68,0x80,0xE0,0x00,0x40,0x00,0x90,0x00,0xE0,0x08,0x40,0x00,0x10,0x80,0x00,0x00,0x08,0x80,0x01,0xE0,0x10,0x41,0x30,0xCA,0x20
,0x5A,0x44,0x32,0x99,0x05,0xE8,0x16,0xC9,0x6A,0x25,0xA9,0xA4,0x11,0xAE,0x51,0x29,0xD4,0x26,0x99,0x62,0x2D,0x90,0x4D,0x66,0x31,0x8A,0x6D,0x22,0x99,0x66,0x08,0xAB,0x54,0x12,0xCB,0x10,0xD1,0x0E,0x60,0xA9,0x94,0xEA,0xD5,0xF1,0xFC,0xF6,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D_PORT_CTRL_A0; //A0 -> HIGH

if(bCS1)
GLCD_PORT_CTRL &= ~GLCD_PORT_CTRL_CS1; //CS1 -> LOW
else
GLCD_PORT_CTRL |= GLCD_PORT_CTRL_CS1; //CS1 -> HIGH

if(bCS2)
GLCD_PORT_CTRL &= ~GLCD_PORT_CTRL_CS2; //CS2 -> LOW
else
GLCD_PORT_CTRL |= GLCD_PORT_CTRL_CS2; //CS2 -> HIGH

if(bWrite)
{
GLCD_SetDataPortDriveMode(TRUE);
GLCD_PORT_DB = cbData; //Write Data set
}
else
{
GLCD_SetDataPortDriveMode(FALSE);
GLCD_PORT_DB = 0;
}

GLCD_PORT_CTRL |= GLCD_PORT_CTRL_E; //E -> HIGH


//wait 40ns
for(i = 0; i < 1; i++)
{
}

GLCD_PORT_CTRL &= ~GLCD_PORT_CTRL_E; //E -> LOW

//wait 200ns
for(i = 0; i < 1; i++)
{
}

cbRead = (bWrite) ? 0x00 : GLCD_PORT_DB;

return cbRead;
}


void GLCD_Clear(void)
{
//both CS1 and CS2 is selected!
int nX;
int nY;

GLCD_RW_Data(TRUE,TRUE,FALSE,TRUE,GLCD_CMD_OFF);

for(nY = 0; nY < 4; nY++)
{
GLCD_RW_Data(TRUE,TRUE,TRUE,TRUE,GLCD_CMD_PAGE0 + nY);
GLCD_RW_Data(TRUE,TRUE,TRUE,TRUE,GLCD_CMD_COL_ADDR + 0);

for(nX = 0 ; nX < 62; nX++)
GLCD_RW_Data(TRUE,TRUE,TRUE,FALSE,0x00);
}
GLCD_RW_Data(TRUE,TRUE,TRUE,TRUE,GLCD_CMD_PAGE0);
GLCD_RW_Data(TRUE,TRUE,TRUE,TRUE,GLCD_CMD_COL_ADDR);
GLCD_RW_Data(FALSE,TRUE,FALSE,FALSE,0); //dummy read
GLCD_RW_Data(FALSE,FALSE,TRUE,FALSE,0); //dummy read

GLCD_RW_Data(TRUE,TRUE,FALSE,TRUE,GLCD_CMD_ON);
}

void GLCD_Reset(void)
{
GLCD_RW_Data(TRUE,TRUE,TRUE,TRUE,GLCD_CMD_RESET);
}

void GLCD_Start(void)
{
GLCD_PORT_DB = 0;
GLCD_PORT_CTRL = 0;
GLCD_PORT_CTRL |= GLCD_PORT_CTRL_RES; //Into 68 mode

GLCD_Reset();
GLCD_RW_Data(TRUE,TRUE,TRUE,TRUE,GLCD_CMD_ON);

GLCD_Clear();
}


//
// nX : 0 - 121
// nPage : 0 - 3
//
void GLCD_Position(unsigned char nX,unsigned char nPage)
{
BOOL bCS1;

bCS1 = (nX < 62) ? TRUE : FALSE;
if(!bCS1)
nX -= 62;

GLCD_RW_Data(TRUE,bCS1,!bCS1,TRUE,GLCD_CMD_PAGE0 + nPage);
GLCD_RW_Data(TRUE,bCS1,!bCS1,TRUE,GLCD_CMD_COL_ADDR + nX);
}


//
// nX : 0 - 121
// nY : 0 - 31
//
void GLCD_PutPixel(unsigned char nX,unsigned char nY,BOOL bSet)
{
int nPage;
BOOL bCS1;
BYTE cbRead;

bCS1 = (nX < 62) ? TRUE : FALSE;
nPage = nY >> 3; // = nY / 8;

if(!bCS1)
nX -= 62;

GLCD_RW_Data(TRUE,bCS1,!bCS1,TRUE,GLCD_CMD_PAGE0 + nPage);
GLCD_RW_Data(TRUE,bCS1,!bCS1,TRUE,GLCD_CMD_COL_ADDR + nX);

GLCD_RW_Data(TRUE,bCS1,!bCS1,TRUE,GLCD_CMD_RW_MOD_ON);
cbRead = GLCD_RW_Data(FALSE,bCS1,!bCS1,FALSE,0); //dummy read
cbRead = GLCD_RW_Data(FALSE,bCS1,!bCS1,FALSE,0); //read
if(bSet)
cbRead |= (1 << (nY - (nPage << 3)));
else
cbRead &= ~(1 << (nY - (nPage << 3)));
GLCD_RW_Data(TRUE,bCS1,!bCS1,FALSE,cbRead);
GLCD_RW_Data(TRUE,bCS1,!bCS1,TRUE,GLCD_CMD_RW_MOD_OFF);
}


//
// nX : 0 - 197(=320-122)
// nPage : 0 - 20(=24-4)
//
void PrintGraphics(int nX,int nPage)
{
int x;
int y;
const char* ppPage[] = {pcbPage01,pcbPage02,pcbPage03,pcbPage04,pcbPage05,pcbPage06,pcbPage07,pcbPage08,pcbPage09
,pcbPage10,pcbPage11,pcbPage12,pcbPage13,pcbPage14,pcbPage15,pcbPage16,pcbPage17,pcbPage18,pcbPage19
,pcbPage20,pcbPage21,pcbPage22,pcbPage23,pcbPage24,pcbPage25};

if(nX > 297 || nX < 0)
return;
if(nPage > 20 || nPage < 0)
return;

for(y = 0; y < 4; y++)
{
GLCD_RW_Data(TRUE,TRUE,TRUE,TRUE,GLCD_CMD_PAGE0 + y);
GLCD_RW_Data(TRUE,TRUE,TRUE,TRUE,GLCD_CMD_COL_ADDR);
for(x = 0; x < 122; x++)
{
GLCD_RW_Data(TRUE,(x < 62),(x >= 62),FALSE,0xFF ^ ppPage[nPage + y][x + nX]);
}
}
}


BOOL EEPROM_ReadByte(int nAddr,BYTE* pcbData)
{
I2CHW_1_bWriteBytes(0x50,(BYTE*)&nAddr,2,I2CHW_1_NoStop);
while(!(I2CHW_1_bReadI2CStatus() & I2CHW_WR_COMPLETE))
{
}
I2CHW_1_fReadBytes(0x50,pcbData,1,I2CHW_1_CompleteXfer);
while(!(I2CHW_1_bReadI2CStatus() & I2CHW_RD_COMPLETE))
{
}

return TRUE;
}

BOOL EEPROM_WriteByte(int nAddr,BYTE cbData,BOOL bVerifyAndRetry)
{
BYTE pcbWrite[3];

*(int*)pcbWrite = nAddr;
pcbWrite[2] = cbData;

I2CHW_1_bWriteBytes(0x50,pcbWrite,3,I2CHW_1_CompleteXfer);
while(!(I2CHW_1_bReadI2CStatus() & I2CHW_WR_COMPLETE))
{
}
I2CHW_1_ClrWrStatus();

{
//wait 10msec
int i;
for(i = 0; i < 1500; i++) //about 23msec
{}
}


if(bVerifyAndRetry == FALSE)
return TRUE;

{
BYTE cbTmp;

//verify
EEPROM_ReadByte(nAddr,&cbTmp);
if(cbTmp == cbData)
return TRUE;

//retry
EEPROM_WriteByte(nAddr,cbData,FALSE);

//verify
EEPROM_ReadByte(nAddr,&cbTmp);

return (cbTmp == cbData);
}
}

BOOL EEPROM_Read(int nAddr,BYTE* pcbData,int nSize)
{
I2CHW_1_bWriteBytes(0x50,(BYTE*)&nAddr,2,I2CHW_1_NoStop);
while(!(I2CHW_1_bReadI2CStatus() & I2CHW_WR_COMPLETE))
{
}
I2CHW_1_ClrWrStatus();

I2CHW_1_fReadBytes(0x50,pcbData,nSize,I2CHW_1_CompleteXfer);
while(!(I2CHW_1_bReadI2CStatus() & I2CHW_RD_COMPLETE))
{
}
I2CHW_1_ClrRdStatus();

return TRUE;
}

BOOL EEPROM_Write(int nAddr,const BYTE* pcbData,int nSize,BOOL bVerifyAndRetry)
{
int i;
BOOL ret;

for(i = 0; i < nSize; i++)
{
ret = EEPROM_WriteByte(nAddr + i,pcbData[i],bVerifyAndRetry);
if(bVerifyAndRetry && ret == FALSE)
return FALSE;
}

return TRUE;
}


void WriteGraphicsToEEPROM(int nStartAddr)
{
int i;
int nTmp;
int nPage;
BOOL bSuccess;

const char* ppPage[] = {pcbPage01,pcbPage02,pcbPage03,pcbPage04,pcbPage05,pcbPage06,pcbPage07,pcbPage08,pcbPage09
,pcbPage10,pcbPage11,pcbPage12,pcbPage13,pcbPage14,pcbPage15,pcbPage16,pcbPage17,pcbPage18,pcbPage19
,pcbPage20,pcbPage21,pcbPage22,pcbPage23,pcbPage24,pcbPage25};

//busy LED ON
PRT1DR |= 0x04;

//write
nTmp = nStartAddr;
bSuccess = TRUE;
for(nPage = 0; nPage < 25; nPage++)
{
for(i = 0; i < 320; i+=16)
{
bSuccess = EEPROM_Write(nTmp,(BYTE*)&(ppPage[nPage][i]),16,TRUE);
if(bSuccess == FALSE)
break;

nTmp += 16;
}
if(bSuccess == FALSE)
break;
}

//busy LED OFF
PRT1DR &= ~0x04;

while(bSuccess == FALSE)
{
PRT1DR |= 0x04;
//460msec
for(i = 0; i < 30000; i++)
{
}

PRT1DR &= ~0x04;
//460msec
for(i = 0; i < 30000; i++)
{
}
}
}


//
// nX : 0 - 197(=320-122)
// nPage : 0 - 20(=24-4)
//
void PrintGraphicsFromEEPROM(int nX,int nPage)
{
int x;
int y;
BYTE pcbPixelData[122];

if(nX > 297 || nX < 0)
return;
if(nPage > 20 || nPage < 0)
return;

for(y = 0; y < 4; y++)
{
//read
EEPROM_Read(320 * (nPage + y) + nX,pcbPixelData,122);

GLCD_RW_Data(TRUE,TRUE,TRUE,TRUE,GLCD_CMD_PAGE0 + y);
GLCD_RW_Data(TRUE,TRUE,TRUE,TRUE,GLCD_CMD_COL_ADDR);
for(x = 0; x < 122; x++)
{
GLCD_RW_Data(TRUE,(x < 62),(x >= 62),FALSE,0xFF ^ pcbPixelData[x]);
}
}
}


#define SW_PORT PRT1DR
#define SW_A 0x10
#define SW_B 0x40
#define SW_PUSH 0x08

void main()
{
Timer8_1_DisableInt();
Timer8_1_Start();


I2CHW_1_EnableMstr();
I2CHW_1_EnableInt();
M8C_EnableGInt;

// I2Cm_1_Start();


// WriteGraphicsToEEPROM(0);
// while(1)
{
}

GLCD_Start();

// PrintGraphics(0,0);
PrintGraphicsFromEEPROM(0,0);

{
int nX;
int nPage;

nX = 0;
nPage = 0;
SW_PORT = SW_A | SW_B; //Enable Pull-UP
while(1)
{
while(SW_PORT & SW_A)
{
}

if(SW_PORT & SW_PUSH)
{
if(SW_PORT & SW_B)
nPage--;
else
nPage++;

if(nPage < 0)
nPage = 0;
if(nPage > 20)
nPage = 20;
}
else
{
if(SW_PORT & SW_B)
nX -= 8;
else
nX += 8;

if(nX < 0)
nX = 0;
if(nX > 197)
nX = 197;
}

// PrintGraphics(nX,nPage);
PrintGraphicsFromEEPROM(nX,nPage);

while(!(SW_PORT & SW_A))
{
}
}
}

/*
GLCD_RW_Data(TRUE,TRUE,FALSE,FALSE,0x0A);
GLCD_RW_Data(TRUE,TRUE,FALSE,FALSE,0x0A);
GLCD_RW_Data(TRUE,TRUE,FALSE,FALSE,0x0A);
GLCD_RW_Data(TRUE,TRUE,FALSE,FALSE,0x0A);
GLCD_RW_Data(TRUE,TRUE,FALSE,FALSE,0x0A);
GLCD_RW_Data(TRUE,TRUE,FALSE,FALSE,0xA0);
GLCD_RW_Data(TRUE,TRUE,FALSE,FALSE,0xA0);
GLCD_RW_Data(TRUE,TRUE,FALSE,FALSE,0xA0);
GLCD_RW_Data(TRUE,TRUE,FALSE,FALSE,0xA0);
GLCD_RW_Data(TRUE,TRUE,FALSE,FALSE,0xA0);
GLCD_RW_Data(TRUE,TRUE,FALSE,FALSE,0xA0);
GLCD_RW_Data(TRUE,TRUE,FALSE,FALSE,0x0A);
GLCD_RW_Data(TRUE,TRUE,FALSE,FALSE,0x0A);
GLCD_RW_Data(TRUE,TRUE,FALSE,FALSE,0x0A);
GLCD_RW_Data(TRUE,TRUE,FALSE,FALSE,0x0A);
GLCD_RW_Data(TRUE,TRUE,FALSE,FALSE,0x0A);
GLCD_RW_Data(TRUE,TRUE,FALSE,FALSE,0x0A);


GLCD_PutPixel(120,40,TRUE);
GLCD_PutPixel(0,3,TRUE);
GLCD_PutPixel(2,7,TRUE);

{
int x;
int y;

for(x = 0; x < 122; x+= 5)
{
for(y = 0; y < 32; y+= 5)
{
GLCD_PutPixel(x,y,TRUE);
}
}
}
*/
}






_DSC9065.JPG
これが今回利用したEEPROMの「AT24C1024」。

CPUと2線で接続することにより使える。容量は1Mbit(128Kbytes)と大容量。もちろん不揮発メモリーなので電源を切っても記録内容は失われない。データシートによると40年持つそうだ。秋月電子で600円程度で販売されている。

_DSC9063.JPG
使用するポートが多くなり配線ミスが生じやすい状態になってきたので注意する。
EEPROM「AT24C1024」の4ピンをGND、5ピンをポート15、6ピンをポート17、8ピンをVCCに接続する。さらに5ピンと6ピンは2.2kΩ程度の抵抗を介してVCCへ接続しておく。
ロータリーエンコーダーは前回から変えた。A端子をポート14に、B端子をポート16に接続する。
また、EEPROMへの書き込みの確認のためLEDを利用した。ポート12をLED4の端子に接続する。

これでEEPROMに書き込んだドットデータがグラフィックスLCDに表示され、ロータリーエンコーダ-で上下左右に動かせるようになった。






ちなみにEEPROMをPSoCで利用するときは注意が必要だ。

	I2Cm_1_fSendStart(0x50,I2Cm_1_WRITE);
	I2Cm_1_fWrite((nAddr >> 8) & 0xFF);
	I2Cm_1_fWrite(nAddr & 0xFF);
	I2Cm_1_fWrite(cbData);
	I2Cm_1_SendStop();

	int		i;

//Write test
I2Cm_1_fSendStart(0x50,I2Cm_1_WRITE);
I2Cm_1_fWrite((nAddr >> 8) & 0xFF);
I2Cm_1_fWrite(nAddr & 0xFF);

for(i = 0; i < nSize; i++)
I2Cm_1_fWrite(pcbData[i]);

I2Cm_1_SendStop();



のようなソースコードでは書き込みができない。実際には書き込みができると"こともある"が、絶対に成功するというわけではないようだ。確実に書き込むには以下のように1度に必要なバッファを渡す必要があった。

	BYTE	pcbWrite[3];

*(int*)pcbWrite = nAddr;
pcbWrite[2] = cbData;

I2CHW_1_bWriteBytes(0x50,pcbWrite,3,I2CHW_1_CompleteXfer);




カテゴリー「電子工作」 のエントリー