In this tutorial, I will share hoe to use 4-bit data transfer between to the LCD 16x2. This technique is useful when we want to control LCD from microcontroller, because it use less GPIO pins. 4-bit interface is only used 4 wire from D7 to D4, D3 to D0 is not used. The transfer method is high nibble first, then followed by low nibble.
This is the procedure how to use 4-bit data transfer to display 'A' character:
- Send command: 0b0010 xxxx (Set 4-bit data transfer).
- Send command: 0b0010 xxxx (high nibble function set).
- Send command: 0b1000 xxxx (low nibble function set).
- Send command: 0b0000 xxxx (high nibble display on, underline on, blinking on).
- Send command: 0b1111 xxxx (low nibble display on, underline on, blinking on).
- Send data: 0b0100 xxxx (high nibble 'A').
- Send data: 0b0001 xxxx (low nibble 'A').
Beautiful explanation master.
ReplyDelete