第3回 メインプログラムについて

今回はプログラムの中身についてです。
実際のプログラムは複雑で分かりづらいと思いますので、
必要最低限のプログラムのみ抜き出しました。
そのままコピペしてPICに書き込んでもらえば、
ひとまずOLEDを動かすことが出来るという内容です。

 

<メインプログラム>
こちらのプログラムをメインプログラムにコピペして下さい。

#include <xc.h>
#include <stdio.h>
#include "test_header.h"

#define _XTAL_FREQ 16000000

#pragma config CPD = OFF, BOREN = OFF, IESO = OFF, FOSC = INTOSC, FCMEN = OFF 
#pragma config MCLRE = ON, WDTE = OFF, CP = OFF, PWRTE = ON, CLKOUTEN = OFF
#pragma config PLLEN = OFF, WRT = OFF, STVREN = OFF, BORV = LO, LVP = OFF 

void i2c_start();
void i2c_stop();
void i2c_write(unsigned char byte);

void oled_ini(void);
void oled_clr(void);

//********************************************************************
void main(void)
{

TRISA = 0b00000000;
TRISB = 0b00010010;
PORTA = 0b00000000;
PORTB = 0b00000000;
ANSELA = 0b00000000;
ANSELB = 0b00000000;
OSCCON = 0b01111100;
SSP1CON1 = 0b00101000;
SSP1STAT = 0b10000000;
SSP1ADD = 0b00100111;

oled_ini();
oled_clr();
//********************************************************************

    unsigned int k;
    
    while(1){
    //****************************************************************
    //*draw image1 ready*//
    i2c_start();
    i2c_write(0x78); // OLED slave address
    i2c_write(0x00); // Control byte Co=0, D/C#=0
    i2c_write(0x20); // Set memory addressing mode
    i2c_write(0x00); // Horizontal addressing mode
    i2c_write(0x21); // Set column address
    i2c_write(0x00); // Column start address 0
    i2c_write(0x7F); // Column end address 127
    i2c_write(0x22); // Set page address
    i2c_write(0x00); // Page start address 0
    i2c_write(0x07); // Page end address 7
    i2c_stop();
    //*draw image1*//
    i2c_start();
    i2c_write(0x78); // OLED slave address
    i2c_write(0x40); // Control byte Co=0, D/C#=1 
    //*image data1*//
    for(k=0; k<1024; k++)
    i2c_write(drawdat[k][0]); 
    i2c_stop();
    __delay_ms(5000);
 
    //*draw image2*//
    i2c_start();
    i2c_write(0x78); // OLED slave address
    i2c_write(0x40); // Control byte Co=0, D/C#=1 
    //*image data2*//
    for(k=0; k<1024; k++)
    i2c_write(drawdat[k][1]); 
    i2c_stop();
    __delay_ms(5000);

    }

}// main
//********************************************************************

//********************************************************************
void oled_ini(void)
{
    i2c_start();
    i2c_write(0x78); // OLED slave address
    i2c_write(0x00); // Control byte Co=0, D/C#=0
    i2c_write(0x8D); // Set charge pump
    i2c_write(0x14); // Enable charge pump
    i2c_write(0x81);
    i2c_write(0x0F);
    i2c_write(0xAF); // Display ON
    i2c_stop();
}
//********************************************************************

//********************************************************************
void oled_clr(void)
{
    unsigned int i;

    i2c_start();
    i2c_write(0x78); // OLED slave address
    i2c_write(0x00); // Control byte Co=0, D/C#=0
   i2c_write(0x20); // Set memory addressing mode
    i2c_write(0x00); // Horizontal addressing mode
    i2c_write(0x21); // Set column address
    i2c_write(0x00); // Column start address 0
    i2c_write(0x7F); // Column end address 127d
    i2c_write(0x22); // Set page address
    i2c_write(0x00); // Page start address 0
    i2c_write(0x07); // Page end address 7d
    i2c_stop();

    i2c_start();
    i2c_write(0x78); // OLED slave address
    i2c_write(0x40); // Control byte Co=0, D/C#=1

    for(i=0; i<1024; i++) // 128culomn * 8page
    i2c_write(0xFF); // filled with 0 (OLED clear)

    i2c_stop();
}
//********************************************************************

//********************************************************************
void i2c_start()
{
    SSP1CON2bits.SEN = 1;
    while(SSP1CON2bits.SEN);
}
//********************************************************************

//********************************************************************
void i2c_stop()
{
    SSP1CON2bits.PEN = 1;
    while(SSP1CON2bits.PEN);
}
//********************************************************************

