The code of interest are the "Define" statements above. What am I defining actually, and are these above number related to Arduino pins or to the LCD module itself?
My unit is A 4 wire interface from the module 5+, GND, SDA, SCL
The reason this is so important is because I am wanting to interface my Arduino and use it
as a tachometer. I have read several postings related to this. The problem would be in the assignment of the interrupt to digital pin 2 or 3 in my addon code, if the above code actually is utilizing the Arduino pin assignments. This is where I need the clarification.
The code of interest are the "Define" statements above. What am I defining actually, and are these above number related to Arduino pins or to the LCD module itself?
You are defining which of the pins on the PCF8574 or PCF8574A chip (which is on the I2C adapter) is used to drive each of the corresponding LCD module connections.
In your case #define En_pin 2 means that the LCD Enable pin will be driven by the PCF8574(A) pin number 2, etc.
Thank you all for this valuable insight.
I feel much better about proceeding now without worrying about misusing the Arduino pins dealing with the interrrupts I need.
floresta:
You are defining which of the pins on the PCF8574 or PCF8574A chip (which is on the I2C adapter) is used to drive each of the corresponding LCD module connections.
In your case #define En_pin 2 means that the LCD Enable pin will be driven by the PCF8574(A) pin number 2, etc.
Don
But just to be clear the "pin number 2" is not the physical pin number on the pcf8574 16 pin chip.
It is the Px pin on the output port or the bit number in the output port register of the 8574.
i.e. pin number 2 or P2 is actually physical pin 6 of the chip.
So 0 means P0, 1 means P1 etc...
I had overlooked that point although it should have been obvious to me since IC pin numbering begins with 1 and not 0. I hope that correcting the wording of my answer doesn't make it more confusing by introducing some additional technical terms.
How about this?:
"You are effectively defining which of the pins on the PCF8574 or PCF8574A chip (which is on the I2C adapter) is used to drive each of the corresponding LCD module connections.
In your case #define En_pin 2 means that the LCD Enable pin will be driven by the PCF8574(A) pin that corresponds to bit number 2 of it's output port register, etc."
You are effectively defining which of the pins on the PCF8574 or PCF8574A chip (which is on the I2C adapter) is used to drive each of the corresponding LCD module connections.
I would say:
You are defining which of the i/o output port pins on the PCF8574 or PCF8574A chip (which is on the I2C adapter) is used to drive each of the corresponding LCD module connections.