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 Configuration bits

Status
Not open for further replies.

skorper

Newbie level 6
Joined
Apr 18, 2006
Messages
12
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,400
16f84a config

If __CONFIG H'3FF0' selects the LP oscillator,
Then what is the syntax for selecting the HS __CONFIG x'xxxx'?
I'm stumped........
 

Hi Skorper,
You can find out on page 23 or so of the 16F84a data sheet. The chart shows the lowest two bits are for the OSC configuration. As it is, your hex value converts to bin 11 1111 1111 0000. The least significant bits are on the right, 00. This selects LP osc.
Here:
bit 1-0 FOSC1:FOSC0: Oscillator Selection bits
11 = RC oscillator
10 = HS oscillator
01 = XT oscillator
00 = LP oscillator
So to select the XT OSC, you need to change that to bin 11 1111 1111 0001, which is 0x3FF1.
To select the HS OSC you need to change it to bin 11 1111 1111 0010 which is 0x3FF2.
You can use the windowz calculator in Scientific mode to do conversions like this quickly.

I should point out that 0x3FF2 is the same as H'3FF2'.

I hope this is clear to you, but if you have further questions, just ask.

Best wishes,
Robert

EDITed for correctness by Robert
 

Hey Robert,

That config word should read b'11 1111 1111 0010', or H'3FF2', for HS OSC.
I'm sure that's just a typo error.

Cheers,
 

just read the configuration value from configuration dialog in mplab.
 

Hi Namqn,
YES you are right! Ah! I gave the config for XT! I'll go back and change the post. I did it with the info right there in front of me!

Sorry Skorper
Regards,
Robert
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top