Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

PIC 16F84A Crystal Dont Work?

Status
Not open for further replies.

wolf12

Advanced Member level 4
Full Member level 1
Joined
Mar 31, 2011
Messages
109
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,298
Activity points
2,102
I've been using RC circuits as the ossilator configuration for 16f84a. They work well. But now when I'm trying to use a 4MHz or 10MHz crystal, it doesnt work, even for the blinking LED program. Do I have to change something in the program when changing the oscilator configuration? (Assembly Language used)
 

Are you aware of the oscillator related configuration bits ("fuses")? You have to change default RC to XT oscillator configuration, setting FOSC1 to '0'.
 

Are you aware of the oscillator related configuration bits ("fuses")? You have to change default RC to XT oscillator configuration, setting FOSC1 to '0'.

No i didnt know, you do it in bank 0 or 1? bcf FOSC1 works ?
I read the datasheet and it says about a 2007h register.
 

else if u are using MPLAB IDE u can set config bits separately by unchecking the option ' configuration bits set in code", set oscillator to 'HS' type..hope it works
 
  • Like
Reactions: wolf12

    wolf12

    Points: 2
    Helpful Answer Positive Rating
Its a configuration fuse, not a file register. You have to set it at the programming stage, it can't be changed under program control, if you did it would crash the processor!
You can either set it manually or embed the configuration in the HEX file if your assembler lets you do that. Most programming hardware will check to see if the configuration is stored in the HEX file and if it finds it will set the configuration for you.

For 4MHz you can use either XT or HS mode, for 10MHZ only use HS mode. The only difference between XT and HS modes is the gain of the internal oscillator, there is a wide overlap area around 4MHz where both will work equally well.

Brian.
 
  • Like
Reactions: wolf12

    wolf12

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top