Electronics > Electronics

F2812 DSP Chip anyone have experience?

(1/2) > >>

Ratfink:
I have a current problem where im limited to the PWM pins 1-6 where 2 pins are being used to control two different motors. The PWM pins 7-12 are being used for another purpose which so its off limits.

Since the timing registers and all three compare registers are being used for the two PWM's how can i get a duty cycle ratio between two different frequencies with the remaining pins?

dunk:
i don't know anything about that platform but what do you have in the way of spare communication ports?
if you have an i2c bus on there for example you could connect a separate microcontroller to handle I/O functions and controll it over the i2c bus.
if you have a spare UART you could do similar (although not as flexible as you will only be able to connect one slave device).

otherwise if you decide to do it on the same processor you are going to need a spare timer capable of generating an interupt.
program your interupt service routine to increase a counter when ever it is called.
change the state of your I/O pin when it gets to the specified delay time and clear the I/O pin when the counter overflows.
you can have several different counters, each controlling a different I/O pin meaning you can get several PWM signals.

dunk.

Admin:
dunk, this might be of possible use to answer your questions at a quick glance:
http://cnx.org/content/m11822/latest/

eZdsp F2812 Reference Technical:
http://c2000.spectrumdigital.com/ezf2812/docs/ezf2812_techref.pdf

ratfink, what are you driving with the PWM?

Ratfink:
Currently it is already driving two motors for the vehicle one is required for forward and backward motion and another for steering. I have a further need for two more PWM's to drive another motor which will be used for my rotating camera (btw the laser thing won't work due to crap camera resolution can't change cameras). Another PWM is needed to tell the motor which direction to turn.

From the manual and also i've tried using a frequency oscilltor it basically says i need 10 KHz and every falling edge will move the motor 1 increment (1.8 degrees). I need it to go alot faster than it does at 10 KHz so i need atleast about 80 KHz to rotate at a decent speed. Since i will be rotating the motor clockwise and anti clockwise 0-180 it also requires a positive DC PWM for clockwise motion and negative voltage for anticlockwise.

Ratfink:
http://focus.ti.com/lit/ug/spru065d/spru065d.pdf

Heres a example document of how the DSP chip works to generate the PWM signals the problem i have is that half the available PWM's are being used for something else which i can't touch while the other half the 3 registers used to specify the Pulse width ratio is already used to control two other motors. Im left with 4 PWM pins which i can't seem to be able to use for controlling the motors since to set them up for such a task would require timers of which only two are provided.

I'd like to avoid using or interfacing a microcontroller

Navigation

[0] Message Index

[#] Next page

Go to full version