Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
April 26, 2024, 12:55:33 00:55


Login with username, password and session length


Pages: [1]
Print
Author Topic: dspic 30F4011 sucks  (Read 5508 times)
0 Members and 1 Guest are viewing this topic.
mjtooba
Inactive

Offline Offline

Posts: 6

Thank You
-Given: 3
-Receive: 2


« on: January 28, 2010, 07:38:33 19:38 »

hi
how we can use 30F4011 timers to generate square wave ?
atmel timer in CTC mode,easily done this.
i want a hardware solution capable of generating frequencies from 10Hz to 100Khz.
i need low jitter and variable frequency generation (8bit or 16 bit)
Logged
oldvan
Senior Member
****
Offline Offline

Posts: 372

Thank You
-Given: 154
-Receive: 107


If the van is a Rockin'...


WWW
« Reply #1 on: January 28, 2010, 10:39:17 22:39 »

HINT:  You'll get more flies with sugar than with vinegar.

From reading your post, I find the complaint is REALLY your lack of ability, yet you opened by insulting a perfectly good piece of hardware.  That's not a good way to be.

Grab the 30F4011 datasheet and read about the PWM features.  AFTER that, come on back and be polite, ask specific questions and many will gladly help you along.
« Last Edit: January 28, 2010, 11:12:11 23:12 by oldvan » Logged

Give a man a fish and you feed him for a day.
Teach a man to fish and he will sit around in a boat drinking beer all day.
mjtooba
Inactive

Offline Offline

Posts: 6

Thank You
-Given: 3
-Receive: 2


« Reply #2 on: February 01, 2010, 10:05:16 22:05 »

dear oldvan , i read 30F4011,it's timers is dedicated to couting and PWM,i can't found any familiar word in pdf , i hope some one done this by a trick or any thing other like wiring back some pwm output to timer clear/set input  !
i worked by 8051 and avr for years but i am new on pic. Huh
thank you.
Logged
mris99
Junior Member
**
Offline Offline

Posts: 35

Thank You
-Given: 7
-Receive: 16


« Reply #3 on: February 01, 2010, 10:35:31 22:35 »

Hello,

Instead of at the timers you have to find the PWM output in the chapter 13: Output compare module.

The PWM output is belonging to this module, but it is also associated with timers,
because you can select Timer2 or Timer3 as a time base.

The datasheet is not contain a complete description of the modules
you have to check also the Family Reference Manual:

http://ww1.microchip.com/downloads/en/DeviceDoc/70061D.pdf
http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en010337

It contains more detailed description with lot of examples.

Regards,
mris


Logged
oldvan
Senior Member
****
Offline Offline

Posts: 372

Thank You
-Given: 154
-Receive: 107


If the van is a Rockin'...


WWW
« Reply #4 on: February 01, 2010, 10:40:58 22:40 »

Don't panic, there is no "trick", it is all laid out plainly in the data sheets.

I'm guessing you found your way to the 30F4011 page here:
http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en010337

And you've read the datasheet here:
http://ww1.microchip.com/downloads/en/DeviceDoc/70135F.pdf
Especially the PWM section starting page 95.

Also read the 30F family reference manual PWM section:
http://ww1.microchip.com/downloads/en/DeviceDoc/70062E.pdf

The DSPIC chip is a lot more complex than some 8051 and AVR, but like having ridden
a bicycle for years and now wanting to ride a morotcycle, the basic concepts apply,
just a bunch more needs learned to get it right.

Please post a schematic of the circuiit you are using and the code you've tried so far.
Logged

Give a man a fish and you feed him for a day.
Teach a man to fish and he will sit around in a boat drinking beer all day.
mjtooba
Inactive

Offline Offline

Posts: 6

Thank You
-Given: 3
-Receive: 2


« Reply #5 on: February 02, 2010, 08:09:16 20:09 »

thanks
you right, it is so good,it support both variable frequency and variable pwm  Shocked
i am in device selection phase,i wasn't sure dspic can fit in my application,now i'm moving to schematic phase.
i want to PID control of simple stepper motor, dspic control a micro-step drive by optical quadrature ruler feedback.
do you have any solution ? i just want to compensate any step-lose.
i can't do any change in motor or micro-step drive and need to keep system simple and cheap.

Logged
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright © 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC