software PWM on digital outs?

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

software PWM on digital outs?

Postby Raphihell » Sun Sep 28, 2008 1:07 am

any thoughts on generating a procedure that would use the timer to create a software PWM signal on the digital pins? Seems simple enough in principle, after all PWM is a digital signal....
Just doing cost/benefit analysis- If i want individual control over the maximum # of LED's for fading purposes, -Im just thinking that a arduino+say a tlc5940 gives you about 16 PWM signals, but a stand alone Atmega 168 could potentially have 14 if you could convert the digital ones- run it through a transistor array chip and I think the cost per channel would be pretty cheap in terms of $$ (maybe expensive in terms of processing_) but simpler in a way.
Why haven't seen this anywhere? Am I missing something?
R
boo
User avatar
Raphihell
 
Posts: 3
Joined: Sat Sep 27, 2008 8:30 pm

Postby mtbf0 » Sun Sep 28, 2008 7:16 am

you mean like this?

and early version of the code was posted here.
"i want to lead a dissipate existence, play scratchy records and enjoy my decline" - iggy pop, i need more
User avatar
mtbf0
 
Posts: 1642
Joined: Fri Nov 09, 2007 11:59 pm
Location: oakland ca

hmmm

Postby Raphihell » Sun Sep 28, 2008 11:24 am

wondering about this:
there is currently no scripting capability. what you are seeing is commands sent to it over serial from a minicom script.

not sure what that means- but I have taken a look at the project and the code a bit.
Id like to make a standalone replicable chip that can make some decisions on its own if possible, mostly walking through the PWM values according to some programming I can mess with within arduino. ... also not interested in using an rgb system. just individual LEDs all the same color.....

(PS I keep wanting to send you pictures of my cat!) ha. thinking of changing my avatar image towards that end.
boo
User avatar
Raphihell
 
Posts: 3
Joined: Sat Sep 27, 2008 8:30 pm

Postby mtbf0 » Sun Sep 28, 2008 1:36 pm

minicom is just a little terminal emulator program found on various unix type systems. who knows, maybe even on osx. it's intended use was to automate logins to remote systems, so it has a scripting facility to make it easier to navigate different systems' login dialogs.

since i had a little sketch running on my arduino that was capable of accepting commands over a serial connection i decided to use minicom to send long command sequences and repeat them. since then i have made my project scriptable so i can just program sequences into it and have them run automatically. it retains the serial interface, so that can be used either to run individual commands or to start up a script.

there is nothing inherently rgb about the part of the code that generates the pwm, it's just turning things on and off. if you'd like help reusing code i'd be more than happy to lend a hand.

you may also be amused by orgonan, which uses hardware pwm to generate audio, then interprets itself as a (sic) musical composition. or by the trippy rgb brain machinuino which is basically a two voice orgonan with six channels of soft pwm driven leds.
"i want to lead a dissipate existence, play scratchy records and enjoy my decline" - iggy pop, i need more
User avatar
mtbf0
 
Posts: 1642
Joined: Fri Nov 09, 2007 11:59 pm
Location: oakland ca


Return to Arduino

Who is online

Users browsing this forum: Google [Bot] and 2 guests

Stuff to buy from the Adafruit store and links to product documentation!


New Products [102]

Raspberry Pi[80]
 
FLORA[23]
 
Bunnie Studios[9]
 
FPGA[1]
 
mbed[11]
Arduino[60]
 
NETduino[14]
 
BeagleBone[24]
 
Android[6]
 
XBee[10]
More Dev Boards[30]


 
BoArduino[8]
 
SpokePOV[4]
 
TV-B-Gone[4]
 
MiniPOV[3]
 
SIM reader[3]
 
Microtouch[5]
 
Clocks & Watches[18]
 
Drawdio[4]
 
Brain Machine[1]
 
Game of Life[2]
 
MintyBoost[2]
More DIY Kits[16]


 
MaKey MaKey[3]
 
Tweet-a-Watt[5]
 
Young Engineers[33]
 
Discover Electronics[2]
 
Snap Circuits[4]
 
littleBits[3]
 
Project packs[8]


 
Breakout Boards[33]
LCDs & Displays[48]
Components & Parts[69]
Batteries & Power[49]
EL Wire/Tape/Panel[52]
LEDs[109]
 
Wireless[14]
Cables[60]
 
Lasers[6]
Sensors/Parts[145]
 
Enclosures/Cases[11]
 
Solar[11]
 
RFID / NFC[13]
Prototyping[70]
 
iDevices[13]
Tools[71]
 
Wearables[39]
 
CNC[37]
 
Robotics[29]
 
3D printing[1]
 
Materials[24]


 
Stickers[41]
 
Skill badges[55]
 
Books[25]
 
Circuit Playground[7]
 
Gift Certificates[4]