12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- #pragma once
- #include <avr/io.h>
- #include <util/delay.h>
- #include "expander.h"
- #define LCD_WriteCommand(x)
- #define UC1601S_CA30 0x00
- #define UC1601S_CA74 0x10
- #define UC1601S_TC 0x24
- #define UC1601S_PC 0x28
- #define UC1601S_ADV 0x30
- #define UC1601S_SL 0x40
- #define UC1601S_PA 0xb0
- #define UC1601S_PM 0x81
- #define UC1601S_LC4 0x84
- #define UC1601S_AC 0x88
- #define UC1601S_LC3 0xa0
- #define UC1601S_DC1 0xa4
- #define UC1601S_DC0 0xa6
- #define UC1601S_DC2 0xae
- #define UC1601S_LC21 0xc0
- #define UC1601S_SYSTEMRESET 0xe2
- #define UC1601S_NOP 0xe3
- #define UC1601S_BR 0xe8
- #define UC1601S_CEN 0xf1
- #define UC1601S_DST 0xf2
- #define UC1601S_DEN 0xf3
- #define UC1601S_INTERNAL_VLCD 0x6
- #define UC1601S_BIAS_RATIO_6 0x0
- #define UC1601S_BIAS_RATIO_7 0x1
- #define UC1601S_BIAS_RATIO_8 0x2
- #define UC1601S_BIAS_RATIO_9 0x3
- #define UC1601S_DATA_OUTPUT() expander_set_dir(0, 0x00, 0x00)
- #define UC1601S_DATA_INPUT() expander_set_dir(0, 0xFF, 0x00)
- #define UC1601S_WR_PORT 1
- #define UC1601S_WR (1<<2)
- #define UC1601S_CD_PORT 1
- #define UC1601S_CD (1<<0)
- #define UC1601S_RD_PORT 1
- #define UC1601S_RD (1<<3)
- #define UC1601S_CS_PORT 1
- #define UC1601S_CS (1<<1)
- #define UC1601S_RST_PORT 1
- #define UC1601S_RST (1<<6)
- void uc1601s_write_command(unsigned char cmd);
- void uc1601s_write_data(unsigned char data);
- unsigned char uc1601s_read_data(void);
- void LCD_Initialize(void);
- void LCD_Clear(void);
- void LCD_GoTo(unsigned char x, unsigned char y);
- void LCD_WriteTextP(__flash const char *t);
- void LCD_WriteText(const char *t);
- void LCD_WriteChar(char c);
- #define LCD_WriteData(c) LCD_WriteChar(c)
|