Embedded lcd

1,055 views

Published on

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,055
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
28
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Embedded lcd

  1. 1. hendri@eepis-its.edu INTERFACING AVR
  2. 2. hendri@eepis-its.edu DISKRIPSI PIN
  3. 3. hendri@eepis-its.edu Blok Diagram
  4. 4. hendri@eepis-its.edu Blok Diagram
  5. 5. hendri@eepis-its.edu DC Karakteristik
  6. 6. hendri@eepis-its.edu DC Karakteristik E> 500ns
  7. 7. hendri@eepis-its.edu Write Mode Timing Diagram
  8. 8. hendri@eepis-its.edu Read Mode Timing Diagram
  9. 9. hendri@eepis-its.edu
  10. 10. hendri@eepis-its.edu InstruksiLCD
  11. 11. hendri@eepis-its.edu Format Data A scii?
  12. 12. hendri@eepis-its.edu Inisialisasi LCD
  13. 13. hendri@eepis-its.edu Inisialisasi LCD
  14. 14. hendri@eepis-its.edu Inisialisasi LCD 4BITLCD 8BITLCD
  15. 15. hendri@eepis-its.edu BAGAIMANA PEMROGRAMANNYA ?
  16. 16. hendri@eepis-its.edu Tambahkan #include lcd.h Pada file utama #include "lcd.h" #include <util/delay.h> int main(void) { lcd_init(); while(1) { lcd_gotoxy(0,0);lcd_putstr("hello world"); _delay_ms(200); lcd_clear(); } return 0; } /LCD interface #define PORT_LCD PORTB #define DDR_LCD DDRB #define RS PB0 #define RW PB1 #define EN PB2 #define DB4 PB4 #define DB5 PB5 #define DB6 PB6 #define DB7 PB7 Pastikan Koneksi antara Board mikro dengan LCD seperti Definisi PORT
  17. 17. hendri@eepis-its.edu #define SETBIT(address,bit) (address |= (1<<bit)) #define CLRBIT(address,bit) (address &= ~(1<<bit)) #define SET_EN SETBIT(PORT_LCD,EN) #define CLR_EN CLRBIT(PORT_LCD,EN) #define SET_RS SETBIT(PORT_LCD,RS) #define CLR_RS CLRBIT(PORT_LCD,RS) #define SET_RW SETBIT(PORT_LCD,RW) #define CLR_RW CLRBIT(PORT_LCD,RW) // prototipe fungsi void enable(void); // enable fulse for LCD void lcd_init(void); // intialization LCD void lcd_putchar(unsigned char c); // send character to LCD void lcd_putstr(char *s); // send string to LCD void lcd_clear(void); // clear display void lcd_gotoxy(unsigned char i,unsigned char j); //move LCD cursor position Fungsi yang tersedia pada LIBRARY LCD Makro yang tersedia pada LIBRARY LCD
  18. 18. hendri@eepis-its.edu Import from Eclipse
  19. 19. hendri@eepis-its.edu Import from Eclipse
  20. 20. hendri@eepis-its.edu Import from Eclipse
  21. 21. hendri@eepis-its.edu ImportfromEclipse
  22. 22. hendri@eepis-its.edu ImportfromEclipse
  23. 23. hendri@eepis-its.edu ●avrlcd.sourceforge.net ●Lecturer.eepis-its.edu/~hendri Source Code
  24. 24. hendri@eepis-its.edu Jam: 12:12:12 Case Studies 1 ModeMode Set Digtal Clock
  25. 25. hendri@eepis-its.edu Jam: 00:22:12 Case Studies 2 ModeMode Set Stopwatch

×