Structure in Module and choice in Program

Coding and general discussion relating to user created compiler modules

Moderators: David Barker, Jerry Messina

Post Reply
hbruno
Posts: 5
Joined: Mon Sep 28, 2009 9:52 pm

Structure in Module and choice in Program

Post by hbruno » Mon Nov 01, 2010 6:03 pm

Hello all,
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_
With use of "I2CLCD.EN", 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. :oops:
Bruno

Post Reply