I try my luck on this forum, as on "User Modules", 75 people have read my post, but 0 replies.
i want to make a module for drive a LCD with a PCF8574(A) (in 4bit mode).
My module is finished but, now, I want the user to choose how he wants to wire the circuit PCF8574 with the LCD.
In my module, i declare the wiring like that :
Code:
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_
With use of "I2CLCD.EN", for example, i can access to the Enable bit without knowing how is wire.
How write, in program, the choice for user (#option, #define, else...) ?
PS: i hope you understand my poor english.
Bruno