微控制器驅動段式液晶屏
阿新 • • 發佈:2019-01-01
//************************Initialization function defined here***********************
void initialization(void)
{
// Declare your local variables here
// Crystal Oscillator division factor: 1
CLKPR=0x80;
CLKPR=0x00;
//DDRC=0x7F; //7 Segment outputs
// Timer/Counter 0 initialization
TCCR0A=0x00;
TCCR0B=0x03; // = 8MHz/64 3/22/05
TCNT0=0xC1;
// External Interrupt(s) initialization
// INT0: Off
// INT1: Off
// Interrupt on any change on pins PCINT0-7: Off
// Interrupt on any change on pins PCINT8-14: Off
// Interrupt on any change on pins PCINT16-23: Off
EICRA=0x00;
EIMSK=0x00;
PCICR=0x00;
// Timer/Counter 0 Interrupt(s) initialization
TIMSK0=0x01;
// Timer/Counter 1 Interrupt(s) initialization
TIMSK1=0x00;
// Timer/Counter 2 Interrupt(s) initialization
TIMSK2=0x00;
//Analog Comparator initialization
// Analog Comparator: Off
// Analog Comparator Input Capture Dy Timer/Counter 1: Off
//************************End of Initialization function ***************************
void initialization(void)
{
// Declare your local variables here
// Crystal Oscillator division factor: 1
CLKPR=0x80;
CLKPR=0x00;
//DDRC=0x7F; //7 Segment outputs
// Timer/Counter 0 initialization
TCCR0A=0x00;
TCCR0B=0x03; // = 8MHz/64 3/22/05
TCNT0=0xC1;
// External Interrupt(s) initialization
// INT0: Off
// INT1: Off
// Interrupt on any change on pins PCINT0-7: Off
// Interrupt on any change on pins PCINT8-14: Off
// Interrupt on any change on pins PCINT16-23: Off
EICRA=0x00;
EIMSK=0x00;
PCICR=0x00;
// Timer/Counter 0 Interrupt(s) initialization
TIMSK0=0x01;
// Timer/Counter 1 Interrupt(s) initialization
TIMSK1=0x00;
// Timer/Counter 2 Interrupt(s) initialization
TIMSK2=0x00;
//Analog Comparator initialization
// Analog Comparator: Off
// Analog Comparator Input Capture Dy Timer/Counter 1: Off
//************************End of Initialization function ***************************