Exemplo n.º 1
0
//
// stm32f103c8t6 and hd44780 lcd example
//
int
main(int argc, char* argv[])
{
	HD44780_Initialize();
	HD44780_PrintString((uint8_t*)"1st line");
	HD44780_MoveTo(1, 0); // 2nd line, 1 position
	HD44780_PrintString((uint8_t*)"2nd line");
	while (1)
	{

	}
}
Exemplo n.º 2
0
/** Configures the board hardware and chip peripherals for the application's functionality. */
void SetupHardware(void)
{
	/* Disable watchdog if enabled by bootloader/fuses */
	MCUSR &= ~(1 << WDRF);
	wdt_disable();

	/* Disable clock division */
	clock_prescale_set(clock_div_1);

	/* Hardware Initialization */
	USB_Init();

	/* Power up the HD44780 Interface */
	HD44780_Initialize();
	HD44780_WriteCommand(CMD_DISPLAY_ON);
	
	/* Start the flush timer so that overflows occur rapidly to push received bytes to the USB interface */
	TCCR0B = (1 << CS02);
}