Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 05:29 26 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : (DM) PWM on GPIO?

Author Message
Blackened

Regular Member

Joined: 11/08/2012
Location: Australia
Posts: 66
Posted: 02:47am 11 Aug 2012
Copy link to clipboard 
Print this post

G'day all,

I need some hand-holding ;) I'm a babe-in-the-woods when it comes to microcontrollers. I bought myself one of these Duinomite Megas a couple of months ago to have a play with .

I love it :)

To the point then...... I'd like to keep the existing sound output for *gasp* sound output. But I also need PWM to throttle the power of an electric element. Is there a way to also have PWM on a GPIO pin?

I was kinda hoping to avoid the learning curve associated with editing source code and recompiling a custom hex (forgive my newbie terminology, I think I've got that right lol). If I have to I guess I have to..... I don't suppose this will be supported in future versions?

Oh yeah, during testing I found that the default output on the audio was 100% duty at switch on. To get the voltage to drop to zero I needed to use "SOUND freq,,0". Is this normal? I was expecting 0 volts until a "SOUND" command was executed.

I have a rudimentary understanding of electronics.

Thanks Everyone :)
 
donmck

Guru

Joined: 09/06/2011
Location: Australia
Posts: 1313
Posted: 02:51am 11 Aug 2012
Copy link to clipboard 
Print this post

  Blackened said   G'day all,

I need some hand-holding ;) I'm a babe-in-the-woods when it comes to microcontrollers. I bought myself one of these Duinomite Megas a couple of months ago to have a play with .

I love it :)

To the point then...... I'd like to keep the existing sound output for *gasp* sound output. But I also need PWM to throttle the power of an electric element. Is there a way to also have PWM on a GPIO pin?

I was kinda hoping to avoid the learning curve associated with editing source code and recompiling a custom hex (forgive my newbie terminology, I think I've got that right lol). If I have to I guess I have to..... I don't suppose this will be supported in future versions?

Oh yeah, during testing I found that the default output on the audio was 100% duty at switch on. To get the voltage to drop to zero I needed to use "SOUND freq,,0". Is this normal? I was expecting 0 volts until a "SOUND" command was executed.

I have a rudimentary understanding of electronics.

Thanks Everyone :)


Hi Peter, welcome aboard.

First question. What firmware are your running?

Don...

https://www.dontronics.com
 
Blackened

Regular Member

Joined: 11/08/2012
Location: Australia
Posts: 66
Posted: 02:54am 11 Aug 2012
Copy link to clipboard 
Print this post

  donmck said  

Hi Peter, welcome aboard.

First question. What firmware are your running?

Don...


Hey Don, thanks :)

Running 3.2c
 
donmck

Guru

Joined: 09/06/2011
Location: Australia
Posts: 1313
Posted: 10:21am 11 Aug 2012
Copy link to clipboard 
Print this post


OK, I am not familiar with V3.2 to that degree, so I think best you check in the manual:

Geoff Graham's MaxiMite Page (for all documentation, manuals etc.)
http://geoffg.net/maximite.html

Unless someone in the groups knows off the top of their head.

Don...
https://www.dontronics.com
 
Blackened

Regular Member

Joined: 11/08/2012
Location: Australia
Posts: 66
Posted: 10:32pm 13 Aug 2012
Copy link to clipboard 
Print this post

Thanks Don. It's definitely not a function available with the 3.2C firmware. I was hoping someone more knowledgeable may have already modified DM3.2c to give it this function.

I'm thinking one way around it might be to use SETTICK @ 1 second intervals, and switch a pin on for the desired ms. Then take temperature readings etc... And check for key presses. A 1Hz cycle would probably be fine but I'll need to do some testing and watch the temperature fluctuation. A problem with this method though would be when I need close to 100% duty. I'm not sure how long it takes to read the temperature from a one-wire device (just forget the proper item#). I may find that the temperature wouldn't be updated very frequently, but I guess I could just go from 100% to 90% or whatever it takes to give enough time for everything else.

Still waiting on parts before I can start exploring my options.

Cheers
Peter
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024