Time measurement
Posted: Wed Mar 21, 2012 10:07 pm
Hello! I'm working on a simple program that shows on the LCD display the delay between pressing two buttons in hundreths of seconds. User presses the first button and the counter starts to increase by 0.00512 by interrupt on TMR0 with 19531.250 Hz frequency and 20MHz clock speed. This interrupt also reads the second button's state and if it's pressed the interrupt is disabled. Then the delay is showed on the LCD display. This is how the program should work, but it doesn't work at all. It only displays "000" after the second button is pressed. I'm using PIC16F628. Maybe I should somehow change the Project's or Chip's options? You can see my Flowcode file in attachment. Thanks in advance.