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

PIC Workbench Talk

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Regular Guy



Joined: 04 Jun 2017
Posts: 110

View user's profile Send private message

PIC Workbench Talk
PostPosted: Mon Jul 05, 2021 8:01 pm     Reply with quote

Was looking at 10F200 datasheet.

Saw the FOSC4 pin. Actually 'Function' in pin description.

Says Oscillator/4 Output.

What does the 4 mean?

Is this a good pin to connect oscilloscope to?

I suppose the other lead would go to ground.

Here is the datasheet.

https://ww1.microchip.com/downloads/en/DeviceDoc/40001239F.pdf
_________________
PIC Hobbyist
temtronic



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

View user's profile Send private message

PostPosted: Mon Jul 05, 2021 8:08 pm     Reply with quote

The pin will have 1/4 of the PIC clock speed on it...
say the PIC is running at 4MHz, then the pin will have a 1MHz square wave as seen with an oscilloscope. It could be used as a 'clock source' for external peripherals or say another PIC.

Most PIC I/O pins have several uses, so you'll have to choose IF you want that function.
Regular Guy



Joined: 04 Jun 2017
Posts: 110

View user's profile Send private message

PostPosted: Mon Jul 05, 2021 8:16 pm     Reply with quote

Thank you

You beat me to it about pin being multiplexed.

Datasheet pin description also says this.

For that pin 4

TOCK1

Clock input to TMR0

Seems like that would take some work on control register.

Timer0 module. To make it clock in.
_________________
PIC Hobbyist
Ttelmah



Joined: 11 Mar 2010
Posts: 19495

View user's profile Send private message

PostPosted: Tue Jul 06, 2021 7:21 am     Reply with quote

You almost never have to touch a register in CCS.

To set that pin to be a clock input, you use the setup_timer_0 function,
with the setting T0_EXT_L_TO_H (or H_TO_L).

This sets it to clock on the high or low edge of the clock applied to this
pin.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
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