1 Attachment(s)
DT Interrupt and Elapsed Time Running Slow
I'm having troubles with Darrel's Interrupts. Being the FNG that I am, most likely it's my inexperience that’s the trouble and nothing to do with Darrel’s interrupts.
I believe I have the trouble narrowed down to T0CON and T1CON settings. I have a simple program that I’m using to learn the interrupts and elapsed time.
When I configure T0CON or T1CON, the interrupts work, but they run slow. T1CON I’m setting for the DT “ClockCount”. I get the clock running, but it takes 60 seconds for the clock to count up to about 3-4 seconds. I’ve read the datasheet on prescaler , post-scaler, internal timer scaling, external clocks etc. I’m not getting something correct.
Also when I enable T0CON or T1CON, I get bugs in my “DEBUG” some settings make it send garbage, some settings have a mix of good characters and invalid characters.
Debug is using a MAX232, and a DYNEX USB to Serial adapter ( no serial on my PC ) the MAX232 is already on the Micro Chip PICDEM 2+ proto board.
Also I get a Warning on Compile when I include the Interrupt files. “WARNING[207] : FOUND LABEL AFTER COLUMN 1. (INT_LIST)” I don’t know if that has anything to with it, but it’s another clue.
I’m using the 18F2550 pic, PBP version 2.50, DT’s latest interrupts Ver. 3.3, DT’s Elapsed-18 Ver. 1.0.
I’m using the internal 8 MHz OSC, no external clock is connected to the device.
I’m not using any USB, I don’t think I can use the USB without an external OSC, that’s a problem to take on if/when I want to figure out USB stuff.
I’ll include my test program as an .txt attachment (renamed from .pbp). Don’t poke too much fun at it, I’m just learning.
This stuff is addicting.
Thanks,
Shane