The answers are in the errors. They tell you what you need to do.
The answers are in the errors. They tell you what you need to do.
DT
...perhaps the errors mean something to those who know, but I am not smart enough to know (hence the reason I am for asking for help). A little more guidance would be appreciated. am I suposed to edit pbppic14.lib, if so how and where, its a huge file. Or am I suposed to change the includes file for the PIC16F887?
Thanks,
Charlie
OK. Thanks, Compiles now and have a blinking LED. Back to the timing... Sorry I am so dense with this.
How do I go about setting the timer for prescale of 1 and a peload of 21537
I have been looking at previous posts and the datasheet for the 16f887, but not really sure what I need to do.
I assume I have to set T1CON and perhaps OPTION_REG
Also would I be better off using Timer2 since its 8bit (would it be less resources, etc?). As the timer is tripping along, there is no issue with timing of other things like serial commands, I2C timing, etc?
http://www.picbasic.co.uk/forum/show...7472#post17472
Has the example to set the pre-scaler.
Then in your code for the pre-load.
Then in the interrupt routineCode:PreLoad VAR WORD PreLoad = 21537 TMR1L = PreLoad.LowByte TMR1H = PreLoad.HighByte
Maybe....Code:TMR1L = PreLoad.LowByte ' Load the timer with preload value. TMR1H = PreLoad.HighByte
Dave
Always wear safety glasses while programming.
cool. I had it in the begining, did not have it in the interupt. Firing every 22ms on the scope.
So, this will not mess up anything as far as I2C or serial? or is that dependent on what I do during the interupt? (The final interupt will take about 10-14ms and fire off every 22ms)
You need to get in and out of an interrupt routine as quick as possible.So, this will not mess up anything as far as I2C or serial? or is that dependent on what I do during the interupt? (The final interupt will take about 10-14ms and fire off every 22ms)
So if the I2C and serial stuff is handled out side then you should be good.
Dave
Always wear safety glasses while programming.
Bookmarks