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?

2
  • how did you try to change the LCD pin to other pin? can you show a minimum of code to demonstrate?
    – cjferes
    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.
    – Parth Sane
    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.

2
  • any idea how to do that?
    – Parth Sane
    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.
    – Majenko
    Jan 9, 2015 at 10:12

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.