Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Microcontroladores PIC - Display LCD Alfanumérico

1,233 views

Published on

  • Be the first to comment

Microcontroladores PIC - Display LCD Alfanumérico

  1. 1. Microcontroladores PIC LCD 16 X 2 Fábio Souza 1
  2. 2. Objetivos • Compreender o funcionamento do LCD alfanumérico 16X2; • Utilizar as funções do mikroC para interface com LCD; • Exibir mensagens e variáveis no display LCD. Fábio Souza 2
  3. 3. LCD alfanumérico Fábio Souza 3
  4. 4. Ligação Elétrica Fábio Souza 4
  5. 5. Tabela de símbolos Fábio Souza 5
  6. 6. Funções no MikroC • void Lcd_Init(); • void Lcd_Out(char row, char column, char *text); • void Lcd_Chr(char row, char column, char out_char); • void Lcd_Cmd(char out_char); Fábio Souza 6
  7. 7. Declarando os pinos do LCD • sbit LCD_RS at RD4_bit; • sbit LCD_EN at RD5_bit; • sbit LCD_D4 at RD0_bit; • sbit LCD_D5 at RD1_bit; • sbit LCD_D6 at RD2_bit; • sbit LCD_D7 at RD3_bit; • sbit LCD_RS_Direction at TRISD4_bit; • sbit LCD_EN_Direction at TRISD5_bit; • sbit LCD_D4_Direction at TRISD0_bit; • sbit LCD_D5_Direction at TRISD1_bit; • sbit LCD_D6_Direction at TRISD2_bit; • sbit LCD_D7_Direction at TRISD3_bit; Fábio Souza 7
  8. 8. Inicializando o LDC • void Lcd_Init(); • Inicializa LCD conforme pinagem configurada; • Lcd_Init(); //inicializa LCD Fábio Souza 8
  9. 9. Comandos para o LCD • Lcd_Cmd(char out_char); Fábio Souza 9
  10. 10. Enviando uma palavra para o LCD • Lcd_Out(char row, char column, char *text); • Lcd_Out(1, 2, “LCD 16 X 2”); • Lcd_Out(1, 2, “PIC16F887A”); • Lcd_Out(1, 2, “Microchip”); Fábio Souza 10

×