Exact match. Not showing close matches.
PICList
Thread
'[SX] PWM -- SX/B Question'
2008\11\07@173724
by
jecuzensn/a
|
|
So I've been trying to use some switching between an LED being full on and PWM and I'm running into some problems... The below code demonstrates what I'm seeing...
' BUG.SXB
DEVICE SX28, OSC4MHZ, TURBO, STACKX, OPTIONX, BOR42
FREQ 4_000_000
Led PIN RC.7 OUTPUT increaseVal VAR BYTE
PROGRAM Start
Start:
increaseVal = 0
DO
IF increaseVal > 10 THEN
Led = 1
ELSE
PWM Led, 50, 2
ENDIF
PAUSE 100
INC increaseVal
LOOP
Why is this happening!?!
---------- End of Message ----------
You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=305945
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2008 (http://www.dotNetBB.com)
|
|
PWM is only generated during the PWM command.
During the PAUSE 100 there is no PWM to the LED.
Bean
---------- End of Message ----------
You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=305945#m305956
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2008 (http://www.dotNetBB.com)
2008\11\07@180336 by jecuzensn/a
|
|
The problem isn't the lack of PWM during the PAUSE but that once the counter (increaseVal) becomes greater than 10 it should switch the LED on permanently... This doesn't happen! It turns the LED off???
---------- End of Message ----------
You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=305945#m305957
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2008 (http://www.dotNetBB.com)
2008\11\07@182229 by JonnyMacn/a
|
|
The problem is that the PWM command leaves the LED pin in an input state -- change Led = 1 to HIGH Led.
From the help file PWM page:
After outputting the PWM pulses, the SX leaves the pin in input mode...
---------- End of Message ----------
You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=305945#m305961
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2008 (http://www.dotNetBB.com)
|
|
[Quoting: "JonnyMac"]The problem is that the PWM command leaves the LED pin in an input state -- change Led = 1 to HIGH Led.From the help file PWM page:
After outputting the PWM pulses, the SX leaves the pin in input mode...
---------- End of Message ----------
You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=305945#m305965
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2008 (http://www.dotNetBB.com)
More... (looser matching)
- Last day of these posts
- In 2008
, 2009 only
- Today
- New search...