TAILIEUCHUNG - Robotics Part 6

Tham khảo tài liệu 'robotics part 6', kỹ thuật - công nghệ, cơ khí - chế tạo máy phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Basic Electronics 113 TABLE Instruction D7 D6 D5 D4 D3 D2 D1 D0 Description Clear display 0 0 0 0 0 0 0 1 Clears display and returns cursor to home position. Cursor home 0 0 0 0 0 0 1 X Returns cursor to home position. Also returns display being shifted to the original position. Entry mode set 0 0 0 0 0 1 I D S I D 0 cursor is in decrement position. I D 1 cursor is in increment position. S 0 Shift is invisible. S 1 Shift is visible. Display ON-OFF control 0 0 0 0 1 D C B D- Display C- cursor B- Blinking cursor 0 OFF 1 ON Cursor Display shift 0 0 0 1 S C R L X X S C 0 Move cursor. S C 1 Shift display. R L 0 Shift left. R L 1 Shift right Function set 0 0 1 DL N F X X DL 0 4-bit interface. DL 1 8-bit interface. N 0 1 8 or 1 11 Duty 1 line . N 1 1 16 Duty 2 lines . F 0 5x7 dots. F 1 5x10 dots. void lcd_init void void lcd_write char char2write void lcd_putch char char2write void lcd_puts char str2write void lcd_goto int row int column void lcd_clear void void lcd_home void void lcd_cursor int cursor void lcd_entry_mode int mode void main void lcd_init lcd_goto 1 1 lcd_puts Welcome To 114 Robotics lcd_goto 1 0 lcd_puts Appin Knowledge Solutions while kbhit wait until a key is pressed. void lcd_init outportb CONTROL inportb CONTROL 0xDF config data pins as output outportb CONTROL inportb CONTROL 0x08 RS is made high control register select lcd_write 0x0f delay 20 lcd_write 0x01 delay 20 lcd_write 0x38 delay 20 void lcd_write char char2write outportb DATA char2write outportb CONTROL inportb CONTROL 0x01 Set Strobe delay 2 outportb CONTROL inportb CONTROL 0xFE Reset Strobe delay 2 void lcd_putch char char2write outportb CONTROL inportb CONTROL 0xF7 RS low data lcd_write char2write void lcd_puts char str2write outportb CONTROL inportb CONTROL 0xF7 RS low datawhile str2write lcd_write str2write Basic Electronics 115 void lcd_goto int row int column outportb CONTROL inportb CONTROL 0x08 if row 2 column 0x40 Add these if you are using LCD module with 4 columnsif row 2 .

TỪ KHÓA LIÊN QUAN
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.