Advertisement
RuiViana

Testa_LCD_CCS

May 29th, 2016
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. #include <main.h>
  2. #define LCD_ENABLE_PIN PIN_B4
  3. #define LCD_RS_PIN PIN_B5
  4. #define LCD_RW_PIN PIN_B6
  5. #define LCD_DATA4 PIN_B0
  6. #define LCD_DATA5 PIN_B1
  7. #define LCD_DATA6 PIN_B2
  8. #define LCD_DATA7 PIN_B3
  9.  
  10. #include <lcd.c>
  11.  
  12. char h = 23;
  13.  
  14. void main()
  15. {
  16. lcd_init();
  17. lcd_putc('\f'); //Clear Display
  18. while(TRUE)
  19. {
  20. lcd_gotoxy(1,1); // Vá para linha 1 posição 1
  21. lcd_putc(h); // Imprima valor de h
  22. output_high(PIN_B0); // LED ON
  23. Delay_ms(1000); // 1 Second Delay
  24. output_low(PIN_B0); // LED OFF
  25. delay_ms(1000); // 1 Second Delay
  26. }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement