test._c
来自「用ATMEGA88推动LCD240128液晶的测试程序。按config.h的定义」· _C 代码 · 共 51 行
_C
51 行
//ICC-AVR application builder : 2005-10-22 20:39:47
// Target : M88
// Crystal: 16.0000Mhz
#include "config.h"
#include "hanzi.h"
//------------------------------------------------------------------------------
void port_init(void)
{
PORTB = 0xFF;
DDRB = 0xFF;
PORTC = 0x00; //m103 output only
DDRC = 0x00;
PORTD = 0x00;
DDRD = 0x00;
}
void init_devices(void)
{
CLI(); //disable all interrupts
port_init();
MCUCR = 0x00;
EICRA = 0x00; //extended ext ints
EIMSK = 0x00;
TIMSK0 = 0x00; //timer 0 interrupt sources
TIMSK1 = 0x00; //timer 1 interrupt sources
TIMSK2 = 0x00; //timer 2 interrupt sources
PCMSK0 = 0x00; //pin change mask 0
PCMSK1 = 0x00; //pin change mask 1
PCMSK2 = 0x00; //pin change mask 2
PCICR = 0x00; //pin change enable
PRR = 0x00; //power controller
SEI(); //re-enable interrupts
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void main(void)
{
init_devices();
lcd_init();
lcd_clear(0xFF);
lcd_delay(500);
lcd_clear(0xAA);
lcd_delay(500);
lcd_print240128(ouravr);
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?