i want to make a module for drive a LCD with a PCF8574(A) (in 4bit mode).
My module is finished but, now, i would like that the user of the module can choose how he want to wire the PCF8574 with the LCD.
In my module, i declare the wiring like that :
Code: Select all
Public Structure HD44780_
dLCD As Byte ' PCF8574
BL As dLCD.7 ' P7 (Broche 12)
EN As dLCD.6 ' P6 (Broche 11)
RS As dLCD.5 ' P5 (Broche 10)
RW As dLCD.4 ' P4 (Broche 9)
D7 As dLCD.3 ' P3 (Broche 7)
D6 As dLCD.2 ' P2 (Broche 6)
D5 As dLCD.1 ' P1 (Broche 5)
D4 As dLCD.0 ' P0 (Broche 4)
End Structure
Dim I2CLCD As HD44780_
How write, in program, the choice for user (#option, #define, else...) ?
PS: i hope you understand my poor english.
Bruno