incognito007
Newbie level 3
Code:
/*
Frequency 8Mhz
*/
void main()
{
PORTC=0; //Clearing output port
TRISC=0x00; //Initialising C port as output
T2CON=0; //Prescaler for timer (1:1) Timer2 off
CCP1CON=12; //Initialising ADC
TMR2ON_BIT=1; // Turning On timer 2
PR2=199; // Setting Time period/Frequency
CCPR1L=80; // Setting Duty Cycle
}
Will this code generate 10 MHz
Last edited by a moderator: