setting 16f627A to 20 mhz

Status
Not open for further replies.

threewire

New Member
Hi,

I am new to PIC programming.I want to set my PIC 16F627A to 20 Mhz external crystal using the programming software (PICPgm).Could you please tell me how to?Also kindly tell me how do I set the config bits in the C code.I want to know both ways

Thanks in advance.
 
Don't know about PICPgm.But if we are using higher speed xtals like 20MHz we just set the OSC type to " _HS_OSC" in the configuration word.

You must mention the compiler that you are using to give an answer to your 2nd question.
 
Don't know about PICPgm.But if we are using higher speed xtals like 20MHz we just set the OSC type to " _HS_OSC" in the configuration word.

You must mention the compiler that you are using to give an answer to your 2nd question.

well I am using C55X compiler.PICPgm just takes config words.
 
Last edited:
Thing is I have not been able to set the 16f627 to 20 mhz.I did set the HS bits and MCLR_OFF .Prior to this it so happened that without setting the MCLR_OFF the LED code would give unexpected results.If I touch a pin of the microcontroller the LED would either go on or off.Similar to the problem here:

Newbie need Help 16F627a - MEL PICBASIC Forum

After I set the bit the LED blinks once per second which means the PIC is still running at I Mhz.Could some one please suggest what bit should I set in the config for the PIC to work at 20 Mhz.I have not been able to UART comm because of the same.

Below is how the fuse settings look.(Even there are options for setting other config bits.It is in MikroC)
 
Last edited:
Fuses are looks ok.I think your compiler still thinks the processor is 4MHz.You need to do change it from the compiler.
 
Last edited:
Fuses are looks ok.I think your compiler still thinks the processor is 4MHz.You need to do change it from the compiler.

The compiler also reads it 20 mhz.But i still think some problem with the config bits itself.And the controller is working at 1Mhz not 4 .People please help.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…