Sim mbed
/
NegiLCD
Revision 0:be40e5b921a2, committed 2009-12-02
- Comitter:
- Sim
- Date:
- Wed Dec 02 13:14:22 2009 +0000
- Commit message:
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
mbed.bld | Show annotated file Show diff for this revision Revisions of this file |
diff -r 000000000000 -r be40e5b921a2 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Wed Dec 02 13:14:22 2009 +0000 @@ -0,0 +1,180 @@ +// AD-12864-SPI test program +// About AD-12864-SPI, see http://www.aitendo.co.jp/product/1622. + +// Pin allocation +// 1 p21 #CS1 with 10k ohm pull-up +// 2 p22 #RESET with 10k ohm pull-up +// 3 p23 A0 ... 0:command 1:data +// 4 p13 SCK +// 5 p11 MOSI +// 6 Vdd +// 7 Vss +// 8 NC LED_A + +#include "mbed.h" + +DigitalOut cs(p21); +DigitalOut rst(p22); +DigitalOut a0(p23); +SPI spi(p11, p12, p13); // mosi, miso, sclk + +void regwrite(unsigned char c){ + cs = a0 = 0; + spi.write(c); + cs = 1; +} + +void datawrite(unsigned char c){ + cs = 0; + a0 = 1; + spi.write(c); + cs = 1; +} + +// set position (x, 8*y) +void locate(int x, int y){ + regwrite(0xb0 | (y & 0x0f)); // Page Address Set (see 2.4.3) + regwrite(0x10 | (x >> 4 & 0x0f)); // Column Address Set (see 2.4.4) + regwrite(x & 0x0f); +} + +void cls(void){ + int x, y; + for(y = 0; y < 8; y++){ + locate(0, y); + for(x = 0; x < 128; x++) datawrite(0x00); + } +} + +void plot(int x, int y){ + locate(x, y >> 3); + datawrite(1 << (y & 7)); +} + +void init(){ + spi.format(8,0); // nazo + spi.frequency(10000000); // modify later + + // reset + wait_ms(200); + rst = 0; + wait_ms(200); + rst = 1; + + // initialize sequence + regwrite(0xaf); // display on (see 2.4.1) + regwrite(0x2f); // power control set (see 2.4.16) + regwrite(0x81); // set electronic volume mode (see 2.4.18) +// regwrite(0x1f); // electronic volume data 00-3f + regwrite(0x00); // electronic volume data 00-3f + regwrite(0x27); // V5 Volatge Regulator Internal Resister Ratio Set (see 2.4.17) + regwrite(0xa2); // LCD Bias Set ... 1/9 bias (see 2.4.11) + regwrite(0xc8); // Common Output Mode Select ... Reverse (see 2.4.15) + regwrite(0xa0); // ADC Select ... Normal (see 2.4.8) + regwrite(0xa4); // Display All Points ON/OFF ... normal (see 2.4.10) + regwrite(0xa6); // Display Normal/Reverse ... normal (see 2.4.9) + regwrite(0xac); // Static Indicator ... off (see 2.4.19) + regwrite(0x00); // off + regwrite(0x40); // Display Strat Line Set ... 0 (see 2.4.2) + regwrite(0xe0); // Write Mode Set +} + +// miku1.bmp 75x64 +const unsigned char miku1[75*8] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x64,0x08,0xf0,0x80,0x20,0xc8,0x90,0x28,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x40,0x60,0x50,0xa0,0x20,0x40,0xa0,0x00,0xe0,0x00,0x20,0xc0,0x00,0x80,0xc0,0xa0,0x40,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x06,0x08,0x17,0x2a,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0xd8,0x3e,0xc5,0xba,0x21,0xab,0x04,0x00,0x03,0x3a,0x44,0xfb,0x00,0x07,0x08,0x75,0x83,0x56,0xad,0x1a,0xe4,0x89,0x22,0x8c,0x30,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x44,0xe0,0xe0,0xe0,0xe0,0xf0,0xcc,0xd1,0xbf,0xc0,0x3f,0xc0,0x03,0x00,0x82,0x10,0x10,0x10,0x00,0xf0,0x01,0x02,0x01,0x04,0x03,0x40,0xdd,0x32,0xf4,0x3f,0x3f,0x1c,0xe2,0x0c,0xf1,0x06,0xd8,0x20,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xdf,0x3f,0x5f,0xbf,0xbf,0xbf,0xbf,0x3f,0xff,0xbf,0x3f,0x6f,0x0a,0xc2,0x74,0x94,0x74,0xc8,0xef,0x10,0x7c,0x94,0x0c,0x43,0x04,0xc3,0x01,0x00,0x00,0x00,0x00,0xdb,0x22,0x94,0x63,0x8c,0x31,0xc6,0x18,0xe0,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x4a,0x94,0x61,0x9e,0x61,0x9e,0x62,0x9c,0xe3,0xbc,0xcb,0x18,0xd6,0xa9,0xd6,0xa1,0xbe,0x49,0x92,0x0c,0xd1,0x2e,0xd1,0xff,0xff,0xff,0xff,0xfe,0xe0,0x80,0x00,0x00,0xff,0x20,0xca,0x15,0x4a,0xb0,0x45,0x12,0xed,0x12,0xe8,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x52,0xbc,0x02,0xf5,0x00,0xff,0x00,0xff,0x00,0xff,0x04,0x5b,0xf7,0x1f,0x2f,0x5f,0x5f,0x7f,0xbe,0xbd,0xba,0x3c,0x7f,0x3c,0x1f,0xff,0xbf,0xff,0x3f,0xbf,0x3f,0x3f,0xee,0x2f,0xc8,0x32,0x84,0x29,0x54,0x81,0x7e,0x81,0x7c,0x83,0x7c,0xab,0x40,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x16,0x48,0xa3,0x5c,0xa3,0x4c,0xb3,0x4c,0x33,0x0c,0x0b,0x00,0x00,0x01,0xff,0xff,0xff,0xff,0xf4,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x01,0x00,0x03,0x3e,0xe0,0x0d,0xd0,0x25,0xda,0x25,0xda,0x25,0xda,0xa5,0x1a,0x01,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x02,0x01,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x0f,0x1f,0x1f,0x0f,0x04,0x1f,0x1f,0x1f,0x1f,0x0f,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x02,0x3f,0x28,0x17,0x08,0x07,0x02,0x00,0x00,0x00,0x00, +}; + +// miku2.bmp 75x64 +const unsigned char miku2[75*8] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x40,0x60,0x50,0xa0,0x20,0x40,0xa0,0x00,0xe0,0x00,0x20,0xc0,0x00,0x80,0xc0,0xa0,0x40,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x80,0x00,0x80,0x40,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0xd8,0x3e,0xc5,0xba,0x21,0xab,0x04,0x00,0x03,0x3a,0x44,0xfb,0x00,0x07,0x08,0x75,0x83,0x56,0xad,0x1a,0xe4,0x89,0x22,0x8c,0x30,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x01,0x02,0x34,0x41,0x15,0x2a,0x51,0x0e,0x30,0x0c,0x10,0x28,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x20,0x00,0x40,0xf0,0xf8,0xf8,0xfc,0xfc,0xfc,0xfc,0xf1,0xff,0xc0,0x3f,0xc0,0x03,0x00,0x82,0x10,0x10,0x10,0x00,0xf0,0x01,0x02,0x01,0x04,0x03,0x40,0xdd,0x32,0xf4,0x3f,0x3f,0x1c,0xe2,0x0c,0xf1,0x06,0xd8,0x20,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x83,0x33,0x47,0x97,0x6f,0x97,0x6f,0x8f,0x5f,0xbf,0x0f,0x27,0x02,0xc6,0x70,0x94,0x74,0xc8,0xef,0x10,0x7c,0x94,0x0c,0x43,0x04,0xc3,0x01,0x00,0x00,0x00,0x00,0xdb,0x22,0x94,0x63,0x8c,0x31,0xc6,0x18,0xe0,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x4a,0x95,0x60,0x9f,0x60,0x9f,0x60,0x9f,0xe0,0xbf,0xca,0x18,0xd6,0xa9,0xd6,0xa1,0xbe,0x49,0x92,0x0c,0xd1,0x2e,0xd1,0xff,0xff,0xff,0xff,0xfe,0xe0,0x80,0x00,0x00,0xff,0x20,0xca,0x15,0x4a,0xb0,0x45,0x12,0xed,0x12,0xe8,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x52,0xbc,0x02,0xf5,0x00,0xff,0x00,0xff,0x00,0xff,0x04,0x5b,0xf7,0x1f,0x2f,0x5f,0x5f,0x7f,0xbe,0xbd,0xba,0x3c,0x7f,0x3c,0x1f,0xff,0xbf,0xff,0x3f,0xbf,0x3f,0x3f,0xee,0x2f,0xc8,0x32,0x84,0x29,0x54,0x81,0x7e,0x81,0x7c,0x83,0x7c,0xab,0x40,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x16,0x48,0xa3,0x5c,0xa3,0x4c,0xb3,0x4c,0x33,0x0c,0x0b,0x00,0x00,0x01,0xff,0xff,0xff,0xff,0xf4,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x01,0x00,0x03,0x3e,0xe0,0x0d,0xd0,0x25,0xda,0x25,0xda,0x25,0xda,0xa5,0x1a,0x01,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x02,0x01,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x0f,0x1f,0x1f,0x0f,0x04,0x1f,0x1f,0x1f,0x1f,0x0f,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x02,0x3f,0x28,0x17,0x08,0x07,0x02,0x00,0x00,0x00,0x00, +}; + +// miku3.bmp 75x64 +const unsigned char miku3[75*8] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x40,0x60,0x50,0xa0,0x20,0x40,0xa0,0x00,0xe0,0x00,0x20,0xc0,0x00,0x80,0xc0,0xa0,0x40,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0xd8,0x3e,0xc5,0xba,0x21,0xab,0x04,0x00,0x03,0x3a,0x44,0xfb,0x00,0x07,0x08,0x75,0x83,0x56,0xad,0x1a,0xe4,0x89,0x22,0x8c,0x30,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x30,0xcc,0x11,0x7f,0xc0,0x3f,0xc0,0x03,0x00,0x82,0x10,0x10,0x10,0x00,0xf0,0x01,0x02,0x01,0x04,0x03,0x40,0xdd,0x32,0xf4,0x3f,0x3f,0x1c,0xe2,0x0c,0xf1,0x06,0xd8,0x20,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xc0,0xe8,0xc2,0xdd,0xe0,0xdf,0xe0,0xdf,0xe0,0xff,0xa1,0x03,0x82,0x42,0xf4,0x24,0x74,0xc8,0x2f,0xd0,0x3c,0x94,0x0c,0x43,0x04,0xc3,0x01,0x00,0x00,0x00,0x00,0xdb,0x22,0x94,0x63,0x8c,0x31,0xc6,0x18,0xe0,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x25,0x9f,0x7f,0x7f,0xff,0x7f,0xbf,0x3f,0xcf,0xff,0x37,0xcb,0x1d,0xd3,0xac,0xd3,0xac,0xb1,0x4f,0x90,0x0d,0xd0,0x2f,0xd0,0xff,0xff,0xff,0xff,0xfe,0xe0,0x80,0x00,0x00,0xff,0x20,0xca,0x15,0x4a,0xb0,0x45,0x12,0xed,0x12,0xe8,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0xc0,0x20,0xc0,0x20,0xa0,0x40,0x90,0x70,0x00,0x68,0x00,0x00,0x00,0x00,0x00,0x00,0x54,0xbb,0x44,0x89,0x32,0xcd,0x32,0xcd,0x32,0xcd,0x36,0x4b,0xf7,0x1f,0x2f,0x5f,0x5f,0x7f,0xbe,0xbd,0xba,0x3c,0x7f,0x3c,0x1f,0xff,0xbf,0xff,0x3f,0xbf,0x3f,0x3f,0xee,0x2f,0xc8,0x32,0x84,0x29,0x54,0x81,0x7e,0x81,0x7c,0x83,0x7c,0xab,0x40,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x02,0x00,0x02,0x01,0x04,0x08,0x03,0x04,0x02,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0e,0x51,0xa6,0x58,0xa3,0x4c,0xb3,0x4c,0x33,0x0c,0x0b,0x00,0x00,0x01,0xff,0xff,0xff,0xff,0xf4,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x01,0x00,0x03,0x3e,0xe0,0x0d,0xd0,0x25,0xda,0x25,0xda,0x25,0xda,0xa5,0x1a,0x01,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x02,0x01,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x0f,0x1f,0x1f,0x0f,0x04,0x1f,0x1f,0x1f,0x1f,0x0f,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x02,0x3f,0x28,0x17,0x08,0x07,0x02,0x00,0x00,0x00,0x00, +}; + +// miku4.bmp 75x64 +const unsigned char miku4[75*8] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x40,0x60,0x50,0xa0,0x20,0x40,0xa0,0x00,0xe0,0x00,0x20,0xc0,0x00,0x80,0xc0,0xa0,0x40,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0xd8,0x3e,0xc5,0xba,0x21,0xab,0x04,0x00,0x03,0x3a,0x44,0xfb,0x00,0x07,0x08,0x75,0x83,0x56,0xad,0x1a,0xe4,0x89,0x22,0x8c,0x30,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x30,0xcc,0x11,0x7f,0xc0,0x3f,0xc0,0x03,0x00,0x82,0x10,0x10,0x10,0x00,0xf0,0x01,0x02,0x01,0x04,0x03,0x40,0xdd,0x32,0xf4,0x3f,0x3f,0x1c,0xe2,0x0c,0xf1,0x06,0xd8,0x20,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0xc0,0xe0,0xf8,0xe2,0xfd,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe1,0x83,0x22,0xc2,0x64,0x94,0x74,0xc8,0xef,0x10,0x7c,0x94,0x0c,0x43,0x04,0xc3,0x01,0x00,0x00,0x00,0x00,0xdb,0x22,0x94,0x63,0x8c,0x31,0xc6,0x18,0xe0,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x80,0x40,0x00,0xc0,0x00,0xe0,0x00,0x40,0x00,0x00,0x00,0x02,0x00,0x00,0x02,0x00,0x00,0xa1,0x4f,0x1f,0xdf,0x3f,0xdf,0x3f,0xcf,0x2f,0xf7,0xcf,0x9b,0x2b,0xd3,0xac,0xd3,0xac,0xb1,0x4e,0x91,0x0c,0xd1,0x2e,0xd1,0xff,0xff,0xff,0xff,0xfe,0xe0,0x80,0x00,0x00,0xff,0x20,0xca,0x15,0x4a,0xb0,0x45,0x12,0xed,0x12,0xe8,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x23,0xd0,0x0a,0xd5,0x32,0x05,0x0c,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x54,0xb8,0x47,0x88,0x33,0xcc,0x33,0xc4,0x3d,0xc3,0x3c,0x47,0xf7,0x1f,0x2f,0x5f,0x5f,0x7f,0xbe,0xbd,0xba,0x3c,0x7f,0x3c,0x1f,0xff,0xbf,0xff,0x3f,0xbf,0x3f,0x3f,0xee,0x2f,0xc8,0x32,0x84,0x29,0x54,0x81,0x7e,0x81,0x7c,0x83,0x7c,0xab,0x40,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0e,0x51,0xa6,0x58,0xa3,0x4c,0xb3,0x4c,0x33,0x0c,0x0b,0x00,0x00,0x01,0xff,0xff,0xff,0xff,0xf4,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x01,0x00,0x03,0x3e,0xe0,0x0d,0xd0,0x25,0xda,0x25,0xda,0x25,0xda,0xa5,0x1a,0x01,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x02,0x01,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x0f,0x1f,0x1f,0x0f,0x04,0x1f,0x1f,0x1f,0x1f,0x0f,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x02,0x3f,0x28,0x17,0x08,0x07,0x02,0x00,0x00,0x00,0x00, +}; + +// miku5.bmp 75x64 +const unsigned char miku5[75*8] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x40,0x60,0x50,0xa0,0x20,0x40,0xa0,0x00,0xe0,0x00,0x20,0xc0,0x00,0x80,0xc0,0xa0,0x40,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0xd8,0x3e,0xc5,0xba,0x21,0xab,0x04,0x00,0x03,0x3a,0x44,0xfb,0x00,0x07,0x08,0x75,0x83,0x56,0xad,0x1a,0xe4,0x89,0x22,0x8c,0x30,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x30,0xcc,0x11,0x7f,0xc0,0x3f,0xc0,0x03,0x00,0x82,0x10,0x10,0x10,0x00,0xf0,0x01,0x02,0x01,0x04,0x03,0x40,0xdd,0x32,0xf4,0x3f,0x3f,0x1c,0xe2,0x0c,0xf1,0x06,0xd8,0x20,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x40,0x20,0x80,0x60,0x80,0x60,0x80,0x60,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x20,0x00,0x10,0x20,0x00,0x50,0xf0,0xf8,0xf8,0xfa,0xfd,0xf0,0xff,0xf0,0xff,0xf0,0xef,0xe1,0xa3,0x82,0x42,0xf4,0x24,0x74,0xc8,0x2f,0xd0,0x3c,0x94,0x0c,0x43,0x04,0xc3,0x01,0x00,0x00,0x00,0x00,0xdb,0x22,0x94,0x63,0x8c,0x31,0xc6,0x18,0xe0,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x0c,0x10,0x04,0x0a,0x15,0x08,0x07,0x00,0x02,0x01,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x21,0xcf,0x17,0x6f,0x9f,0x67,0x9f,0x67,0x9b,0xeb,0xb3,0xcf,0x19,0xd3,0xac,0xd3,0xac,0xb1,0x4f,0x90,0x0d,0xd0,0x2f,0xd0,0xff,0xff,0xff,0xff,0xfe,0xe0,0x80,0x00,0x00,0xff,0x20,0xca,0x15,0x4a,0xb0,0x45,0x12,0xed,0x12,0xe8,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x54,0xb9,0x46,0x11,0xcc,0x33,0xcc,0x33,0xcc,0x33,0x4c,0x57,0xf7,0x1f,0x2f,0x5f,0x5f,0x7f,0xbe,0xbd,0xba,0x3c,0x7f,0x3c,0x1f,0xff,0xbf,0xff,0x3f,0xbf,0x3f,0x3f,0xee,0x2f,0xc8,0x32,0x84,0x29,0x54,0x81,0x7e,0x81,0x7c,0x83,0x7c,0xab,0x40,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0e,0x51,0xa6,0x58,0xa7,0x50,0xaf,0x50,0x2d,0x13,0x0c,0x03,0x00,0x00,0xff,0xff,0xff,0xff,0xf4,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x01,0x00,0x03,0x3e,0xe0,0x0d,0xd0,0x25,0xda,0x25,0xda,0x25,0xda,0xa5,0x1a,0x01,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x02,0x01,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x0f,0x1f,0x1f,0x0f,0x04,0x1f,0x1f,0x1f,0x1f,0x0f,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x02,0x3f,0x28,0x17,0x08,0x07,0x02,0x00,0x00,0x00,0x00, +}; + +// miku6.bmp 75x64 +const unsigned char miku6[75*8] = { + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x40,0x60,0x50,0xa0,0x20,0x40,0xa0,0x00,0xe0,0x00,0x20,0xc0,0x00,0x80,0xc0,0xa0,0x40,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0a,0x00,0x3e,0x00,0x34,0x28,0x43,0x3c,0x41,0xac,0x50,0xa0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0xd8,0x3e,0xc5,0xba,0x21,0xab,0x04,0x00,0x03,0x3a,0x44,0xfb,0x00,0x07,0x08,0x75,0x83,0x56,0xad,0x1a,0xe4,0x89,0x22,0x8c,0x30,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x40,0x80,0xc0,0xc0,0xc0,0xf0,0x8c,0xd1,0x3f,0xc0,0x3f,0xc0,0x03,0x00,0x82,0x10,0x10,0x10,0x00,0xf0,0x01,0x02,0x01,0x04,0x03,0x40,0xdd,0x32,0xf4,0x3f,0x3f,0x1c,0xe2,0x0c,0xf1,0x06,0xd8,0x20,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1f,0x3f,0xff,0x3f,0xff,0x3f,0xff,0x3f,0x7f,0x7f,0xff,0x3d,0x6b,0x0a,0xc2,0x74,0x94,0x74,0xc8,0xef,0x10,0x7c,0x94,0x0c,0x43,0x04,0xc3,0x01,0x00,0x00,0x00,0x00,0xdb,0x22,0x94,0x63,0x8c,0x31,0xc6,0x18,0xe0,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x8a,0x35,0xc0,0x3f,0xc0,0x3f,0x40,0xdd,0xf3,0x34,0xcf,0x18,0xf2,0x8d,0xea,0x91,0x7e,0x09,0xd2,0x0c,0xd1,0x2e,0xd1,0xff,0xff,0xff,0xff,0xfe,0xe0,0x80,0x00,0x00,0xff,0x20,0xca,0x15,0x4a,0xb0,0x45,0x12,0xed,0x12,0xe8,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x52,0xbc,0x02,0xf5,0x00,0xff,0x00,0xff,0x00,0xff,0x04,0x5b,0xf7,0x1f,0x2f,0x5f,0x5f,0x7f,0xbf,0xbe,0xb8,0x3d,0x7e,0x3c,0x1f,0xff,0xbf,0xff,0x3f,0xbf,0x3f,0x3f,0xee,0x2f,0xc8,0x32,0x84,0x29,0x54,0x81,0x7e,0x81,0x7c,0x83,0x7c,0xab,0x40,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x16,0x48,0xa3,0x5c,0xa3,0x4c,0xb3,0x4c,0x33,0x0c,0x0b,0x00,0x00,0x01,0xff,0xff,0xff,0xff,0xf4,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x01,0x00,0x03,0x3e,0xe0,0x0d,0xd0,0x25,0xda,0x25,0xda,0x25,0xda,0xa5,0x1a,0x01,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x02,0x01,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x0f,0x1f,0x1f,0x0f,0x04,0x1f,0x1f,0x1f,0x1f,0x0f,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x02,0x3f,0x28,0x17,0x08,0x07,0x02,0x00,0x00,0x00,0x00, +}; + +const unsigned char *miku[6] = { miku1, miku2, miku3, miku4, miku5, miku6 }; + +void drawmiku(int pic){ + int x, y; + const unsigned char *p = miku[pic]; + + for(y = 0; y < 8; y++){ + locate(53, y); + for(x = 0; x < 75; x++) datawrite(*p++); + } +} + + +int main() { + int pic; + + init(); + cls(); + + pic = 0; + while(1) { + drawmiku(pic); + if(++pic == 6) pic = 0; + + wait_ms(100); + } +}
diff -r 000000000000 -r be40e5b921a2 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Wed Dec 02 13:14:22 2009 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/49a220cc26e0