Hello. i was wondering if there was a way to dim an LED using a picaxe?
I am attempting to replicate the ring of lights on the front of an xbox 360, i have tried myself but cannot figure it out.
I understand that LED' work on current not voltage.
Joe
Sorry about that i forgot to search.
Reading up on the topics though, most things are written in basic and i am scratchy on this, is there any chance any one could demonstrate dimming an LED using flowchart language?
Programmers often write initially in a sort of english they call Pseudo code. It isn't Basic or what every but gets the ideas down so they can then translate into whatever they need - Flow charts for example.
Turn LED on
Pause for a short period
Turn LED off
Pause for a short period
Repeat this action
End
</font></pre></code>
Depending on the pause period - if the LED is
off for longer than it is on it will appear dimmer.
Below about 20 milli seconds your eye hardly notices the flickering.
Alternativly you can experiment with PWM out.
Pulse width Modulation - this is intended to
do exactly this function - try looking up uhe command in the Basic command manual.
Thanks a lot rickharris That has helped,
I can recall pseudo from our software development class at college, in which we program using quick pasqual.
anyway i am using the PICAXE-28 Project Board, is every output on the pin board pwm or just select pins?
Joe
There is potential for some confusion here.
PWM as a term for Pulse Width Modulation and PWM the COMMAND used by some PICAXE variants.
PWM (the command) is not supported on the 28/X
It is only available on 08 and 08M
PWMout is supported on INPUTS (port C) 1 and 2 of the 28X. (not 28 or 28A).
Check the manual for more specifics.
However, the method described by Rick suggests turning outputs on/off for defined periods to emulate a PWM output. This can be done on any of the regular outputs or any of the port C I/O lines.
Port C can only be used for output on the 28X.
Thankyou everyone for your help
it's all coming together now. The ring of lights replica should be working soon.
Thanks again, i wouldn't have been able to do it without you guys.
Joe