当前位置: 首页>>代码示例>>C++>>正文


C++ LCD_init函数代码示例

本文整理汇总了C++中LCD_init函数的典型用法代码示例。如果您正苦于以下问题:C++ LCD_init函数的具体用法?C++ LCD_init怎么用?C++ LCD_init使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了LCD_init函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: main

int main (void)
{
	
	LCD_init();
	LCD_init();
	LCD_print("START");
	
	

	for (;;)
	{
		//_delay_ms(1000);							/* Delay 1000ms for things to settle down */
		
		//if (pf_mount(&Fs)) 
		//{	
		//	continue;	/* Initialize FS */
		//}
		
		
		//if (pf_opendir(&Dir,"music")) break;		/* Open /music folder (for task1) */
		//if (pf_opendir(&Dir,"speech")) break;		/* Open /speech folder (for task2) */
			
		while(1) 
		{
			//task1();
			//task2();
			LCD_print("test");
		}
	}
	
	return 1;
}
开发者ID:LaitaStefan,项目名称:labs-2014,代码行数:32,代码来源:main.c

示例2: display_start

/*  display_start - start display on LCD
*/
void display_start(frame_buffer_t *frame_buffer)
{
	unsigned char *fb = frame_buffer->fb;
	int column_max = frame_buffer->column_max;

	LCD_init();

	fb_write_char(0,5,"NOKIA 5110", fb, column_max);
 	sprintf(title, "Description: chenchachan - Copyright (c) 2013, chenchacha");
 	fb_write_char(1,0,title, fb, column_max); 

/* 	fb_negation_dollop(0,0,83,47,fb,column_max);
 */
/* 	display_boxes(frame_buffer); */ 

	LCD_draw_frame_buffer(0,0,fb, column_max);

	LCD_draw_dollop(0,0,83,47);
#if 0
	LCD_draw_point(30,25);
	/* write a boxes */
	LCD_draw_dollop(25,48,0,0);
	LCD_draw_dollop(25,25,0,84);
	LCD_draw_dollop(48,48,0,84);
	LCD_draw_dollop(25,48,84,84);
#endif
}		/* -----  end of function display_start  ----- */
开发者ID:chenquanquan,项目名称:power-control,代码行数:29,代码来源:display.c

示例3: main

int main(void)
{
LCD_init();
LCD_clear();
while(1)
{
uchar i;
LCD_write_english_string(3,0,"WXJ_PCR");
LCD_write_english_string(0,2,"TIME=");
LCD_write_num(5,2,31,2);
LCD_write_english_string(7,2,":");
LCD_write_num(8,2,43,2);
LCD_write_english_string(0,4,"NOW TEMP=");
LCD_write_english_string(0,3,"AIM TEMP=");
LCD_write_num(9,3,97,2);
LCD_write_english_string(11,4,".");
LCD_write_english_string(0,5,"COUNT=");
LCD_write_num(6,5,13,2);
LCD_write_english_string(8,5,":");
LCD_write_num(9,5,35,2);
temp = get_tmp();
sendchangecmd();
for(i=0;i<40;i++)
{
display(temp);
}

}
}
开发者ID:wuxiaojiang,项目名称:PCR_project,代码行数:29,代码来源:main.c

示例4: main

int main(void)
{             
  char c;			// odebrany znak
  UART_init();			// inicjalizacja portu szeregowego
  LCD_init();			// inicjalizacja wy�wietlacza LCD
  LCD_PL_chars_init();		// polskie znaki na wy�wietlaczu LCD
  KBD_init();			// inicjalizacja klawiatury
  LED7SEG_init();		// inicjalizacja wy�wietlacza
  sei();                       	// w��cz obs�ug� przerwa�

  while(1)			// p�tla niesko�czona
  {
    PCF8583_get_time(&godz,&min,&sek,&ssek);

    LED7SEG_putU08(sek);	// wy�wietlaj warto�� 

    if (UART_rxlen()>0)	// je�li odebrano znak
    {
      c=UART_getchar();
    	// tu mo�na wstawi� reakcje na komendy steruj�ce np. typu ESC[
      LCD_putchar(c);		// wy�wietl go na LCD
    }
    if (KBD_read())		// je�li naci�ni�to klawisz
    {
      if ((KBD_ascii>='A')&&(KBD_ascii<='D'))
        UART_putstr_P(CURSOR);	// sterowanie kursorem
      UART_putchar(KBD_ascii);	// wy�lij go na port szeregowy
      KBD_wait();		// czekaj na zwolnienie klawisza
    }
  }
}
开发者ID:rimek,项目名称:aquarium,代码行数:31,代码来源:full.c

