Exemplo n.º 1
0
void LCD_Initialization(){
  lcd_init();
  lcd_drawBackground(20,60,250);
  lcd_drawBGPersimmon(20, 60, 250);
  LCD_SetColors(LCD_COLOR_WHITE-1,LCD_COLOR_BLACK);
  LCD_SetFont(&Font8x12); 
}
Exemplo n.º 2
0
int main(void)
{
  uint8_t colorR =0 ,colorG =0 ,colorB =0 ;
  uint8_t colorR_dir =0 ,colorG_dir =0 ,colorB_dir =0 ;
  char lcd_text_buff[100];

  float GyX =0.0f, GyY =0.0f, GyZ =0.0f;
  float X_offset =0.0f,Y_offset =0.0f,Z_offset =0.0f;
  uint32_t i=0;
  float delay_count=1000.0f;

  GPIO_Configuration();
  USART1_Configuration();
  CANx_Config();
  CANx_NVIC_Config();
  lcd_init();
  lcd_drawBackground(20,60,250);
  lcd_drawBGPersimmon(20, 60, 250);


    LCD_SetColors(LCD_COLOR_WHITE-1,LCD_COLOR_WHITE);
    LCD_SetFont(&Font16x24);
    LCD_DisplayStringLine(LINE(1), (uint8_t*)" CAN Bus DEMO  ");
    DrawNeedle(120,120,60,300.0f,0.0f,200.0f);
  while (1)
  {
    CANx_Transmit();
    GPIO_ToggleBits(LED4);

    Delay_1us(1000);
  }
  
}
Exemplo n.º 3
0
int main(void)
{

  char lcd_text_main[100];

    lcd_init();
    lcd_drawBackground(20,60,250);
    lcd_drawBGPersimmon(20, 60, 250);
    LCD_SetColors(LCD_COLOR_WHITE-1,LCD_COLOR_WHITE);

    LCD_SetFont(&Font8x12); 

    terminalBufferInitilization();

    /* Begin timer period capture example */


    TIM2_Initialization();

    terminalWrite("Welcome to our termainal .\n");     Delay_1us(1000000);
  while (1){


     sprintf(lcd_text_main,"\nPeriod = %ld us",timebaseCapture_output);
     terminalWrite(lcd_text_main); 
     Delay_1us(10000);
  }  
}