CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

PIC16F18857 external timer_0 setup help needed
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
edbfmi1



Joined: 18 Jul 2006
Posts: 110

View user's profile Send private message

PostPosted: Tue Apr 01, 2025 1:13 pm     Reply with quote

gaugeguy:

The data sheet shows it using the pins for the external resonator that my previous reply lists. Why would the data sheet show this if you can't use it?
temtronic



Joined: 01 Jul 2010
Posts: 9445
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Tue Apr 01, 2025 2:36 pm     Reply with quote

As Mr. T points out the SOSC is designed for 32KHz operation, so no you can't use 4MHz rez. It's in the datasheet 'SOSC(32KHz) ' on front pages...in the 'pin use' charts sosc(32 KHz)..... NOT listed in the 'clock section' at all,though the diagram does show it.. no specs in the back for SOSC either that I could see.

The easy solution is to just use a real 4MHz xtal as the 'primary' clock. Should be do-able ?
Ttelmah



Joined: 11 Mar 2010
Posts: 19765

View user's profile Send private message

PostPosted: Wed Apr 02, 2025 1:02 am     Reply with quote

If you need to run the timer off 4MHz, you can do this _by using an external
clock generator_.
However the whole 'point' of the oscillator available on this is to do things
like handle an RTC using low power. Hence this oscillator is built to use the
least possible power (so you can run it when the main chip is sleeping),
and as such does not have the power to drive a resonator above 32KHz.
As I pointed out the data sheet says that this resonator is designed and
specified to only run very slightly each side of 32768Hz.
It is in the datasheet.
Table 38-17
Parameter 48 Ft1
Secondary Oscillator Input Frequency Range
(oscillator enabled by setting bit T1OSCEN)
32.4 to 33.1 KHz........
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group