Author Topic: Timer  (Read 1304 times)

0 Members and 1 Guest are viewing this topic.

Offline coronabotTopic starter

  • Jr. Member
  • **
  • Posts: 9
  • Helpful? 0
Timer
« on: December 13, 2010, 04:43:44 AM »
I try to turn on a square signal in 40K frequency with the timers of pic18f
I use mcc18
But I receive in the output pin a wave with 20 MHz that is the frequency of the crystal
  When I define the timer clock source to be internal it work fine
The problem is when I change the source to be external then I always receive 20 MHz and this is not matter what I do 

Offline waltr

  • Supreme Robot
  • *****
  • Posts: 1,944
  • Helpful? 99
Re: Timer
« Reply #1 on: December 13, 2010, 09:03:40 AM »
We need a good bit more info.
Exactly which 18F PIC? Link to the data sheet.

Code? How are you doing this?

In some PICs there are options to put the Oscillator on a pin which is what I think you are doing.
You probably need to use one of the Hardware timer modules or the CCP module in PWM mode.

Have you read the PICmicro 18C MCU Family Reference Manual along with the data sheet?

 


Get Your Ad Here

data_list