示例5: main

/*
 * main.c
 */
void main() {
	init_pins();
	init_button();
	init_adc();
	init_wdt();
	WDT_delay = CURRENT_DELAY;

 	BCSCTL1 = CALBC1_8MHZ;
	DCOCTL =  CALDCO_8MHZ;

	LCD_setup();
	_bis_SR_register(GIE);	// enable interrupts
	// initialize LCD and say hello a few times :-)
	LCD_init();

	LCD_send_string((char*)msg);

	while(1){
		LCD_put(0x80+40); // cursor to line 2, first position
		snprintf(hex, 20, HEX, (int)colourArray[1], (int)colourArray[2], (int)colourArray[0]);
		LCD_send_string(hex);
	}

	_bis_SR_register(LPM0_bits);

	//delay(0); // maximum delay



}
开发者ID:minggLu,项目名称:Microprocessor-Final-Project,代码行数:33,代码来源:main.c

示例6: main

void main (void)
{
	//init LCD
	LCD_init();
	//set TWBR = 32 for 100kHz SCL @ 8MHz
	TWI_init(32, 0);
	
	//write 0x55 @ 513 and print return value on LCD
	LCD_puthex(EE_write_byte(513, 0x55));
	//send stop
	TWI_stop();
	LCD_wait();
	LCD_putchar(' ');
	//wait for the EEPROM to finish the write operation
	TWI_wait(EE_ADDR);
	//read the write location again and print return code on LCD
	LCD_puthex(EE_read_byte(513));
	LCD_wait();
	LCD_putchar(' ');
	//print the value read from the EEPROM on the LCD
	LCD_puthex(TWDR);
	TWI_stop();
	//LCD should now show "0x00 0x00 0x55_"
	//where the _ is the blinking cursor.
}
开发者ID:dodelal,项目名称:quadro_c,代码行数:25,代码来源:24C16.c

示例7: main

int main (void)
{

	DIO_init();

	LCD_init();
	LCD_gotoxy(1,1);
	printf("AVR ADC Tutorial");
	LCD_gotoxy(1,2);

	ADC_init();
	ADC_Configure_Reference(VREFERENCE_VALUE);
	ADC_Configure_PRESCALAR(PRESCALAR_VALUE);
	ADC_Enable();
	ADC_start();

	while(1)
	{
		LCD_gotoxy(1,2);
		adc_read=ADC_read_8bits(ADC0);
		printf("%d",adc_read);
		printf ("                  " );
		TO_DELAY(500);
	}

	return(0);

}
开发者ID:modyskyline,项目名称:AVR_LIBS,代码行数:28,代码来源:main.c

示例8: main

int
main(void)
{
  uint16_t ui1;

  LCD_init();
  i2cInit();
  Timer_Init();
  KbdInit();

  LCD_busy
  LCD_CLRSCR

  LCD_WR_LINE(0, 0, "Starting!!!");
  for (ui1=0; ui1<0x3F; ui1++)
    LCD_busy;

  LCD_WR_LINE(0, 0, "Press any key!!!");
  LCD_WR_LINE(1, 0, "Shall displayed!");
  KBD_RESET_KEY;
  while (1) {
    KBD_GET_KEY;
    LCD_POS(1, 0);
    LCD_WR("Scan Code : ");
    LCD_PUT_UINT8X(KbdData);
    for (ui1=0; ui1<0xFF; ui1++)
      {}
    KBD_RESET_KEY;
  }

  return 0;
}
开发者ID:gurusfp,项目名称:billmac,代码行数:32,代码来源:test_kbd.c

示例9: main

int main(void)
{
	//---- PORT Initializations -----
	DDRB = 0xFF; PORTB = 0x00;
	DDRA = 0x00; PORTA = 0xFF;
	DDRC = 0xFF; PORTC = 0x00; //used for LCD display
	DDRD = 0xFF; PORTD = 0x00; //used for LCD display
	
	// --- Function Initializations ---
	TimerSet(5);
	TimerOn();
	PWM_on();
	initUSART();
	setCustomCharacters();
	LCD_init();

	//---if eeprom address was not initialized----
	if(eeprom_read_byte((uint8_t*)46) == 0xFF)
		eeprom_write_byte((uint8_t*)46 , 0);
		
	//----load old high score saved in EEPROM----
	currHighScore = eeprom_read_byte((uint8_t*)46);
	
	gameStatus = 0;
	soundStatus = 0;
	lcdTick();
	
	while(1){	
		mainTick();
		playSound();
		while(!TimerFlag);
		TimerFlag = 0;
	}
}
开发者ID:mikejuyoon,项目名称:Whack_a_Mole,代码行数:34,代码来源:microC1.c

