いろいろ、注意
- UNOでの予定は、未定
プログラム
オンラインコンパイラ paiza
#include <iostream>
using namespace std;
int main(void){
// Your code here!
unsigned char font[] = {
0x80,
0x40,
0x20,
0x10,
0x08,
0x04,
0x02,
0x01
};
unsigned char font2[16*2];
for(int i=0;i<8;i++){
int s = 0;
int al = font[i];
s = s |(0b1000000000000000 & (al<<8));
s = s |(0b0010000000000000 & (al<<7));
s = s |(0b0000100000000000 & (al<<6));
s = s |(0b0000001000000000 & (al<<5));
s = s |(0b0000000010000000 & (al<<4));
s = s |(0b0000000000100000 & (al<<3));
s = s |(0b0000000000001000 & (al<<2));
s = s |(0b0000000000000010 & (al<<1));
s = s | (s>>1);
font2[i*4+0] = s >> 8;
font2[i*4+1] = s & 0xff;
font2[i*4+2] = font2[i*4+0];
font2[i*4+3] = font2[i*4+1];
printf("[%02x],[%02x]\n",font2[i*4+0],font2[i*4+1]);
printf("[%02x],[%02x]\n",font2[i*4+2],font2[i*4+3]);
}//for
}
[c0],[00]
[c0],[00]
[30],[00]
[30],[00]
[0c],[00]
[0c],[00]
[03],[00]
[03],[00]
[00],[c0]
[00],[c0]
[00],[30]
[00],[30]
[00],[0c]
[00],[0c]
[00],[03]
[00],[03]