View previous topic :: View next topic |
Author |
Message |
Ttelmah
Joined: 11 Mar 2010 Posts: 19655
|
|
Posted: Wed Oct 05, 2022 2:15 am |
|
|
To me, that it doesn't work on the internal oscillator, but does on the
external, says that the calibration value has probably been lost.
You have not answered my question about whether different chips are
involved.
A lot of the unofficial 'knock off' chips have faulty calibration values, and
as the post I gave the link to earlier shows, some real ones do as well.
The amount of the error is too large to be explained any other way. |
|
|
PrinceNai
Joined: 31 Oct 2016 Posts: 507 Location: Montenegro
|
|
Posted: Wed Oct 05, 2022 6:41 pm |
|
|
Have you tried with another kind of PIC? Are yours original? I use internal oscillator at max. possible speed of 32MHz in like 90% of my projects, almost all of them with serial comm higher than 9600. It is true that everything so far is running at close to room temperature (18 - maybe 30 deg Celsius). I've never experienced any problems, on three different chips. On my test board with 18f46k22 (now version 8) nothing ever changed if I went from 20MHz crystal to 32MHz internal clock. Software serial works too. On 5V and 3.3V. |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9377 Location: Greensville,Ontario
|
|
Posted: Thu Oct 06, 2022 6:18 am |
|
|
Like the Prince... I've used the 46k22 for years,top speed and never had the serial ports miss a bit at 1Mbaud.
I'm wondering what value the 'OSCTUNE' register has. It should be '0' according to the datasheet. If not, then some code has changed it, and it should be coded to zero.
If that doesn't make it work right, determine whether the clock is fast or slow, then change 'OSCTUNE' slow or fast. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19655
|
|
Posted: Thu Oct 06, 2022 6:23 am |
|
|
If you look though he is using the 886, which was one of the first chips
to have a reasonably accurate internal oscillator. Limited to just 8MHz
(no PLL).
Almost an antique product now. Nearly 20 years old.
The K22 family is a much later product.
I suspect he is using old chips, and has managed to erase the cal value
on some of them, hence the speed error. |
|
|
|