It's include in the Elapsed_INT-18![]()
It's include in the Elapsed_INT-18![]()
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
The Timer1 registers are all handled by Elapsed_INT-18.bas, so you shouldn't be changing T1CON. One problem there is that you turned on the RD16 bit in T1CON, but Elapsed_INT-18 doesn't use the timer that way, so it would have been re-loading the wrong values, probably with much longer periods.
For the DEBUG issue ...
Any statements that are timed by software ... Pulsin/out, Serin/out, pause, Debug and others will be disturbed by interrupts. That's just the nature of interrupts.
You should use Hardware whenever possible.
For serial data, use the USART.
And for the FOUND LABEL AFTER COLUMN 1. (INT_LIST) warning.
You can either remove the extra indentation before the INT_LIST macro so that the line starts in column 1.
Or, add this line to the programWhich stops MPASM from giving the warning.Code:@ errorlevel -207
hth,
DT
Thanks Darrel, I removed the indent on the "INT_LIST" macro, that took care of the warning. I never thought an indent would make a warning, I searched high and low in my code and your's for any references to "INT_LIST".
I also stopped changing T1CON settings, I didn't realize you're code was already setting it up.
I still haven't fixed the debug issue. I thought a quick fix would be to disable the interupts before sending the data out on debug, that didn't work.
So now I'm learning about the USART you suggested, which has me confused. How do I use the USART without using "SEROUT" if the interupts will interfer with SERIN/OUT?
Any help on configuration would be great!
Thanks,
Shane
Huh, look at that, HSEROUT is for the USART. Glad you said that, I'm reading the book on SEROUT and going in circles with interupts messing with SERIN/OUT.
I'll see what I can get going with HSEROUT. I'm sure I'll have more questions as I progress. At least I'm not just trying random settings any more, that's progress!!!
Thanks,
Shane
OK, HSEROUT is working, and so is the timer interupt. After almost 30 minutes, it was slow about 20 seconds. I'm guessing that could be drift in the internal OSC? It's all I'll need for the current project.
I used the HSEROUT settings from the PBP manual, I compaired them to the data sheet for the 18F2550, I didn't see anything that I felt like I should change. Learned my lesson with the T1CON settings.
Thanks for the help.
For those reading this that are worried about changing from Debug to HSEROUT, it wasn't bad, I used the following Defines:
The HSEROUT looks like this:Code:DEFINE HSER_RCSTA 90h DEFINE HSER_TXSTA 20h DEFINE HSER_BAUD 9600 DEFINE HSER_CLROERR 1
I'm using the "Serial Communicator" in MicroCode Studio (F4 key)Code:Hserout [10," M: ",dec Minutes," S: ",dec Seconds," T: ",dec Ticks,10]
The pic is connected to a MAX232, I think this is needed for HSEROUT? Someone correct me if I'm wrong.
Also I'm using a DYNEX RS232 to USB adapter:
Model: DX-UBDB9 from BestBuy
I'm Using Windows VISTA, so I downloaded the latest drivers from their website, and only had moderate issues with VISTA ( mostly operator error )
Hope this helps out anyone else that has questions about a setup.
Shane
Bookmarks