I'm running a PIC 16F818 at 4mhz with the internal oscillator. I've got a keypad and an LCD connected and it seems like it is running very slowly. In fact, the LCD always seems to run slowly.
For instance, I'll hit a button once I come to a point in the prog (not on the keypad, just a simple pushbutton) that will take me into a call for a keypad scanning routine on a 4x3 matrix keypad. The LCD will then display "enter first number" and once that is entered it will display "enter second number" on the next line. It probably takes at least a second to two seconds (maybe more) from the time I press and release the button to the time I see something happening on the LCD. I have 0.1 second delays following the BTFSC and BTFSS commands for debouncing each switch, but that only accounts for .2 seconds. What is taking everything else so long?
I don't have a scope but I know the internal oscillator is set to 4MHZ or else it wouldn't have been correctly measuring some pulse widths I had on a recent IR project.
The LCD is a 20x2 HD44780 based display.
I'm also sure it's not this program because in some of my programs I'm doing math with the PIC (like a 30 something instruction cycle division routine) and I'll have it display "answer is" on the LCD and then use a LU table to generate the proper number to display. It seems in this case I'll get "Answer is" and then a second or more after it will fill in my number.
Is this normal for these PICs and LCDs?
For instance, I'll hit a button once I come to a point in the prog (not on the keypad, just a simple pushbutton) that will take me into a call for a keypad scanning routine on a 4x3 matrix keypad. The LCD will then display "enter first number" and once that is entered it will display "enter second number" on the next line. It probably takes at least a second to two seconds (maybe more) from the time I press and release the button to the time I see something happening on the LCD. I have 0.1 second delays following the BTFSC and BTFSS commands for debouncing each switch, but that only accounts for .2 seconds. What is taking everything else so long?
I don't have a scope but I know the internal oscillator is set to 4MHZ or else it wouldn't have been correctly measuring some pulse widths I had on a recent IR project.
The LCD is a 20x2 HD44780 based display.
I'm also sure it's not this program because in some of my programs I'm doing math with the PIC (like a 30 something instruction cycle division routine) and I'll have it display "answer is" on the LCD and then use a LU table to generate the proper number to display. It seems in this case I'll get "Answer is" and then a second or more after it will fill in my number.
Is this normal for these PICs and LCDs?