Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

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.
picpgm config se&#99.JPG
 
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)
config bits..JPG
 
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.

Latest threads

New Articles From Microcontroller Tips

Back
Top