Looks good, except two things;
1) TFLG1 |= 0b10000000; may have side effects. It will clear not only TC7 flasg, but also other TFLG1 flags.
Use TFLG1 = 0b10000000;
Above doesn't break your current code, but please keep that in mind.
2) As far as I know, serial monitor occupies and write protects 2kB of flash, including regular vector table at FF80-FFFF. I wonder how your code could work with serial monitor since you have
interrupt 15 void ms_count(void){
15 is good for TC7 vector in normal vector table at FF80-FFFF. Having serial monitor installed, you should use secondary vector table at F780-F7FF. You should replace 15 with (15+1024). 1024 is the size of serial monitor divided by sizeof(vector entry)==2.
You also should fix prm file you are currently using. It should have
VECTOR 1024 _Startup
instead of
VECTOR 0 _Startup
Message Edited by kef on
2008-01-22 10:19 AM