Jump to content

PWM-control via Midi


mo1001

Recommended Posts

Hi there!

First I want to say that im very very glad that this projekt exists!

After sucessfully finishing my midibox128, i was wondering if there is any possibillity to control a Motor using a PWM controll  (and of course midi). Of course I did see the MF modul which also handles with PWM, but as i understood the PWM 'times' - which would control the motor speed - are fixed in the code? If they could be controlled via midi it would be great! Does anyone sees a possibility to realize that?

greetz form goettingen

moritz

Link to comment
Share on other sites

Hi Moritz,

how many motors should be controlled?

The PIC contains two special hardware peripherals for PWM generation, one is not allocated by MIOS and can be used for any purpose (e.g. the MBSID application uses this module to generate a 1 MHz clock with 1:1 duty cycle)

The second one is free, if the application doesn't need the USER_Timer process

Best Regards, Thorsten.

Link to comment
Share on other sites

Hi,

@duggle: i thougt about that too, but didnt find a VC PWM-module. And I also think I prefer a software- based solution.

@ tk: Yes, two motors should be ok for a start. Is there any descritpion how to

deal with these PWM outputs? and is it easy to enable the second unused PWM controller? I have little programming skills, and just started with a single core and a MidiO-128 module, without fixing the MIOS code itself, so a hint in the right direction would maybe help me a lot! :)

thanks,

moritz

__________

Link to comment
Share on other sites

Hi Moritz,

the details can be found in the PIC18F452 datasheet, which can be downloaded from the Microchip page.

Chapter 14.5 describes the PWM module, it also contains some hints for the configuration.

I just have noticed, that only Timer2 is allocated - this means, that there are no MIOS specific restrictions.

Best Regards, Thorsten.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...