pic16F1937 interrupt weirdness Timer0 in simulation
Posted: Fri Nov 18, 2016 9:54 pm
I was creating a simple labs exercise in flowcode6 originally. I downloaded that file to my laptop which has flowcode7.
The exercise purpose was to measure one second's worht of time thru using the internal clock with timer0.
Then the purpose was to utilize that interrupt to create a simple seconds timer, which prints out seconds in the LCD screen.
The file was originally created in the school computer on flowcode6 and there did not seem to be any problem at the scchool computer.
However when I'm using my home laptop with trial version of flowcode7, the simulation seems to work completely differently.
I tried to do these labs exercises on flowcode6 at my school computer class. The filed uploaded are for exercises B2 and B3
http://www.flowcode.co.uk/courses/itm/in ... Labs.Lab13
My gripe was about the utilization of the interrupt macro and the execution of the program which seemed incomprehensible to me at this point.
At the school computer, my teacher said that the interrupt macro does not need to be placed inside an "eternal loop". He said something to the effect that the interrupt macro works even when placed outside any loops in the main program, and the effectively result would be that the macro is entered into , at tthe rate of 75 times per second (using prescaler setting at 1:256)
Running that flowcode file into our E-blocks at the school computers worked perfectly in the e-block hardware... But like I said the file was created on flowcode6. And we had e-blocks and flowcode6 and we did measure the seconds counter in the eblocks LCD compared to my own handheld Samsung phone seconds timer. The timer was accurate on the hardware...
using that timer0, one can measure one second's worth of time accurately and construct a digital clock project.
But when I opened my school exercise the program works totally differently on flowcode7, as compared to flowcode6.
In flowcode7, the simulation only runs the macro once.... Then the main program runs until the end, and finishes basically immediately during simulation. (instead of running the timer0 macro, and counting and printing the seconds on LCD screen)
1. Does the interrupt call (of the macro) required to be placed inside a loop, or not... in the main program in flowcode6? My goal is to refer constantly to the timer0 oscillator, with which I can measure one second's worth of time, and fulfill digital clock time measurement for my project.
2.Why is flowcode7 seeemingly different with regard to interrupts on timer0?
The exercise purpose was to measure one second's worht of time thru using the internal clock with timer0.
Then the purpose was to utilize that interrupt to create a simple seconds timer, which prints out seconds in the LCD screen.
The file was originally created in the school computer on flowcode6 and there did not seem to be any problem at the scchool computer.
However when I'm using my home laptop with trial version of flowcode7, the simulation seems to work completely differently.
I tried to do these labs exercises on flowcode6 at my school computer class. The filed uploaded are for exercises B2 and B3
http://www.flowcode.co.uk/courses/itm/in ... Labs.Lab13
My gripe was about the utilization of the interrupt macro and the execution of the program which seemed incomprehensible to me at this point.
At the school computer, my teacher said that the interrupt macro does not need to be placed inside an "eternal loop". He said something to the effect that the interrupt macro works even when placed outside any loops in the main program, and the effectively result would be that the macro is entered into , at tthe rate of 75 times per second (using prescaler setting at 1:256)
Running that flowcode file into our E-blocks at the school computers worked perfectly in the e-block hardware... But like I said the file was created on flowcode6. And we had e-blocks and flowcode6 and we did measure the seconds counter in the eblocks LCD compared to my own handheld Samsung phone seconds timer. The timer was accurate on the hardware...
using that timer0, one can measure one second's worth of time accurately and construct a digital clock project.
But when I opened my school exercise the program works totally differently on flowcode7, as compared to flowcode6.
In flowcode7, the simulation only runs the macro once.... Then the main program runs until the end, and finishes basically immediately during simulation. (instead of running the timer0 macro, and counting and printing the seconds on LCD screen)
1. Does the interrupt call (of the macro) required to be placed inside a loop, or not... in the main program in flowcode6? My goal is to refer constantly to the timer0 oscillator, with which I can measure one second's worth of time, and fulfill digital clock time measurement for my project.
2.Why is flowcode7 seeemingly different with regard to interrupts on timer0?