• AVR Freaks

Helpful ReplyHot!PIC16F18876 datasheet OSCTUNE

Author
awolfe
Junior Member
  • Total Posts : 95
  • Reward points : 0
  • Joined: 2009/08/20 09:52:07
  • Location: Ashland, OH
  • Status: offline
2020/09/16 11:07:04 (permalink)
5 (1)

PIC16F18876 datasheet OSCTUNE

The PIC16F18876 datasheet Rev E (Latest on the website) is obviously goofed up on the OSCTUNE register.  I would attach it in-line, but I am not allowed.  We will see if it allows me to attach the clip from the datasheet...
 
1st, according to the simulator, it boots up agreeing with the datasheet, with a value of "0b100000".  I assume it would boot up with the center frequency as the default... So, is it booting up at the center frequency, or the minimum frequency?  Normally the tuning just acts as a 2's compliment number with 0 being the center frequency.
 
Beyond that, obviously, nobody proof read the tuning bits on this page!

Attached Image(s)


A Wolfe
#1
upand_at_them
Super Member
  • Total Posts : 765
  • Reward points : 0
  • Joined: 2005/05/16 07:02:38
  • Location: Pennsylvania
  • Status: offline
Re: PIC16F18876 datasheet OSCTUNE 2020/09/16 12:45:31 (permalink)
+1 (1)
awolfe1st, according to the simulator, it boots up agreeing with the datasheet, with a value of "0b100000".  I assume it would boot up with the center frequency as the default... So, is it booting up at the center frequency, or the minimum frequency?

 
What does reading the register show?
#2
jtemples
عُضْوٌ جَدِيد
  • Total Posts : 12032
  • Reward points : 0
  • Joined: 2004/02/13 12:31:19
  • Location: Southern California
  • Status: offline
Re: PIC16F18876 datasheet OSCTUNE 2020/09/16 12:51:30 (permalink)
+2 (2)
it boots up agreeing with the datasheet, with a value of "0b100000"


But that doesn't agree with the data sheet.  I do agree that the data sheet seems to have flipped minimum and maximum around.
#3
awolfe
Junior Member
  • Total Posts : 95
  • Reward points : 0
  • Joined: 2009/08/20 09:52:07
  • Location: Ashland, OH
  • Status: offline
Re: PIC16F18876 datasheet OSCTUNE 2020/09/16 13:00:36 (permalink)
0
I have spent a couple hours setting up verifying OSCTUNE operation on this chip.  It does work as expected in real life.  It starts up with a value of 0x00.  Setting it to 0x1F increases the oscillator speed by approx. 2.5%.  Setting it to 0x20 decreases the oscillator speed by approx. -2.5%.
 
Where do I report document errors?

A Wolfe
#4
awolfe
Junior Member
  • Total Posts : 95
  • Reward points : 0
  • Joined: 2009/08/20 09:52:07
  • Location: Ashland, OH
  • Status: offline
Re: PIC16F18876 datasheet OSCTUNE 2020/09/16 13:06:26 (permalink)
0
jtemples
it boots up agreeing with the datasheet, with a value of "0b100000"


But that doesn't agree with the data sheet.  I do agree that the data sheet seems to have flipped minimum and maximum around.




It does agree with the indication of the bits at startup in the datasheet... bit 5 is indicated as "R/W-1/1", all other bits are "R/W-0/0".  That is what the simulator shows, but that is not what the real chip does, as indicated in the post above.
post edited by awolfe - 2020/09/16 13:15:58

A Wolfe
#5
jtemples
عُضْوٌ جَدِيد
  • Total Posts : 12032
  • Reward points : 0
  • Joined: 2004/02/13 12:31:19
  • Location: Southern California
  • Status: offline
Re: PIC16F18876 datasheet OSCTUNE 2020/09/16 13:15:54 (permalink)
+1 (1)
But your image also shows a default value of 0 below the register bits.
#6
hexreader
Super Member
  • Total Posts : 1125
  • Reward points : 0
  • Joined: 2008/05/04 03:06:55
  • Location: England
  • Status: online
Re: PIC16F18876 datasheet OSCTUNE 2020/09/16 13:32:53 (permalink) ☄ Helpfulby awolfe 2020/09/16 13:42:30
+4 (4)
Here is what I found for OSCTUNE in PIC16F18856 (don't own PIC16F18876) - same family:
 
hex   1KHz PWM (Hz)
20     978
28     984
30     991
38     998
3a   1000
3f    1003
00   1005   (power-up value)
08   1011
10   1019
1f    1032
 
All rounded with error +- 2 Hz wavering. Measured with accurate Frequency Counter
Add another 2 to 3 Hz after long warm-up time

Experienced Hobbyist
#7
Mysil
Super Member
  • Total Posts : 4074
  • Reward points : 0
  • Joined: 2012/07/01 04:19:50
  • Location: Norway
  • Status: offline
Re: PIC16F18876 datasheet OSCTUNE 2020/09/16 14:59:55 (permalink)
+1 (1)
Hi,
Datasheet for PIC16(L)F18855/18875 seem to have the same documentation error.
Register heading show bit 5 = R/W-1/1
Actual hardware PIC16F18875 come up with Reset value OSCTUNE = 0b00000000 
 
Simulator is created according to Datasheet, or the database used for the datasheet,
so when there is documentation error, then simulator become wrong also.
In DS40001802E-page 126  description is also wrong.
 
To report documentation errors, use the same support interface as any other support case:
www.microchip.com/support
It will be forwarded to:
https://microchipsupport.force.com/s/
 
    Mysil
#8
awolfe
Junior Member
  • Total Posts : 95
  • Reward points : 0
  • Joined: 2009/08/20 09:52:07
  • Location: Ashland, OH
  • Status: offline
Re: PIC16F18876 datasheet OSCTUNE 2020/09/17 06:43:50 (permalink)
0
Thanks Mysil,  I created a ticket and included the DS40001802E document as well.

A Wolfe
#9
Jump to:
© 2021 APG vNext Commercial Version 4.5