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.

How can pic16f84a blink a led without external oscillator

Status
Not open for further replies.

AriHell

Junior Member level 1
Joined
Jul 7, 2009
Messages
19
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,412
internal oscillator?

Can pic16f84a blink a led without an external oscillator or control a lcd without one?
How can i do that if that is possible?

Thank You.
 

wp100

Advanced Member level 5
Joined
May 15, 2009
Messages
3,056
Helped
883
Reputation
1,781
Reaction score
736
Trophy points
113
Location
Prime Meridian
Activity points
0
Re: internal oscillator?

Hi,

That chip does not have an internal oscillator, so you must use an external crystal or RC.
 

AriHell

Junior Member level 1
Joined
Jul 7, 2009
Messages
19
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,412
Re: internal oscillator?

thank you for your answer.

what kind of Quartz Crystal Resonator i need to use? 4Mhz or it doesnt matter?
 

wp100

Advanced Member level 5
Joined
May 15, 2009
Messages
3,056
Helped
883
Reputation
1,781
Reaction score
736
Trophy points
113
Location
Prime Meridian
Activity points
0
Re: internal oscillator?

Hi,

The crystal determines how fast the micro runs - on the 84A you can use almost anything from 32k hz up to 10 meg hz.
A 4meg hz crystal with 2 x 22pf capactitors is a good starting point - see the data sheet for details.

The 16F84A is a very old chip, there are loads of better ones to use with internal oscillators etc - any reason you have to use that chip ?
 

pranam77

Advanced Member level 5
Joined
Apr 22, 2008
Messages
2,786
Helped
552
Reputation
1,102
Reaction score
371
Trophy points
1,363
Location
INDIA
Activity points
16,418
internal oscillator?

If you wanna blink a LED with internal oscillator, you may use PIC16F628A which is PIN compatible with the one you are using. But the code written for F84 needs to be modified to be used with F628A. Good luck
 

AriHell

Junior Member level 1
Joined
Jul 7, 2009
Messages
19
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,412
Re: internal oscillator?

I will probably order 4Mhz crystal, but right now i have 8.579545MHz 3.579545MHz 4.433619MHz will it work with one of them?
 

pranam77

Advanced Member level 5
Joined
Apr 22, 2008
Messages
2,786
Helped
552
Reputation
1,102
Reaction score
371
Trophy points
1,363
Location
INDIA
Activity points
16,418
internal oscillator?

Yes it will work with any of them. Only thing you notice is the blinking speed rises with the oscillator frequency as already mentioned by "wp100". Good luck
 

AriHell

Junior Member level 1
Joined
Jul 7, 2009
Messages
19
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,412
internal oscillator?

last thing i need to know... what kind of cap i need to use and how many pf it should be?
(i notice that people use 22pf)
can i use 1uf instead?
 

wp100

Advanced Member level 5
Joined
May 15, 2009
Messages
3,056
Helped
883
Reputation
1,781
Reaction score
736
Trophy points
113
Location
Prime Meridian
Activity points
0
Re: internal oscillator?

Hi,

No, you must use the 22pf caps as specified in the chips datasheet - oscillator section.
You can use the next nearest value eg 15pf or 27pf but anything else much larger and it will not oscillate properly so your pic will do nothing.
 

AriHell

Junior Member level 1
Joined
Jul 7, 2009
Messages
19
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,412
internal oscillator?

it is a Ceramic Capacitor right?
 

embeddedlover

Full Member level 5
Joined
Aug 10, 2007
Messages
279
Helped
46
Reputation
92
Reaction score
38
Trophy points
1,308
Activity points
3,155
Re: internal oscillator?

ya it is ceramic capacitor
the capacitor u have to use for a particular frequency will be mentioned by the crystal datasheet
if ur crystal frequency is critical factor use the mentioned caps
the caps that u have to use determines the resonant frequency of the crystal, a deviation from the required value doesn't produce the intended frequency
u can have a look at the below doc for info on crystal oscillators
 

wp100

Advanced Member level 5
Joined
May 15, 2009
Messages
3,056
Helped
883
Reputation
1,781
Reaction score
736
Trophy points
113
Location
Prime Meridian
Activity points
0
Re: internal oscillator?

Hi Arihell,

Your oscillator questions imply you are rather new to the Pic micro side of things.

Did make me wonder how the rest of your led circuit and programming of the 84A chip will be done.
All the members on the forum will help steer you in the right direction if you are unsure of things; also there are quite a few recommended beginners Pic tutorials out there which cover both hardware and software.

This is a good one although the programmer used is rather old by todays standards and there are better alternatives.
https://www.winpicprog.co.uk/pic_tutorial.htm
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top