The Godfather talking
You may crack software. How about me?
Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
December 10, 2016, 05:55:01 05:55


Login with username, password and session length


Pages: [1]
Print
Author Topic: dspic 30F4011 sucks  (Read 3434 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, 08:38:33 20: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
V.I.P
Senior Member
*****
Offline Offline

Posts: 375

Thank You
-Given: 152
-Receive: 106


If the van is a Rockin'...


WWW
« Reply #1 on: January 28, 2010, 11:39:17 23: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 29, 2010, 12:12:11 00: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, 11:05:16 23: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
**
 Warned
Offline Offline

Posts: 38

Thank You
-Given: 7
-Receive: 16


« Reply #3 on: February 01, 2010, 11:35:31 23: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
V.I.P
Senior Member
*****
Offline Offline

Posts: 375

Thank You
-Given: 152
-Receive: 106


If the van is a Rockin'...


WWW
« Reply #4 on: February 01, 2010, 11:40:58 23: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, 09:09:16 21: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