Shift register question.
#1
Posted 29 December 2010 - 08:07 PM
#2
Posted 29 December 2010 - 08:34 PM
PWM is digital, and yes, you can use shift register to output PWM signal. For example, if you continuously write 0x00, 0x01 to the shift register (e.g. in a loop), there will be PWM signal with 50% duty cycle on its output Q0 (or whatever it the name). You can cycle through more values to increase resolution, e.g. array of 256 bytes will give you 8-bit PWM per channel (shift register output pin).Is there a way I can output a PWM signal using a shift register? It doesn't make sense I think.. since shift registers are working with digital data and PWM is analog right? I am not sure... is it possible?
#3
Posted 29 December 2010 - 09:36 PM
Thanks,PWM is digital, and yes, you can use shift register to output PWM signal. For example, if you continuously write 0x00, 0x01 to the shift register (e.g. in a loop), there will be PWM signal with 50% duty cycle on its output Q0 (or whatever it the name). You can cycle through more values to increase resolution, e.g. array of 256 bytes will give you 8-bit PWM per channel (shift register output pin).
Do you know if this would work with the netduino though?
http://www.sparkfun.com/products/10136
if not then I can do what you said.
#4
Posted 30 December 2010 - 05:50 AM
#5
Posted 30 December 2010 - 05:56 AM
PWM is digital, and yes, you can use shift register to output PWM signal. For example, if you continuously write 0x00, 0x01 to the shift register (e.g. in a loop), there will be PWM signal with 50% duty cycle on its output Q0 (or whatever it the name). You can cycle through more values to increase resolution, e.g. array of 256 bytes will give you 8-bit PWM per channel (shift register output pin).
PWM is sometimes considered "analog-like" because it can deliver power a certain percentage of a time (and giving 5V power half the time is equivalent to delivering 2.5V power all the time...in certain circumstances).
But it's technically digital as CW2 stated.
Chris
Thank you both for clearing that up, i initially thought it was digital but then got confused by the arduino's analogWrite - that is like the PWM for the netduino right?
#6
Posted 30 December 2010 - 09:17 AM
Well, it depends - the IC has serial interface, so it will work with Netduino in general, but it will not be that easy in case you'd want all the advanced functions it provides (for example how to get reference clock for grayscale PWM control). There are several ways how to use this IC, some of them are rather simple (e.g. see TI App Note), but then you are giving away those advanced features (per-channel PWM) and it is basically reduced to a much simpler IC - it makes little sense to have such complex (expensive) IC working this way. Depending on your requirements (per-channel PWM?, constant-current output?, LED diagnostic features?) you may want to select different driver IC that fits better your particular needs.Do you know if this would work with the netduino though?
http://www.sparkfun.com/products/10136
#7
Posted 30 December 2010 - 10:23 AM
Thank you both for clearing that up, i initially thought it was digital but then got confused by the arduino's analogWrite - that is like the PWM for the netduino right?
Yes, exactly.
#8
Posted 30 December 2010 - 05:55 PM
Well, it depends - the IC has serial interface, so it will work with Netduino in general, but it will not be that easy in case you'd want all the advanced functions it provides (for example how to get reference clock for grayscale PWM control). There are several ways how to use this IC, some of them are rather simple (e.g. see TI App Note), but then you are giving away those advanced features (per-channel PWM) and it is basically reduced to a much simpler IC - it makes little sense to have such complex (expensive) IC working this way. Depending on your requirements (per-channel PWM?, constant-current output?, LED diagnostic features?) you may want to select different driver IC that fits better your particular needs.
You make a good point... but why turn down a challenge? I'll try to get it to work (the advanced PWM stuff). 16 PWM ports is a pretty good deal, I might be able to actually come up with a useful project.
#9
Posted 25 January 2014 - 01:46 AM
Did you ever get this to work? Thanks.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users