//********************************************************************
void i2c_write(unsigned char byte)
{
    PIR1bits.SSP1IF = 0;
    SSP1BUF = byte;
    while(!PIR1bits.SSP1IF);
    SSP1CON1bits.CKP = 1;
}
//********************************************************************

 

<ヘッダーファイル>
長いですがファイル名 test_header.h で新規ヘッダーファイルを作成し、
そのままコピペして下さい。
こちらが表示する2枚の画像データになります。

const char drawdat[1024][2]=
{
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x60,0x9F},
{0x60,0x9F},
{0x60,0x9F},
{0x60,0x9F},
{0xF8,0x07},
{0xF8,0x07},
{0x60,0x9F},
{0x60,0x9F},
{0x60,0x9F},
{0x60,0x9F},
{0x60,0x9F},
{0x60,0x9F},
{0x60,0x9F},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0xE0,0x1F},
{0xE0,0x1F},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x40,0xBF},
{0xE0,0x1F},
{0xC0,0x3F},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x30,0xCF},
{0x30,0xCF},
{0x30,0xCF},
{0x30,0xCF},
{0x30,0xCF},
{0x30,0xCF},
{0x60,0x9F},
{0x60,0x9F},
{0x60,0x9F},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x30,0xCF},
{0x30,0xCF},
{0x30,0xCF},
{0x30,0xCF},
{0x30,0xCF},
{0x30,0xCF},
{0x70,0x8F},
{0x60,0x9F},
{0x60,0x9F},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0xC0,0x3F},
{0xC0,0x3F},
{0xC0,0x3F},
{0xC0,0x3F},
{0xF0,0x0F},
{0xF0,0x0F},
{0xC0,0x3F},
{0xC0,0x3F},
{0xC0,0x3F},
{0xE0,0x1F},
{0x70,0x8F},
{0xE0,0x1F},
{0xC0,0x3F},
{0x80,0x7F},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0xF0,0x0F},
{0xF8,0x07},
{0x9C,0x63},
{0x8E,0x71},
{0xDF,0x20},
{0xFF,0x00},
{0x63,0x9C},
{0x3B,0xC4},
{0x1F,0xE0},
{0x07,0xF8},
{0x87,0x78},
{0x86,0x79},
{0xFE,0x01},
{0x78,0x87},
{0x00,0xFF},
{0x00,0xFF},
{0x3F,0xC0},
{0xFF,0x00},
{0xC0,0x3F},
{0x00,0xFF},
{0xC0,0x3F},
{0xF0,0x0F},
{0x20,0xDF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x01,0xFE},
{0x0F,0xF0},
{0xFF,0x00},
{0xF8,0x07},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x06,0xF9},
{0x06,0xF9},
{0x06,0xF9},
{0x03,0xFC},
{0x03,0xFC},
{0x03,0xFC},
{0x83,0x7C},
{0x83,0x7C},
{0xC3,0x3C},
{0xE7,0x18},
{0x7E,0x81},
{0x3C,0xC3},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x80,0x7F},
{0x83,0x7C},
{0xC3,0x3C},
{0xE3,0x1C},
{0x63,0x9C},
{0x33,0xCC},
{0x1B,0xE4},
{0x1F,0xE0},
{0xFF,0x00},
{0xF7,0x08},
{0x03,0xFC},
{0x02,0xFD},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0xE0,0x1F},
{0xF0,0x0F},
{0x38,0xC7},
{0x18,0xE7},
{0xFF,0x00},
{0xFF,0x00},
{0x0C,0xF3},
{0x8C,0x73},
{0x0C,0xF3},
{0x0C,0xF3},
{0x0C,0xF3},
{0x98,0x67},
{0xF9,0x06},
{0xF3,0x0C},
{0x01,0xFE},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x01,0xFE},
{0x01,0xFE},
{0x01,0xFE},
{0x01,0xFE},
{0x00,0xFF},
{0x00,0xFF},
{0x03,0xFC},
{0x03,0xFC},
{0x03,0xFC},
{0x03,0xFC},
{0x01,0xFE},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x03,0xFC},
{0x03,0xFC},
{0x03,0xFC},
{0x01,0xFE},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x03,0xFC},
{0x03,0xFC},
{0x03,0xFC},
{0x03,0xFC},
{0x01,0xFE},
{0x01,0xFE},
{0x01,0xFE},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x01,0xFE},
{0x03,0xFC},
{0x01,0xFE},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x01,0xFE},
{0x03,0xFC},
{0x03,0xFC},
{0x03,0xFC},
{0x03,0xFC},
{0x03,0xFC},
{0x00,0xFF},
{0x00,0xFF},
{0x01,0xFE},
{0x01,0xFE},
{0x03,0xFC},
{0x03,0xFC},
{0x03,0xFC},
{0x01,0xFE},
{0x00,0xFF},
{0x01,0xFE},
{0x03,0xFC},
{0x03,0xFC},
{0x03,0xFC},
{0x03,0xFC},
{0x01,0xFE},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x80,0x7F},
{0x80,0x7F},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0xC0,0x3F},
{0xC0,0x3F},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x80,0x7F},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x80,0x7F},
{0x80,0x7F},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x80,0x7F},
{0x80,0x7F},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x0C,0xF3},
{0x0C,0xF3},
{0xFC,0x03},
{0xFF,0x00},
{0x3F,0xC0},
{0x0C,0xF3},
{0x0C,0xF3},
{0x0C,0xF3},
{0xFC,0x03},
{0xFA,0x05},
{0x07,0xF8},
{0x1E,0xE1},
{0x7C,0x83},
{0xF0,0x0F},
{0xC0,0x3F},
{0x00,0xFF},
{0x00,0xFF},
{0x18,0xE7},
{0x9B,0x64},
{0xDB,0x24},
{0xDB,0x24},
{0xDB,0x24},
{0xDB,0x24},
{0xDF,0x20},
{0xFF,0x00},
{0xFB,0x04},
{0xFB,0x04},
{0x9B,0x64},
{0x1B,0xE4},
{0x18,0xE7},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x70,0x8F},
{0xF0,0x0F},
{0xD8,0x27},
{0xDC,0x23},
{0x8C,0x73},
{0x06,0xF9},
{0x07,0xF8},
{0x03,0xFC},
{0x03,0xFC},
{0x01,0xFE},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0xFE,0x01},
{0xFF,0x00},
{0x01,0xFE},
{0xC0,0x3F},
{0x8C,0x73},
{0x0C,0xF3},
{0x0C,0xF3},
{0x0C,0xF3},
{0x0C,0xF3},
{0xFF,0x00},
{0xFF,0x00},
{0x0C,0xF3},
{0x0C,0xF3},
{0x0C,0xF3},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0xC0,0x3F},
{0xE3,0x1C},
{0x43,0xBC},
{0x03,0xFC},
{0x03,0xFC},
{0x03,0xFC},
{0x07,0xF8},
{0x0F,0xF0},
{0x07,0xF8},
{0x07,0xF8},
{0x03,0xFC},
{0x02,0xFD},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x08,0xF7},
{0x1C,0xE3},
{0x0F,0xF0},
{0x07,0xF8},
{0x09,0xF6},
{0x1C,0xE3},
{0x18,0xE7},
{0x18,0xE7},
{0x1C,0xE3},
{0x0F,0xF0},
{0x03,0xFC},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x07,0xF8},
{0x0F,0xF0},
{0x1D,0xE2},
{0x18,0xE7},
{0x18,0xE7},
{0x18,0xE7},
{0x18,0xE7},
{0x18,0xE7},
{0x19,0xE6},
{0x19,0xE6},
{0x18,0xE7},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x01,0xFE},
{0x01,0xFE},
{0x03,0xFC},
{0x07,0xF8},
{0x0E,0xF1},
{0x0C,0xF3},
{0x1C,0xE3},
{0x08,0xF7},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x03,0xFC},
{0x0F,0xF0},
{0x0F,0xF0},
{0x03,0xFC},
{0x00,0xFF},
{0x00,0xFF},
{0x08,0xF7},
{0x1C,0xE3},
{0x0E,0xF1},
{0x07,0xF8},
{0x03,0xFC},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x03,0xFC},
{0x07,0xF8},
{0x0E,0xF1},
{0x0C,0xF3},
{0x0C,0xF3},
{0x0C,0xF3},
{0x0C,0xF3},
{0x0C,0xF3},
{0x0C,0xF3},
{0x0C,0xF3},
{0x0C,0xF3},
{0x0C,0xF3},
{0x0C,0xF3},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF},
{0x00,0xFF}
};

成功すれば、トップ画像の写真のような文字が表示されます。

プログラムの中身についての解説も今回書く予定でしたが、
プログラムだけでとても長くなってしまいましたので
次回、プログラムの解説記事にしようと思います。

 

関連記事はこちらのリンクからどうぞ♪
PICマイコンでOLED制御に挑む! 第1回
PICマイコンでOLED制御に挑む! 第2回
PICマイコンでOLED制御に挑む! 第3回
PICマイコンでOLED制御に挑む! 第4回
PICマイコンでOLED制御に挑む! 第5回