Hi all,
I am using PIC16F877A ucontroller to control a cart. The PWM pins are both used to drive the dc motors I have on the cart. I read in the manual that I can use a count function on other pins.
I tried to use the function with Port B pin 7 and display the result on LCD
The LCD works fine, I can display the A/D result and other text
when using the count function the code is COUNT PIN, PERIOD IN us, var
its suppose to count how many times the the pin goes TRUE/FALSE in a period of time and store the value in a variable
the LCD always show 1 as the result.
I tried to move the count function outside the main program loop and nothing happend..
did anyone use this function beofre? any suggestions?