system
December 19, 2012, 6:11pm
1
I need to write something on a LCD, but as you can see, the LCD lib uses the INT0 and INT1 pins, which I need to use also.
#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2)
Where INT0 = digital pin 2, and INT1 = digital pin 3
What can I do? Is there another LCD Lib where INT0 and INT1 are available?
JoshD
December 19, 2012, 6:18pm
2
Depending on what you're working on, the PinChangeInt library might help. It lets you set up interrupts on other pins.
http://playground.arduino.cc/Main/PinChangeInt
system
December 19, 2012, 6:20pm
3
Well, I need to go to an Interrupt Service Routine while a pin is HIGH (during all time it is HIGH).
system
December 19, 2012, 6:21pm
4
Darksaga28:
Well, I need to go to an Interrupt Service Routine while a pin is HIGH (during all time it is HIGH).
What do you mean by that? You mean you want the interrupt to fire repeatedly while the pin is HIGH? What's the point of that?
system
December 19, 2012, 6:24pm
5
I mean, during that condition (while the pin is HIGH), I need to keep doing something on the ISR, and then, go out from ISR when the pin gets LOW.
system
December 19, 2012, 6:42pm
6
Darksaga28:
I mean, during that condition (while the pin is HIGH), I need to keep doing something on the ISR, and then, go out from ISR when the pin gets LOW.
This doesn't sound like something that you ought to be doing in an interrupt. It would be better to do that processing in your main loop.
TCWORLD
December 19, 2012, 8:53pm
7
Just change the pins in the declaration, e.g.
LiquidCrystal lcd(12, 11, 5, 4, 7, 6)
For the LiquidCrystal library it doesn't matter which pins you use.