void LCD_d_write(BYTE v) { DelayMs(1); LCDWritePortA(0x80); LCDWritePortB(v); Nop(); Nop(); Nop(); Nop(); LCDWritePortA(0xC0); Nop(); Nop(); Nop(); Nop(); Nop(); Nop(); LCDWritePortA(0); }
void LCD_i_write(BYTE v) { LCDWritePortA(0); DelayMs(1); LCDWritePortB(v); Nop(); Nop(); Nop(); Nop(); LCDWritePortA(0x40); Nop(); Nop(); Nop(); Nop(); Nop(); Nop(); LCDWritePortA(0x00); return; }
void LCD_d_write(uint8_t v) { DELAY_ms(1); LCDWritePortA(0x80); LCDWritePortB(v); Nop(); Nop(); Nop(); Nop(); LCDWritePortA(0xC0); Nop(); Nop(); Nop(); Nop(); Nop(); Nop(); LCDWritePortA(0); }
void LCD_i_write(uint8_t v) { LCDWritePortA(0); DELAY_ms(1); LCDWritePortB(v); Nop(); Nop(); Nop(); Nop(); LCDWritePortA(0x40); Nop(); Nop(); Nop(); Nop(); Nop(); Nop(); LCDWritePortA(0x00); return; }
void LCDInitWrite(BYTE v) { LCDWritePortA(0); LCDWritePortB(v); Nop(); Nop(); Nop(); LCDWritePortA(0x40); Nop(); Nop(); Nop(); Nop(); Nop(); Nop(); Nop(); Nop(); Nop(); LCDWritePortA(0); }
void LCDInitWrite(uint8_t v) { LCDWritePortA(0); LCDWritePortB(v); Nop(); Nop(); Nop(); LCDWritePortA(0x40); Nop(); Nop(); Nop(); Nop(); Nop(); Nop(); Nop(); Nop(); Nop(); LCDWritePortA(0); }
/****************************************************************************** * Function: void LCDInit(void) * * PreCondition: None * * Input: None * * Output: None * * Side Effects: None * * Overview: LCDText[] is blanked, port I/O pin TRIS registers are * configured, and the LCD is placed in the default state * * Note: None *****************************************************************************/ void LCDInit(void) { LCD_CS_TRIS = 0; LCD_CS = 1; DelayMs(10); LCD_RESET_TRIS = 0; LCD_RESET = 0; DelayMs(10); LCD_RESET = 1; // init SPI LCDInitSPI(); // init MCP923S17 Port LCDInitPortA(); // step B LCDInitPortB(); LCDWritePortA(0); // Function Set DelayMs(10); LCDInitWrite(0x3C); DelayMs(10); LCDInitWrite(0x0C); // display off DelayMs(10); LCDInitWrite(0x01); // display clear DelayMs(10); LCDInitWrite(0x0C); // Entry mode }