0

The following link to the library defines arduino pin 5 for input pin for signal.
https://www.pjrc.com/teensy/td_libs_FreqCount.html

But the problem is I'm using an 16x2 LCD display with the arduino pin 5. The display needs pin 5 to work. So the question can solved in two ways,to both of which I don't know the answer.
1. Change LCD pin number to other pin. (Tried it was a failure. I've probably done it wrong)
2. Change the input pin for the freqcount library.

Any idea how to get past this bottleneck?

Michel Keijzers
13k7 gold badges41 silver badges58 bronze badges
asked Jan 8, 2015 at 22:23
2
  • how did you try to change the LCD pin to other pin? can you show a minimum of code to demonstrate? Commented Jan 8, 2015 at 22:27
  • I've used this to try changing pins. LiquidCrystal lcd(12, 11, 4,3 , 2, 1); in place of LiquidCrystal lcd(12, 11, 5,4 , 3, 2); This fails for some reason. Nothing appears on the screen. Commented Jan 9, 2015 at 3:39

1 Answer 1

0

The library makes use of the hardware peripheral Timer 1 which has its input on pin 5 of the Uno.

It can't be changed. You have no choice in that.

You will have to move the LCD to another pin instead.

answered Jan 8, 2015 at 22:29
2
  • any idea how to do that? Commented Jan 9, 2015 at 3:41
  • Like you tried before, but don't use pins 0 or 1 - they are shared with Serial and sometimes that gets in the way - especially if you're also using Serial for communication with a PC at the same time. Commented Jan 9, 2015 at 10:12

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.