Interface LcdGpioAdapter
- All Known Implementing Classes:
BaseLcdGpioAdapter
,GpioLcdAdapter
,Mcp23008LcdAdapter
,Mcp23017LcdAdapter
,Pcf8574LcdAdapter
,ShiftRegisterLcdAdapter
public interface LcdGpioAdapter
The GPIO Adapter for the LCD.
- Author:
- Rafael Ibasco
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Perform any necessary initialization.void
setEnableState(com.pi4j.io.gpio.PinState state)
Sets the LCD's Enable Pin statevoid
setReadWriteState(LcdReadWriteState state)
Sets the LCD's Read/Write Pin state.void
Sets the LCD's Register Select Pin statevoid
write4Bits(byte value)
Sends a 4-bit value to the interface.void
write8Bits(byte value)
Sends an 8-bit value to the interface.
-
Method Details
-
initialize
void initialize()Perform any necessary initialization. (e.g. Setting pinmodes of digital output pins) -
write4Bits
Sends a 4-bit value to the interface.- Parameters:
value
- The 4-bit value to be transmitted over the LCD Interface- Throws:
IOException
- Thrown when a problem occurs during transmission
-
write8Bits
Sends an 8-bit value to the interface.- Parameters:
value
- The 8-bit value to be transmitted over the LCD Interface- Throws:
IOException
- Thrown when a problem occurs during transmission
-
setRegSelectState
Sets the LCD's Register Select Pin state- Parameters:
state
- The state of the Register Select Pin. Set to eitherLcdRegisterSelectState.COMMAND
orLcdRegisterSelectState.DATA
-
setReadWriteState
Sets the LCD's Read/Write Pin state. Setting the state to WRITE will set the LCD RW pin to LOW while READ will set the LCD RW pin to HIGH.- Parameters:
state
- The state to set (READ/WRITE) for the LCD RW Pin
-
setEnableState
void setEnableState(com.pi4j.io.gpio.PinState state)Sets the LCD's Enable Pin state- Parameters:
state
- ThePinState
to set for the LCD Enable pin.
-