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.

Oscillator configuration for PIC16f877a

Status
Not open for further replies.

raviram87

New Member
i am using the PWM feature of the PIC 16f877a to generate a 36KHz carrier wave with 25% duty cycle for one of my ir remote control projects.

I wrote a code for the above purpose in the MPLAB IDE v7.50... before building the program i have to set configuration bits...

in this, there are 4 options (RC, LP, XT and HS) under OSCILLATOR... what option must i choose and why? I am sure its not RC oscillator.

Note that i will be building the circuit on a protoboard congiguring the PIC to transmit IR codes. What kind of external oscillator must i choose?
 
raviram87 said:
i am using the PWM feature of the PIC 16f877a to generate a 36KHz carrier wave with 25% duty cycle for one of my ir remote control projects.

I wrote a code for the above purpose in the MPLAB IDE v7.50... before building the program i have to set configuration bits...

in this, there are 4 options (RC, LP, XT and HS) under OSCILLATOR... what option must i choose and why? I am sure its not RC oscillator.

Note that i will be building the circuit on a protoboard congiguring the PIC to transmit IR codes. What kind of external oscillator must i choose?

hi,
What crystal/clock frequency are you going to use.?
 
thanks. when is HS then used? i suppose it is for 20Mhz oscillator?

and if i wish to use a 20Mhz external oscillator, should i make any change in the code i write?

does the pic 16f877 have a 4Mhz internal oscillator?
 
raviram87 said:
thanks. when is HS then used? i suppose it is for 20Mhz oscillator?

and if i wish to use a 20Mhz external oscillator, should i make any change in the code i write?

does the pic 16f877 have a 4Mhz internal oscillator?
Dude, pick up your datasheet and read it. All this stuff is covered in detail. Guessing and asking other people to read it for you will not get your project working.
 
If you use 20MHz then you need to change any delays etc in you code. This includes hardware timers, PWM, ADC delays and more.

The 877 doesn't have an internal oscillator. The 887 does.

Mike.
 
@futz

my intention was not to make thers do work for me... i know its not right too... i have the pic16f877's datasheet... i went through it before posting the question, as i couldn understand few things...

thanks for the help guys...
 
raviram87 said:
@futz

my intention was not to make thers do work for me... i know its not right too... i have the pic16f877's datasheet... i went through it before posting the question, as i couldn understand few things...

thanks for the help guys...

hi raviram,
I think I would have problems reading datasheets, if English was not my first language.

Perhaps we should have datasheets written in one these options, just to level the playing field.:) :)

https://en.wikipedia.org/wiki/Asian_languages
 
ericgibbs said:
hi raviram,
I think I would have problems reading datasheets, if English was not my first language.

Perhaps we should have datasheets written in one these options, just to level the playing field.:) :)

Some of the datasheets I've tried to read appear to be written in one of those! :p
 
Nigel Goodwin said:
Some of the datasheets I've tried to read appear to be written in one of those! :p

I thought it was just me.!:)

When I worked for Mitsubishi one of my responsibilties was the 'translation' from Japanese English to technical English.

I learnt some Japanese in order to impress my Japanese visitors.
One day I asked the meeting in Japanese if they would like milk or lemon with their tea.
They all fell about laughing and smiling at my nice secretary.
I asked what was wrong.?

Apparently I had asked them if they wanted human milk in their tea.!
My secretary was a big girl......:)
 
Pommie said:
Hajimimashite Eric san, O-genki desu ka?

Mike.
Hai.
I'm fine.
Ojisan.!

Edit:
This is an example why you have to be careful.
I put myself down as Ojisan..'Uncle' not Ojiisan 'Grandpa'
 
Last edited:
Nigel Goodwin said:
And did they get it? :p

Afraid not, lemon was second on the menu.

After all, she was my secretary, would you share.?:rolleyes:
 
Nigel Goodwin said:
As a married man I couldn't possibly comment! :D

Its one of those questions if you answer either Yes or No, you are damned anyway....:eek:
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top