Netduino home hardware projects downloads community

Jump to content


Photo

PWM synchronization


  • Please log in to reply
5 replies to this topic

#1 Lebeda

Lebeda

    New Member

  • Members
  • Pip
  • 5 posts

Posted 25 February 2016 - 08:28 AM

I need two 50Hz signals with 120us idle period when both signals are down. How to ensure that period? Based on other inputs I will extend or shorten DutyCycle, but again, how to achieve that both signal will stay synced and won't overlap their ON parts?

 

My idea is to create one 100Hz PWM and using an external T flip-flop to split even and odd peaks. Can it be done without external circuit?



#2 Nevyn

Nevyn

    Advanced Member

  • Members
  • PipPipPip
  • 1070 posts
  • LocationNorth Yorkshire, UK

Posted 25 February 2016 - 03:13 PM

I would not rely upon using the Netduino on it's own to generate two PWM signals which were very closely synchronised.  My reasoning is that because the microframework is interpreted and the GC my run at almost anytime then you cannot guarantee getting the two PWM sources started at the same (or nearly the same) time.

 

Regards,

Mark


To be or not to be = 0xFF

 

Blogging about Netduino, .NET, STM8S and STM32 and generally waffling on about life

Follow @nevynuk on Twitter


#3 xmen

xmen

    Advanced Member

  • Members
  • PipPipPip
  • 72 posts

Posted 05 March 2016 - 05:41 AM

Could you draw an image of what kind of PWMs you are looking for ?



#4 Lebeda

Lebeda

    New Member

  • Members
  • Pip
  • 5 posts

Posted 05 March 2016 - 04:09 PM

Thank you for answers, I found nice chip AtTiny25 which will do required job easily for me at ~1$. I hope I will make basics of C lang.



#5 xmen

xmen

    Advanced Member

  • Members
  • PipPipPip
  • 72 posts

Posted 05 March 2016 - 04:42 PM

Thank you for answers, I found nice chip AtTiny25 which will do required job easily for me at ~1$. I hope I will make basics of C lang.

You're creating software PWM ?



#6 Lebeda

Lebeda

    New Member

  • Members
  • Pip
  • 5 posts

Posted 05 March 2016 - 07:19 PM

I need only two 50Hz signals, I think it should be doable with 10MHz chip, shouldn't be? I'm new to such small controllers and many things work differently than on Windows OS. But six instructions (set HIGH, set LOW, MEASURE - 2x) isn't big deal, is it? What should I be aware of? Interrupts can be disabled.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.