Thanks, Darrel. I have another question: My timing was way off so I measured the frequency at clkout, it was 2.28 mHz instead of 1.0. I can adjust T to compensate, but is there a way to reset the oscillator?
Thanks, Darrel. I have another question: My timing was way off so I measured the frequency at clkout, it was 2.28 mHz instead of 1.0. I can adjust T to compensate, but is there a way to reset the oscillator?
What type of oscillator configuration are you using?
Since you're expecting to see 1mhz on the clockout pin, I assume you're using the internal 4mhz oscillator. Otherwise you would see the crystal frequency, instead of FOSC/4.
And while the internal oscillators are Never exactly 4.0000mhz, they'll Never be at 9.12mhz (2.28*4). (unless the chip is just bad, also unlikely)
If instead, you're using an external crystal? You may have the wrong freq crystal, or the technique used to measure the frequency is affecting the oscillator, giving an incorrect reading.
But since you say that the program is running at the wrong speed to begin with, I would guess it's the wrong crystal. Or possibly the wrong or no capacitors on the crystal.
DT
Thanks for the reply. There is no crystal, I am using the internal oscillator with clock out. I read somewhere that the oscillator calibration should be preserved, but did not tell me how to do it. I assume that the oscillator is running at its max. My circuit is attached.
Pull up resistors as attached would be much safer.
-------------------
"If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte
Sazer is right.. Pullup resisters will help....
Or, you can use internal pull up resisters. in the chip.
Dwayne
Ability to Fly:
Hurling yourself towards the ground, and missing.
Engineers that Contribute to flying:
Both optimists and pessimists contribute to the society. The optimist invents the aeroplane, the pessimist the parachute
Pilots that are Flying:
Those who know their limitations, and respect the green side of the grass...
Thanks, I will figure out how to use the internal pullups. But, back to the frequency; I could replace the calibration data if I knew where it was, but have not found that info yet. Does anyone know?
There is no calibration register for the 627A's internal oscillator.
Several other chips have an OSCCAL register that allows you to Tweak the frequency a little. But not the 627.
You only have 2 choices, an approximate 4mhz, or an approximate 37khz.
No tweaking allowed.
<br>
DT
Bookmarks