I have PICBasic and I would like to know how you would define or declare in the program that you are using a xtal that is other than 4MHz
I have PICBasic and I would like to know how you would define or declare in the program that you are using a xtal that is other than 4MHz
Rhatidbwoy, All you would do is place this define at the top of your program:
DEFINE OSC 20 '20 Mhz
DEFINE OSC 8 '8 Mhz
Dave Purola,
N8NTA
and don't forget the configuration fuse... See FAQ to know how to set them in the code.
Usually.. XT = 4MHZ HS > 4 MHZ
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
ok got it.
the other thing is that I was speaking to a tech at Mechanique and he was talking about how the program does not really need that in it. That is the PICBasic using the MicroCode Studio. The one thing that I would have to do is to change the time constant commands by five when using a 20MHz Xtal
The other thing tha I would like to mention is that Define OSC 20 in PICBasic does not really give any other that error.
I just went through a similar problem trying to change crystal frequencies.
This is what I found:
DEFINE is only available in PicBasic PRO.
In MicroCode Studio, you can change the oscillator type, XT, HS, R/C, etc.
After you have clicked on "compile and program", the next box to come up is "meProg-......". Click on VIEW and then CONFIGURATION ( you might have to click CONFIGURATION twice). The meProgram screen will come up and you can make changes to the oscillator there.
You will still have to compensate for a different oscillator frequency in your program.
Good Luck
Brewster............another newby
I got the whole xtal thing to go. I am using the intrc right now, but yes it is a program orientated thing in PICBasic.
Thanks
P.S. problems that I was having with everything to my project was the power supply in my computer. It died the other day.
Bookmarks