• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ LCD_init函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: main

void main(void) {
//  volatile 
  volatile char ch = 48; //0x30
//  volatile 
  volatile unsigned char i = 0;
  volatile unsigned char j = 0;
  
  LCD_init();
  for (ch = 48; ch<=57; ch++)
  {
    LCD_wr(ch);
    for (i=0;i<255;i++) 
      for (j=0;j<255;j++) 
      {
        __asm
          LOAD sF, sF
          LOAD sF, sF
          LOAD sF, sF
          LOAD sF, sF
          LOAD sF, sF
          LOAD sF, sF
          LOAD sF, sF
          LOAD sF, sF
          LOAD sF, sF
          LOAD sF, sF
          LOAD sF, sF
          LOAD sF, sF
          LOAD sF, sF
          LOAD sF, sF
        __endasm;
      }
      
  }
}
开发者ID:ruedagato,项目名称:arqui,代码行数:34,代码来源:demo5.c


示例17: main

int main(void)
//   Input    : -
//   Output   : -
//   Function : main function. Runs the init function and then loops


{
    //Initialization
    disable_global_int();
    SysTick_init();
    GPIO_init();
    swtimers_init();
    RTCS_init();

    UART0_init(19200, 8, 1, 0);
    enable_global_int();
    LCD_init();
    queue_init(&display_lcd_queue);
    queue_init(&uart0_rx_queue);
    numpad_init();

    open_queue(Q_LCD);
    open_queue(Q_INPUT);

    start_task( TASK_RTC, RTC_task);
    start_task( TASK_DISPLAY, display_task);
    start_task( TASK_LCD, LCD_task);
    start_task( TASK_NUMPAD, numpad_task);
    start_task( TASK_UI, ui_task);
    start_task( TASK_UART0, UART0_task);

    schedule();

    return (0);
}
开发者ID:Gugfann,项目名称:4.Semester,代码行数:35,代码来源:main.c


示例18: init_devices

//**************************************************************
// ****** MAIN FUNCTION FOR MIDI PROJECT ***********************
//**************************************************************
//Controller: ATmega644 (Clock: 8 Mhz-internal)
//Compiler: AVR-GCC (Ubuntu cross-compiler avr-g++ -v4.8.2)
//**************************************************************


#define F_CPU 8000000UL
#include <avr/io.h>
#include <avr/pgmspace.h>
#include <avr/interrupt.h>
#include <util/delay.h>
#include "SPI_routines.h"
#include "SD_routines.h"
#include "FAT32.h"
#include "LCD_driver.h"
#include "menucontrol.h"

const unsigned char sdcardtesting[] PROGMEM ="  SD Card Testing..  ";
const unsigned char sdcardnotdectect[] PROGMEM ="SD card not detected..";
const unsigned char initilfail[] PROGMEM ="Card Initialization failed..";
const unsigned char sdv1_1[] PROGMEM ="Standard Capacity Card";
const unsigned char sdv1_2[] PROGMEM ="(Ver 1.x) Detected!";
const unsigned char sdhc_1[] PROGMEM ="High Capacity Card";
const unsigned char sdhc_2[] PROGMEM ="Detected!";
const unsigned char sdv2_1[] PROGMEM ="Standard Capacity Card";
const unsigned char sdv2_2[] PROGMEM ="(Ver 2.x) Detected!";
const unsigned char unknown_1[] PROGMEM ="Unknown SD Card Detected";
const unsigned char unknown_2[] PROGMEM ="Press OK key to continue";
const unsigned char fat32notfound[] PROGMEM ="FAT32 not found!";

//***********************************************************************************/
//call this routine to initialize LCD and SPI for SD card							 /
//***********************************************************************************/
void init_devices(void)
{
  cli();  //all interrupts disabled
  LCD_init();
  spi_init();
  MCUCR = 0x00;
 TIMSK1 = 0x00; //timer interrupt sources
}
开发者ID:shen9175,项目名称:AVR-MIDI-project,代码行数:43,代码来源:SD_main.c


示例19: main

 int main (void)
  {
  init_hw();
  LCD_init();
  SR_DAT_IN;
  while (1)
  	{
	uart_sendchar('A');
	uart_sendstr("0123456789abcdef");
 // 	dly_ms(40);
  	if (rcvd_flag)
  		{
  		rcvd_flag=0;
  		uart_sendstr("R:");
  		if (f_gsm_ok)
  			{
  			f_gsm_ok=0;
  			uart_sendstr("G_OK");
  			}
  		if (f_gsm_nc)
  			{
  			f_gsm_nc=0;
  			uart_sendstr("G_NC");
  			}
  		if (f_gsm_cr)
  			{
  			f_gsm_cr=0;
  			uart_sendstr("G_CR");
  			}
  		if (f_gsm_ring)
  			{
  			f_gsm_ring=0;
  			uart_sendstr("G_RI");
  			}
  		uart_sendstr("\r\n");
  		}


  	keys = read_keys();

  	if (keys==0x01) 		update_lcd("K1");
  	else if (keys==0x02) 	update_lcd("K2");
  	else if (keys==0x04) 	update_lcd("K3");
  	else if (keys==0x08) 	update_lcd("K4");
  	else if (keys==0x10) 	update_lcd("K5");
  	else if (keys==0x20) 	update_lcd("K6");
  	else if (keys==0x40) 	update_lcd("K7");
  	else if (keys==0x00) 	update_lcd("0123456789ABCDEF");
  	else update_lcd("Kx");
/*
	if (keys_handling(&key))
		{
		keys = key;
		}
*/
  	}
  }
开发者ID:bgbock,项目名称:rdmp,代码行数:57,代码来源:main.c


示例20: Hw_init

/*!
 * \brief Function Hw_init sets basic HW configuration
 */
void Hw_init(void)
{      
	SHIFT_DDR |= _BV(SHIFT_LED_SET_DDR);	/* parallel write -> output pin */
	SHIFT_DDR |= _BV(SHIFT_CLK_DDR);	/* serial clock -> output pin */
	SHIFT_DDR |= _BV(SHIFT_OUT_DDR);	/* serial data stream -> output pin */ 
	SHIFT_DDR |= _BV(SHIFT_LCD_SET_DDR);	/* parallel write -> output pin */

        LCD_init();                             /* Init LCD display */
}
开发者ID:h0nzZik,项目名称:school,代码行数:12,代码来源:main.c



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ LCDsendCommand函数代码示例发布时间:2022-05-30
下一篇:
C++ LCD_clear函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap