コード例 #1
0
void initializer()
{
	// Calibrate the oscillator:
    OSCCAL_calibration();   

	// Initialize the USART
	USARTinit();
	
	// set PORTD for output
	DDRD = 0xFF;
	
	// Display instructions on PC
	sendFString(TALKING_TO);
	sendFString(WHO_DEMO);
	
	sendFString(ENTER);
	sendFString(TEXT_CTC);
	
	sendFString(ENTER);
	sendFString(TEXT_SINE);
	sendFString(TO_START);	
	sendFString(TEXT_SINE);
	sendFString(WAVE);

	sendFString(ENTER);
	sendFString(TEXT_SQUARE);
	sendFString(TO_START);	
	sendFString(TEXT_SQUARE);
	sendFString(WAVE);
	
	sendFString(ENTER);
	sendFString(TEXT_SAWTOOTH);
	sendFString(TO_START);	
	sendFString(TEXT_SAWTOOTH);
	sendFString(WAVE);
	
	sendFString(ENTER);
	sendFString(TEXT_TRIANGLE);
	sendFString(TO_START);	
	sendFString(TEXT_TRIANGLE);
	sendFString(WAVE);	
	
	
	MilliSec_init(250); // default to 1000 Hz	
	
	DigitalOscilloscopeTimerInit();

	ADC_init();
	
	startSine();
}
コード例 #2
0
ファイル: demo.c プロジェクト: HoboJ/avr
void initializer ( void )
{
	// Calibrate the oscillator:
    OSCCAL_calibration ();   
	// Initialize the USART
	USARTinit ();
	
	// say hello
	//sendString ( "PC_Comm.c ready to communicate.\r" );   	 
	// identify yourself specifically
	//sendString ( "You are talking to the PC_Comm demo.\r" );

    menu ();
}
コード例 #3
0
void initializer()
{
	// Calibrate the oscillator:
    OSCCAL_calibration();   

	// Initialize the USART
	USARTinit();
	
	// initialize the LCD
    LCD_Init();                 
	
	// Display instructions on PC
	sendFString(TALKING_TO);
	sendFString(WHO_DEMO);
	
	LCD_puts_f(LCD_START_msg, 1);

}
コード例 #4
0
ファイル: main.c プロジェクト: Edwinem/robocup-software
/*****************************************************************************
*
*   Function name : Initialization
*
*   Returns :       None
*
*   Parameters :    None
*
*   Purpose :       Initializate the different modules
*
*****************************************************************************/
void Initialization(void)
{
	OSCCAL_calibration();       // calibrate the OSCCAL byte
		
	CLKPR = (1<<CLKPCE);        // set Clock Prescaler Change Enable

	// set prescaler = 8, Inter RC 8Mhz / 8 = 1Mhz
	CLKPR = (1<<CLKPS1) | (1<<CLKPS0);

	// Disable Analog Comparator (power save)
	ACSR = (1<<ACD);

	// Disable Digital input on PF0-2 (power save)
	DIDR0 = (7<<ADC0D);

	Button_Init();              // Initialize pin change interrupt on joystick
	lcd_init();                 // initialize the LCD
}
コード例 #5
0
void initializer()
{
	// Calibrate the oscillator:
    OSCCAL_calibration();   

	// Initialize the USART
	USARTinit();
	
	// Initialize timer0 to play a tune
	Timer0_Init();
	
	// initialize piezo-element
    sbi(DDRB, 5);               // set OC1A as output
    sbi(PORTB, 5);              // set OC1A high	
	
	// Display instructions on PC
	sendFString(TALKING_TO);
	sendFString(WHO_DEMO);
	sendFString(ENTER);
	sendFString(TEXT_FUR_ELISE);
	sendFString(ENTER);	
	sendFString(TEXT_TURKEY_MARCH);	
	sendFString(ENTER);	
	sendFString(TEXT_MINUET);	
	sendFString(ENTER);	
	sendFString(TEXT_AULD_LANG_SYNE);	
	sendFString(ENTER);	
	sendFString(TEXT_SIRENE1);	
	sendFString(ENTER);	
	sendFString(TEXT_SIRENE2);	
	sendFString(ENTER);	
	sendFString(TEXT_WHISTLE);	
	sendFString(ENTER);	
	sendFString(VOLUME_UP);	
	sendFString(THE_VOLUME);
	sendFString(ENTER);	
	sendFString(VOLUME_DOWN);	
	sendFString(THE_VOLUME);
	sendFString(ENTER);	
	sendFString(STOP);		


}
コード例 #6
0
void initializer()
{
	// Calibrate the oscillator:
    OSCCAL_calibration();   

	// Initialize the USART
	USARTinit();
	
	// set PORTD for output
	DDRD = 0xFF;
	
	MilliSec_init(250); // default to 1000 Hz

	
	// say hello
	sendString("\rPC_Comm.c ready to communicate.\r");   	 
	// identify yourself specifically
	sendString("You are talking to the Precision Blinking demo.\r");

}