12f675 dahili ösilatör ayarlıyamadım

Başlatan Elektrik2012, 28 Haziran 2014, 19:31:26

Elektrik2012

Merhaba 12f675 dahili ösilatör ayarlamak istiyorum ayarlıyamadım.Biraz aydınlatırsanız sevinirim.Hayırlı İftarlar


#include <12F675.h>
#device ADC=10
#fuses NOWDT,INTRC_IO,PUT,NOPROTECT,BROWNOUT,NOMCLR,NOCPD
#use delay(clock=4000000)
#define GP0 PIN_A0
#define GP1 PIN_A1
#define GP2 PIN_A2
#define GP3 PIN_A3
#define GP4 PIN_A4
#define GP5 PIN_A5
#byte OSCCAL = 0x90

void init()
{
OSCCAL = 0x80; // set internal oscillator to mid frequency
set_tris_a( 0b00000000 ); // set GP1 output, all other inputs

}
Void main()
{
init();
while ( TRUE ) // blink LED
{
output_high(gp0); //Red
delay_ms(100);
output_low(gp0);
delay_ms(100);

output_high(gp1); //Green
delay_ms(100);
output_low(gp1);
delay_ms(100);

output_high(gp2); //Blue
delay_ms(100);
output_low(gp2);
delay_ms(100);

output_high(gp0); //kAHVERNGİ
delay_us(100);
output_high(gp1);
delay_ms(100);
output_low(gp0); // kAHBE
delay_us(100);
output_low(gp1);
delay_ms(100);

output_high(gp0); //mor
delay_us(100);
output_high(gp2);
delay_ms(100);
output_low(gp0); // kmor
output_low(gp2);

output_high(gp0); //beyaz
delay_us(100);
output_high(gp1);
delay_us(100);
output_high(gp2);
delay_ms(100);
output_low(gp0); // beyaz
output_low(gp1);
output_low(gp2);


output_high(gp1); //yeşil+mavi
delay_us(100);
output_high(gp2);
delay_ms(100);
output_low(gp1); //yeşil+mavi
delay_us(100);
output_low(gp2);

output_high(gp0);
delay_ms(60);
output_low(gp0);
delay_ms(40);
output_high(gp2);
delay_ms(60);
output_low(gp2);
delay_ms(40);

}
}