A
Size: a a a
A
A
О
A
Ч
Ч
A
Ч
A
A
Ч
Ч
A
A
A
О
#define LOW 0
#define HIGH 1
#define LCD_DDR DDRC
#define LCD_OUT PORTC
#define LCD_PIN PINC
#define LCD_DN 2
#define LCD_SCL 3
#define LCD_CE 1
#define set_bit(reg,bit) reg |= (1<<bit)
#define clr_bit(reg,bit) reg &= ~(1<<bit)
#define check_bit(reg,bit) (reg&(1<<bit))
void lcd_setupPins()
{
set_bit(LCD_DDR, LCD_DN); // DN output
set_bit(LCD_DDR, LCD_SCL); // SCL output
set_bit(LCD_DDR, LCD_CE); // CE output
}
/* ------------------------------------------------------------------------- */
void lcd_ce_digitalWrite(unsigned char state)
{
if(state) { set_bit(LCD_OUT, LCD_CE); }
else { clr_bit(LCD_OUT, LCD_CE); }
}
A
О
Ч
Ч