Friday, January 16, 2015

int DI = 12; int RW = 11; int DB [] = {3, 4, 5, 6, 7, 8, 9, 10}; // use an array of pins required t


Why did the Japanese society, "Wang Sicong" laundromats near me
int DI = 12; int RW = 11; int DB [] = {3, 4, 5, 6, 7, 8, 9, 10}; // use an array of pins required to define the bus int Enable = 2; void LcdCommandWrite (int value) {// define all the pins int i = 0; for (i = DB [0]; i <= DI; i ++) // bus assignment {digitalWrite (i, value & 01); // since 1602 LCD signal recognition is D7-D0 (not D0-D7), here is used to reverse the signal. value >> = 1;} digitalWrite (Enable, LOW); delayMicroseconds (1); digitalWrite (Enable, HIGH); delayMicroseconds (1); // delay 1ms digitalWrite (Enable, LOW); delayMicroseconds (1); // Delay 1ms} void LcdDataWrite (int value) {// define all the pins int i = 0; digitalWrite (DI, HIGH); digitalWrite (RW, LOW); for (i = DB [0]; i <= DB [ 7]; i ++) {digitalWrite (i, value & 01); value >> = 1;} digitalWrite (Enable, LOW); delayMicroseconds (1); digitalWrite (Enable, HIGH); delayMicroseconds (1); digitalWrite laundromats near me (Enable, LOW); delayMicroseconds (1); // delay 1ms} void setup (void) {int i = 0; for (i = Enable; i <= DI; i ++) {pinMode (i, OUTPUT);} delay (100 ); // After a brief pause for LCD control LCD // initialize need LcdCommandWrite (0x38); // set to 8-bit interface, two-line display, 5x7 Text Size delay (64); LcdCommandWrite (0x38); // set to 8-bit interface, two-line display, 5x7 Text Size delay (50); LcdCommandWrite (0x38); // set to 8-bit interface, two-line display, laundromats near me 5x7 Text Size delay (20); LcdCommandWrite laundromats near me (0x06); // // input mode is set to automatically increment, laundromats near me no display shift delay (20); LcdCommandWrite (0x0E); // // open the Display Settings screen, the cursor is displayed, no flicker delay (20); LcdCommandWrite (0x01) ; // clear the screen, the cursor position zero delay (100); LcdCommandWrite (0x80); // // open the Display Settings screen, the cursor is displayed, no flicker delay (20);} void loop (void) {LcdCommandWrite (0x01 ); // clear the screen, the cursor position zero delay (10); LcdCommandWrite (0x80 + 3); delay (10); // write a welcome message LcdDataWrite ('W'); LcdDataWrite ('e'); LcdDataWrite ( 'l'); LcdDataWrite ('c'); LcdDataWrite ('o'); LcdDataWrite ('m'); LcdDataWrite ('e'); LcdDataWrite (''); LcdDataWrite ('t'); LcdDataWrite ('o '); delay (10); LcdCommandWrite (0xc0 + 1); // define the position of the cursor position as the second line of the second delay (10); LcdDataWrite (' N '); LcdDataWrite (' B '); LcdDataWrite (' A '); LcdDataWrite (' 2 '); LcdDataWrite (' 0 '); LcdDataWrite (' 1 '); LcdDataWrite (' 3 '); LcdDataWrite (' P '); LcdDataWrite (' laundromats near me L '); LcdDataWrite (' laundromats near me A '); LcdDataWrite (' Y '); LcdDataWrite (' O '); LcdDataWrite (' F '); LcdDataWrite (' F '); delay (5000); LcdCommandWrite (0x01); // clear the screen, the cursor position to zero delay (10); LcdDataWrite ('G'); LcdDataWrite ('O'); LcdDataWrite (''); LcdDataWrite laundromats near me ('T'); LcdDataWrite ('H'); LcdDataWrite ('U'); LcdDataWrite ('N '); LcdDataWrite laundromats near me (' D '); LcdDataWrite (' E '); LcdDataWrite (' R '); LcdDataWrite (' ');! delay (3000); LcdCommandWrite (0x02); // set the pattern for the new text to replace the old text, no place to display new text unchanged. delay (10); LcdCommandWrite (0x80 + 3); // define the cursor laundromats near me position as the first line of the first four positions delay (10); LcdDataWrite ('M'); LcdDataWrite ('I'); LcdDataWrite ('A') ; LcdDataWrite ('M'); LcdDataWrite ('I'); LcdDataWrite (''); LcdDataWrite ('H'); LcdDataWrite ('E'); LcdDataWrite ('A'); LcdDataWrite ('T'); LcdDataWrite ('!'); delay (5000);}
Send comments


No comments:

Post a Comment