Page 651 - 완) I MDP 프로젝트 작품 보고서(전체과 1학년)1.6
P. 651

delay_ms(5);

                  instruction_write(0x38);

                  delay_us(100);
                  instruction_write(0x38);

                  instruction_write(0x08);

                  instruction_write(0x06);
                  instruction_write(0x0c);

              }



              void data_write(char data)
              {

                  PORTG = 0xfb;

                  PORTD = data;
                  PORTG = PORTG^0x02;

                  delay_ms(2);

              }



              void instruction_write(char ins)
              {

                  PORTG = 0xfa;
                  PORTD = ins;

                  PORTG = PORTG^0x02;

                  delay_ms(2);
              }




              void lcd_String(char flash str[])
              {

                  char flash *pStr = 0;
                  pStr = &str[0];

                  while (*pStr) data_write(*pStr++);
              }






                                                         -  644  -
   646   647   648   649   650   651   652   653   654   655   656