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.

16F88 PWM and A/D conversion

Status
Not open for further replies.

williB

New Member
i am going to be using the 16F684 for Analog/Digital conversion and PWM..
Since i've never done PWM with a pic ,
i am going to need some help ..
one quick question , how many intervals can the PWM signal be broken into??
ie on time vs off time per cycle??
 
Re: 16F684 PWM and A/D convertion

williB said:
i am going to be using the 16F684 for Analog/Digital conversion and PWM..
Since i've never done PWM with a pic ,
i am going to need some help ..
one quick question , how many intervals can the PWM signal be broken into??
ie on time vs off time per cycle??
Well, PIC's PWM module has 10 bit resolution, giving you 1024 different on/off states.
 
one quick question , how many intervals can the PWM signal be broken into??

It depends on the period of Timer2. This in turn depends on the value of the PR2 register. The number of intervals is 4*(PR2+1).
 
holy S ! , thoughts of chinese arithmetic come to mind..
Tosc is probably going to be 20 Mhz , and my PWM frequency is 100HZ..
EDIT ;:: i ment Fosc..
 
Umm...
You want this for an shaker light right?
Then i wodnt recomend runing a PIC at 20Mhz.Run it at the lowest freq. posible.So it wodnt wase much those precus mA from that super cap.

You dont need a fast clock to do this (it cod meaby run on the internal 32KHz oscilator)

I tryed difrent freq. on a PIC and how fast dose it drain a cap.an PIC16F88 run at 16Mhz dicharged the 4400uF bank in seconds wile run at 32Khz it run for minutes .It was the PIC version of the zeatcteribles insane driving beeper so it also had to drive an small piezo speker.
 
yes for the shaker..:)
allright make it 32Khz , sounds good to me..
so Fosc is 32Khz and Pwm freq is say 60 hz..
 
And low voltage programming ..
and an Ansel register which looks like selecting I/O pins is easier..
 
Re: 16F88 PWM and A/D convertion

williB said:
i am going to be using the 16F684 for Analog/Digital conversion and PWM..
Since i've never done PWM with a pic ,
i am going to need some help ..
one quick question , how many intervals can the PWM signal be broken into??
ie on time vs off time per cycle??

wait a moment:

but 16F84 doesnt have an ADC :!: :!: :!:

how do you want to use it for analog digital conversion
 
It also has an internal oscilator.

Yay just got those nice motor controlers from microchip. (along whith some other stuf)
 
an nother at the exsact time post! :D


he seead F88 not F84.

They have ADC beocse i used it on that one
 
Someone Electro said:
It also has an internal oscilator.

Yay just got those nice motor controlers from microchip. (along whith some other stuf)
motor controllers ?
what else?
 
electro , how did your F88 come configured come from the factory??
 

Attachments

  • config.jpg
    config.jpg
    40 KB · Views: 992
I didnt check that.


And i proboly overwiten these settings a cuple of times.I dont have a new one.

The new ones i have are the 16F876 (28 pin) and the 12F675 .Wich i got from microchip yesterday. I didnt even get them out the the box (now micorcip sends it to you in litle plastic boxes that have antistatic foam on the inside)
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top