#include "mfp_memory_mapped_registers.h" #include <stdlib.h> void delay(int delay); // void waitTillLCDDone(); // void init(); // void start_image(); // void disp_picture(); // void gotoXY(int x, int y); // void send_byte(int command, int data); // void clear_disp(); // int main () { init (); start_image(); delay(1000); } void init(){ unsigned int lcd_cmd[7] = {0x21, 0x13, 0x04, 0xC0, 0x20, 0x0C, 0x08}; unsigned int i; for (i=0; i<7; i++) { send_byte(0x06, lcd_cmd[i]); } } void start_image (){ unsigned int screen[504] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x3F, 0x1F, 0x0F, 0x07, 0x07, 0x03, 0x83, 0x81, 0xC1, 0xC1, 0xE1, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xC1, 0xC1, 0xC1, 0x83, 0x83, 0x07, 0x07, 0x0F, 0x1F, 0x1F, 0x7F, 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, 0x1F, 0x03, 0x01, 0x00, 0x00, 0xE0, 0xF8, 0xFC, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xFC, 0xF0, 0xC0, 0x00, 0x00, 0x01, 0x07, 0x3F, 0xF3, 0xC3, 0x83, 0x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0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, }; unsigned int i; gotoXY(0, 0); for (i=0; i<504; i++) { send_byte(0x7, screen[i]); } disp_picture(); for (i=0; i < 4; i++){ send_byte(0x06, 0x0D); delay(1000); send_byte(0x06, 0x0C); delay(1000); } } void send_byte(int command, int data){ ctrl = command; value = data; send = 1; send = 0; waitTillLCDDone(); waitTillLCDDone(); } void waitTillLCDDone() { do { } while (!ce); } void disp_picture(){ send_byte(0x06, 0x0C); } void clear_disp(){ send_byte(0x06, 0x08); } void gotoXY(int x, int y) { send_byte(0x6, 0x80 | x); // Column. send_byte(0x6, 0x40 | y); // Row. ? } void delay(int delay) { volatile unsigned int j; delay = delay * 5000; for (j = 0; j < (delay); j++) ; // delay }
0xE0となっ、0xE0となっ、0xE0となっ、0xE0となっ、0xE0となっ、0xC1、0xC1、0xC1、0x83の、0x83の、0x07の、0x07の、0x0Fの、0x1Fの、0x1Fの、から0x7F、0xFFで、0xFFで、0xFFで、0xFFで、0xFFを、 #include "mfp_memory_mapped_registers.h" #include <stdlib.h> void delay(int delay); // void waitTillLCDDone(); // void init(); // void start_image(); // void disp_picture(); // void gotoXY(int x, int y); // void send_byte(int command, int data); // void clear_disp(); // int main () { init (); start_image(); delay(1000); } void init(){ unsigned int lcd_cmd[7] = {0x21, 0x13, 0x04, 0xC0, 0x20, 0x0C, 0x08}; unsigned int i; for (i=0; i<7; i++) { send_byte(0x06, lcd_cmd[i]); } } void start_image (){ unsigned int screen[504] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x3F, 0x1F, 0x0F, 0x07, 0x07, 0x03, 0x83, 0x81, 0xC1, 0xC1, 0xE1, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 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x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x00, 0x00, 0x00, 0x00, 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, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, }; unsigned int i; gotoXY(0, 0); for (i=0; i<504; i++) { send_byte(0x7, screen[i]); } disp_picture(); for (i=0; i < 4; i++){ send_byte(0x06, 0x0D); delay(1000); send_byte(0x06, 0x0C); delay(1000); } } void send_byte(int command, int data){ ctrl = command; value = data; send = 1; send = 0; waitTillLCDDone(); waitTillLCDDone(); } void waitTillLCDDone() { do { } while (!ce); } void disp_picture(){ send_byte(0x06, 0x0C); } void clear_disp(){ send_byte(0x06, 0x08); } void gotoXY(int x, int y) { send_byte(0x6, 0x80 | x); // Column. send_byte(0x6, 0x40 | y); // Row. ? } void delay(int delay) { volatile unsigned int j; delay = delay * 5000; for (j = 0; j < (delay); j++) ; // delay }
、から0x7F、0x7Fの、から0x7F、0x7Fの、から0x7F、0x7Fの、から0x7F、0x7Fの、から0x7F、0x7Fの、から0x7F、0x7Fの、から0x7F、0x7Fの、から0x7F、0x7Fの、から0x7F、0x7Fの、から0x7F、0x7Fの、0x7Fの#include "mfp_memory_mapped_registers.h" #include <stdlib.h> void delay(int delay); // void waitTillLCDDone(); // void init(); // void start_image(); // void disp_picture(); // void gotoXY(int x, int y); // void send_byte(int command, int data); // void clear_disp(); // int main () { init (); start_image(); delay(1000); } void init(){ unsigned int lcd_cmd[7] = {0x21, 0x13, 0x04, 0xC0, 0x20, 0x0C, 0x08}; unsigned int i; for (i=0; i<7; i++) { send_byte(0x06, lcd_cmd[i]); } } void start_image (){ unsigned int screen[504] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x3F, 0x1F, 0x0F, 0x07, 0x07, 0x03, 0x83, 0x81, 0xC1, 0xC1, 0xE1, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xC1, 0xC1, 0xC1, 0x83, 0x83, 0x07, 0x07, 0x0F, 0x1F, 0x1F, 0x7F, 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, 0x1F, 0x03, 0x01, 0x00, 0x00, 0xE0, 0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, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, }; unsigned int i; gotoXY(0, 0); for (i=0; i<504; i++) { send_byte(0x7, screen[i]); } disp_picture(); for (i=0; i < 4; i++){ send_byte(0x06, 0x0D); delay(1000); send_byte(0x06, 0x0C); delay(1000); } } void send_byte(int command, int data){ ctrl = command; value = data; send = 1; send = 0; waitTillLCDDone(); waitTillLCDDone(); } void waitTillLCDDone() { do { } while (!ce); } void disp_picture(){ send_byte(0x06, 0x0C); } void clear_disp(){ send_byte(0x06, 0x08); } void gotoXY(int x, int y) { send_byte(0x6, 0x80 | x); // Column. send_byte(0x6, 0x40 | y); // Row. ? } void delay(int delay) { volatile unsigned int j; delay = delay * 5000; for (j = 0; j < (delay); j++) ; // delay }
、0x00に、0x00に、0xFFの、0xFFで、0xFFで、0xFFで、0xFFで、0xFFで、0xFFで、0xFFで、0xFFで、0xFFで、0xFFで、0xFFで、0xFFで、0xFFで、0xFFで、0xFFで、0xFFで、0xFFで、0xFFで#include "mfp_memory_mapped_registers.h" #include <stdlib.h> void delay(int delay); // void waitTillLCDDone(); // void init(); // void start_image(); // void disp_picture(); // void gotoXY(int x, int y); // void send_byte(int command, int data); // void clear_disp(); // int main () { init (); start_image(); delay(1000); } void init(){ unsigned int lcd_cmd[7] = {0x21, 0x13, 0x04, 0xC0, 0x20, 0x0C, 0x08}; unsigned int i; for (i=0; i<7; i++) { send_byte(0x06, lcd_cmd[i]); } } void start_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); } } void send_byte(int command, int data){ ctrl = command; value = data; send = 1; send = 0; waitTillLCDDone(); waitTillLCDDone(); } void waitTillLCDDone() { do { } while (!ce); } void disp_picture(){ send_byte(0x06, 0x0C); } void clear_disp(){ send_byte(0x06, 0x08); } void gotoXY(int x, int y) { send_byte(0x6, 0x80 | x); // Column. send_byte(0x6, 0x40 | y); // Row. ? } void delay(int delay) { volatile unsigned int j; delay = delay * 5000; for (j = 0; j < (delay); j++) ; // delay }
、0xFFで、0xFFで、0xF0が、0xF0が、0xF0が、0xF0が、0xF0が、0xF0が、0xF0が、0xF0が、0xF0が、0xF0が、0xF0が、0xF0が、0xF0が、0xF0が、0xF0が、0xF0が、0xF0が、0xF0が、0xF0が #include "mfp_memory_mapped_registers.h" #include <stdlib.h> void delay(int delay); // void waitTillLCDDone(); // void init(); // void start_image(); // void disp_picture(); // void gotoXY(int x, int y); // void send_byte(int command, int data); // void clear_disp(); // int main () { init (); start_image(); delay(1000); } void init(){ unsigned int lcd_cmd[7] = {0x21, 0x13, 0x04, 0xC0, 0x20, 0x0C, 0x08}; unsigned int i; for (i=0; i<7; i++) { send_byte(0x06, lcd_cmd[i]); } } void start_image (){ unsigned int screen[504] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x3F, 0x1F, 0x0F, 0x07, 0x07, 0x03, 0x83, 0x81, 0xC1, 0xC1, 0xE1, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xC1, 0xC1, 0xC1, 0x83, 0x83, 0x07, 0x07, 0x0F, 0x1F, 0x1F, 0x7F, 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, 0xF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, 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, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, }; unsigned int i; gotoXY(0, 0); for (i=0; i<504; i++) { send_byte(0x7, screen[i]); } disp_picture(); for (i=0; i < 4; i++){ send_byte(0x06, 0x0D); delay(1000); send_byte(0x06, 0x0C); delay(1000); } } void send_byte(int command, int data){ ctrl = command; value = data; send = 1; send = 0; waitTillLCDDone(); waitTillLCDDone(); } void waitTillLCDDone() { do { } while (!ce); } void disp_picture(){ send_byte(0x06, 0x0C); } void clear_disp(){ send_byte(0x06, 0x08); } void gotoXY(int x, int y) { send_byte(0x6, 0x80 | x); // Column. send_byte(0x6, 0x40 | y); // Row. ? } void delay(int delay) { volatile unsigned int j; delay = delay * 5000; for (j = 0; j < (delay); j++) ; // delay }