- /*-- character: ? --*/
- 0x18, 0x04, 0xC4, 0x24, 0x18, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
- /*-- character: @ --*/
- 0xF8, 0x04, 0xE4, 0x94, 0xF8, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x00,
- /*-- character: A --*/
- 0x00, 0xE0, 0x9C, 0xF0, 0x80, 0x00, 0x02, 0x03, 0x00, 0x00, 0x03, 0x02,
- /*-- character: B --*/
- 0x04, 0xFC, 0x24, 0x24, 0xD8, 0x00, 0x02, 0x03, 0x02, 0x02, 0x01, 0x00,
- /*-- character: C --*/
- 0xF8, 0x04, 0x04, 0x04, 0x0C, 0x00, 0x01, 0x02, 0x02, 0x02, 0x01, 0x00,
- /*-- character: D --*/
- 0x04, 0xFC, 0x04, 0x04, 0xF8, 0x00, 0x02, 0x03, 0x02, 0x02, 0x01, 0x00,
- /*-- character: E --*/
- 0x04, 0xFC, 0x24, 0x74, 0x0C, 0x00, 0x02, 0x03, 0x02, 0x02, 0x03, 0x00,
- /*-- character: F --*/
- 0x04, 0xFC, 0x24, 0x74, 0x0C, 0x00, 0x02, 0x03, 0x02, 0x00, 0x00, 0x00,
- /*-- character: G --*/
- 0xF0, 0x08, 0x04, 0x44, 0xCC, 0x40, 0x00, 0x01, 0x02, 0x02, 0x01, 0x00,
- /*-- character: H --*/
- 0x04, 0xFC, 0x20, 0x20, 0xFC, 0x04, 0x02, 0x03, 0x00, 0x00, 0x03, 0x02,
- /*-- character: I --*/
- 0x04, 0x04, 0xFC, 0x04, 0x04, 0x00, 0x02, 0x02, 0x03, 0x02, 0x02, 0x00,
- /*-- character: J --*/
- 0x00, 0x04, 0x04, 0xFC, 0x04, 0x04, 0x06, 0x04, 0x04, 0x03, 0x00, 0x00,
- /*-- character: K --*/
- 0x04, 0xFC, 0x24, 0xD0, 0x0C, 0x04, 0x02, 0x03, 0x02, 0x00, 0x03, 0x02,
- /*-- character: L --*/
- 0x04, 0xFC, 0x04, 0x00, 0x00, 0x00, 0x02, 0x03, 0x02, 0x02, 0x02, 0x03,
- /*-- character: M --*/
- 0xFC, 0x3C, 0xC0, 0x3C, 0xFC, 0x00, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00,
- /*-- character: N --*/
- 0x04, 0xFC, 0x30, 0xC4, 0xFC, 0x04, 0x02, 0x03, 0x02, 0x00, 0x03, 0x00,
- /*-- character: O --*/
- 0xF8, 0x04, 0x04, 0x04, 0xF8, 0x00, 0x01, 0x02, 0x02, 0x02, 0x01, 0x00,
- /*-- character: P --*/
- 0x04, 0xFC, 0x24, 0x24, 0x18, 0x00, 0x02, 0x03, 0x02, 0x00, 0x00, 0x00,
- /*-- character: Q --*/
- 0xF8, 0x84, 0x84, 0x04, 0xF8, 0x00, 0x01, 0x02, 0x02, 0x07, 0x05, 0x00,
- /*-- character: R --*/
- 0x04, 0xFC, 0x24, 0x64, 0x98, 0x00, 0x02, 0x03, 0x02, 0x00, 0x03, 0x02,
- /*-- character: S --*/
- 0x18, 0x24, 0x24, 0x44, 0x8C, 0x00, 0x03, 0x02, 0x02, 0x02, 0x01, 0x00,
- /*-- character: T --*/
- 0x0C, 0x04, 0xFC, 0x04, 0x0C, 0x00, 0x00, 0x02, 0x03, 0x02, 0x00, 0x00,
- /*-- character: U --*/
- 0x04, 0xFC, 0x00, 0x00, 0xFC, 0x04, 0x00, 0x01, 0x02, 0x02, 0x01, 0x00,
- /*-- character: V --*/
- 0x04, 0x7C, 0x80, 0xE0, 0x1C, 0x04, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
- /*-- character: W --*/
- 0x1C, 0xE0, 0x3C, 0xE0, 0x1C, 0x00, 0x00, 0x03, 0x00, 0x03, 0x00, 0x00,
- /*-- character: X --*/
- 0x04, 0x9C, 0x60, 0x9C, 0x04, 0x00, 0x02, 0x03, 0x00, 0x03, 0x02, 0x00,
- /*-- character: Y --*/
- 0x04, 0x1C, 0xE0, 0x1C, 0x04, 0x00, 0x00, 0x02, 0x03, 0x02, 0x00, 0x00,
- /*-- character: Z --*/
- 0x0C, 0x84, 0x64, 0x1C, 0x04, 0x00, 0x02, 0x03, 0x02, 0x02, 0x03, 0x00,
- /*-- character: [ --*/
- 0x00, 0x00, 0xFE, 0x02, 0x02, 0x00, 0x00, 0x00, 0x07, 0x04, 0x04, 0x00,
- /*-- character: \ --*/
- 0x00, 0x0E, 0x30, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x00,
- /*-- character: ] --*/
- 0x00, 0x02, 0x02, 0xFE, 0x00, 0x00, 0x00, 0x04, 0x04, 0x07, 0x00, 0x00,
- /*-- character: ^ --*/
- 0x00, 0x04, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- /*-- character: _ --*/
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,
- /*-- character: ` --*/
- 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- /*-- character: a --*/
- 0x00, 0x40, 0xA0, 0xA0, 0xC0, 0x00, 0x00, 0x01, 0x02, 0x02, 0x03, 0x02,
- /*-- character: b --*/
- 0x04, 0xFC, 0x20, 0x20, 0xC0, 0x00, 0x00, 0x03, 0x02, 0x02, 0x01, 0x00,
- /*-- character: c --*/
- 0x00, 0xC0, 0x20, 0x20, 0x60, 0x00, 0x00, 0x01, 0x02, 0x02, 0x02, 0x00,
- /*-- character: d --*/
- 0x00, 0xC0, 0x20, 0x24, 0xFC, 0x00, 0x00, 0x01, 0x02, 0x02, 0x03, 0x02,
- /*-- character: e --*/
- 0x00, 0xC0, 0xA0, 0xA0, 0xC0, 0x00, 0x00, 0x01, 0x02, 0x02, 0x02, 0x00,
- /*-- character: f --*/
- 0x00, 0x20, 0xF8, 0x24, 0x24, 0x04, 0x00, 0x02, 0x03, 0x02, 0x02, 0x00,
- /*-- character: g --*/
- 0x00, 0x40, 0xA0, 0xA0, 0x60, 0x20, 0x00, 0x07, 0x0A, 0x0A, 0x0A, 0x04,
- /*-- character: h --*/
- 0x04, 0xFC, 0x20, 0x20, 0xC0, 0x00, 0x02, 0x03, 0x02, 0x00, 0x03, 0x02,
- /*-- character: i --*/
- 0x00, 0x20, 0xE4, 0x00, 0x00, 0x00, 0x00, 0x02, 0x03, 0x02, 0x00, 0x00,
- /*-- character: j --*/
- 0x00, 0x00, 0x20, 0xE4, 0x00, 0x00, 0x08, 0x08, 0x08, 0x07, 0x00, 0x00,
- /*-- character: k --*/
- 0x04, 0xFC, 0x80, 0xE0, 0x20, 0x20, 0x02, 0x03, 0x02, 0x00, 0x03, 0x02,
- /*-- character: l --*/
- 0x04, 0x04, 0xFC, 0x00, 0x00, 0x00, 0x02, 0x02, 0x03, 0x02, 0x02, 0x00,
- /*-- character: m --*/
- 0xE0, 0x20, 0xE0, 0x20, 0xC0, 0x00, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00,
- /*-- character: n --*/
- 0x20, 0xE0, 0x20, 0x20, 0xC0, 0x00, 0x02, 0x03, 0x02, 0x00, 0x03, 0x02,
- /*-- character: o --*/
- 0x00, 0xC0, 0x20, 0x20, 0xC0, 0x00, 0x00, 0x01, 0x02, 0x02, 0x01, 0x00,
- /*-- character: p --*/
- 0x20, 0xE0, 0x20, 0x20, 0xC0, 0x00, 0x08, 0x0F, 0x0A, 0x02, 0x01, 0x00,
- /*-- character: q --*/
- 0x00, 0xC0, 0x20, 0x20, 0xE0, 0x00, 0x00, 0x01, 0x02, 0x0A, 0x0F, 0x08,
- /*-- character: r --*/
- 0x20, 0xE0, 0x40, 0x20, 0x20, 0x00, 0x02, 0x03, 0x02, 0x00, 0x00, 0x00,
- /*-- character: s --*/
- 0x00, 0x60, 0xA0, 0xA0, 0x20, 0x00, 0x00, 0x02, 0x02, 0x02, 0x03, 0x00,
- /*-- character: t --*/
- 0x00, 0x20, 0xF8, 0x20, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x02, 0x00,
- /*-- character: u --*/
- 0x20, 0xE0, 0x00, 0x20, 0xE0, 0x00, 0x00, 0x01, 0x02, 0x02, 0x03, 0x02,
- /*-- character: v --*/
- 0x20, 0xE0, 0x20, 0x80, 0x60, 0x20, 0x00, 0x00, 0x03, 0x01, 0x00, 0x00,
- /*-- character: w --*/
- 0x60, 0x80, 0xE0, 0x80, 0x60, 0x00, 0x00, 0x03, 0x00, 0x03, 0x00, 0x00,
- /*-- character: x --*/
- 0x20, 0x60, 0x80, 0x60, 0x20, 0x00, 0x02, 0x03, 0x00, 0x03, 0x02, 0x00,
- /*-- character: y --*/
- 0x20, 0xE0, 0x20, 0x80, 0x60, 0x20, 0x08, 0x08, 0x07, 0x01, 0x00, 0x00,
- /*-- character: z --*/
- 0x00, 0x20, 0xA0, 0x60, 0x20, 0x00, 0x00, 0x02, 0x03, 0x02, 0x02, 0x00,
- /*-- character: { --*/
- 0x00, 0x00, 0x20, 0xDE, 0x02, 0x00, 0x00, 0x00, 0x00, 0x07, 0x04, 0x00,
- /*-- character: | --*/
- 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00,
- /*-- character: } --*/
- 0x00, 0x02, 0xDE, 0x20, 0x00, 0x00, 0x00, 0x04, 0x07, 0x00, 0x00, 0x00,
- /*-- character: ~ --*/
- 0x02, 0x01, 0x02, 0x04, 0x04, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- };
- /*********************************************************
- * Name: LCD_Write_Byte
- * Desc: Using the SPI interface to write data to LCD
- * Parameter: dt:written data ; command: write/command select;
- * Return: None
- **********************************************************/
- void LCD_Write_Byte(UINT8 dt, UINT8 command)
- {
- UINT8 i;
- SCE = 0;
- DC = command;
- for (i = 0; i < 8; i++)
- {
- if (dt & 0x80)
- SDIN = 1;
- else
- SDIN = 0;
- dt = dt << 1;
- SCLK = 0;
- SCLK = 1;
- }
- DC = 1;
- SCE = 1;
- SDIN = 1;
- }
- /*********************************************************
- * Name: LCD_Init
- * Desc: Initialize NOKIA5110 and PORTE
- * Parameter: None
- * Return: None
- **********************************************************/
- void LCD_Init(void)
- {
- DDRE = 0xff;
- PORTE = 0x00;
- RES = 0;
- Delayms(10);
- RES = 1;
- LCD_Write_Byte(0x21, 0);
- LCD_Write_Byte(0xCD, 0);
- LCD_Write_Byte(0x20, 0);
- LCD_Write_Byte(0x0C, 0);
- }
- /*********************************************************
- * Name: LCD_Set_XY
- * Desc: Set LCD coordinate
- * Parameter: X:0-83 Y:0-5
- * Return: None
- **********************************************************/
- void LCD_Set_XY(UINT8 X, UINT8 Y)
- {
- LCD_Write_Byte(0x40 | Y, 0);
- LCD_Write_Byte(0x80 | X, 0);
- }
- /*********************************************************
- * Name: LCD_Clear
- * Desc: LCD Clear Screen
- * Parameter: None
- * Return: None
- **********************************************************/
- void LCD_Clear(void)
- {
- UINT8 t;
- UINT8 k;
- LCD_Set_XY(0, 0);
- for (t = 0; t < 6; t++)
- {
- for (k = 0; k < 84; k++)
- {
- LCD_Write_Byte(0x00, 1);
- }
- }
- }
- /*********************************************************
- * Name: LCD_Write_Char
- * Desc: Showing 6(W)*16(H) of lattice numbers,letters,symbols
- * Parameter: d: The characters to be displayed
- * Return: None
- **********************************************************/
- void LCD_Write_Char(UINT8 row, UINT8 page, UINT8 c)
- {
- UINT8 i;
- LCD_Set_XY(row * 6, page);
- for (i = 0; i < 6; i++)
- {
- LCD_Write_Byte(zifu[c * 12 + i], 1);
- }
- LCD_Set_XY(row * 6, page + 1);
- for (i = 6; i < 12; i++)
- {
- LCD_Write_Byte(zifu[c * 12 + i], 1);
- }
- }
复制代码 |