示例10: lcdDisplayTick

int lcdDisplayTick(task* t){

	//actions	
	switch(t->state){
		case lcd_init:
			LCD_init();							//initialize LCD
			LCD_ClearScreen();					//clear screen of any artifacts
			break;
		case s1:
			//LCD_ClearScreen();					//clear screen of any artifacts
			LCD_DisplayString(1,motionSensorMsg);	//display motion sensor message
			break;
		default:
			break;
	}

	//transitions
	switch(t->state){
		case lcd_init:
			t->state = s1;
			break;
		case s1:
			t->state = s1;
			break;
		default:
			break;
	}
}
开发者ID:dutchthomas,项目名称:cs122a,代码行数:28,代码来源:p1.c

示例11: main

void main()
{
	volatile char a, b, r;
	LCD_init();
  a = 3;
  b = 3;
	r = a * b;
	LCD_wr(r + ZERO);  // print 9
	LCD_wr(SPACE);
  
  a = 2;
  b = 3;
  r = a * b;
	LCD_wr(r + ZERO);  // print 6
	LCD_wr(SPACE);	

  a = 1;
  b = 3;
  r = a * b;
	LCD_wr(r + ZERO);  // print 3
	LCD_wr(SPACE);	
	
  a = 0;
  b = 3;
  r = a * b;
	LCD_wr(r + ZERO);  // print 0
	LCD_wr(SPACE);
}
开发者ID:ruedagato,项目名称:arqui,代码行数:28,代码来源:test3.c

示例12: init

void init(void) {
    pin_init();
    timer_init();
    LCD_init();
    // eventually should read and save to eeprom.
    Keypad_init_static();
}
开发者ID:nivwusquorum,项目名称:microgrid_january_demo,代码行数:7,代码来源:main.c

示例13: main

int main(){

#ifndef TESTING

#include "uart.h"
#include "mmc.h"

	// Initializam modulele hardware

	uart_init();
	SPI_init();
	MMC_init();
	BTN_init();
	LCD_init();
#endif
	/* Gaseste prima partitie FAT32 de pe card*/
	init_partition(buffer);

	/**
	  * Gaseste datele despre sistemul de fisiere :
	  * nr de tabele FAT, cluster-ul directorului Root, etc.
	  */
	initFAT32(buffer);
	print_volid(buffer);

	LCD_str( "  ", 0);
	LCD_str( "  ", 0);
	LCD_str( "  Welcome to", 0);
	LCD_str( " MMC Explorer", 0);
	_delay_ms(2500);
	LCD_clear();
	printdirs(openroot());
	return EXIT_SUCCESS;
}
开发者ID:ctalau,项目名称:image-viewer,代码行数:34,代码来源:main.c

示例14: main

int main( void )
{
  LCD_init();
  LCD_write("Hello World");
  LCD_command(LCD_LINE2 | 5); // move cursor  to row 2, position 5 
  LCD_write("is here");
}
开发者ID:engrnasirkhan,项目名称:UofI,代码行数:7,代码来源:main--broken.c

示例15: main

void main(){
	Output_low(LCD_RW); //Che do ghi 
	LCD_init(); //Khoi tao LCD

	lcd_putcmd(0x01);
	delay_ms(100);
	printf(lcd_putchar,"Nhiet do: ");
	while (true){
		i2c_start();   //Tao dieu kien start de giao tiep
		//Dia chi thiet bi I2C(tra trang 9 cua Datasheet) sau khi da them bit 0 vao
		//0x48 (1001000 them bit 0 vao 10010000 = 0x90
		i2c_write(0x90); 
		i2c_write(0x00); //Gui lenh yeu cau doc nhiet do
		i2c_start();   //Tao lai dieu kien start
		//Dia chi thiet bi I2C(tra trang 9 cua Datasheet) sau khi da them bit 1 vao
		//0x48 (1001000 them bit 1 vao 10010001 = 0x91
		i2c_write(0x91); //Thiet bi chu yeu cau duoc doc du lieu cua thiet bi to
		temp = i2c_read(0); //Gui lenh doc gia tri nhiet do
		i2c_stop();      //Tao dieu kien Stop, ket thuc giao tiep
		LCD_SetPosition(0x09);
		printf(lcd_putchar,"%u",temp); //Hien thi nhiet do doc duoc len LCD 
		lcd_putchar(223);
		printf(lcd_putchar,"C");
		delay_ms(1000);
	}
}
开发者ID:thinhut,项目名称:vdk-pic16f887,代码行数:26,代码来源:BAI-6-1.C


注:本文中的LCD_init函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。