Searching \ for '[SX] PWM -- SX/B Question' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/ubicom/lib/io/index.htm?key=pwm%2Finde+pwm
Search entire site for: 'PWM -- SX/B Question'.

Exact match. Not showing close matches.
PICList Thread
'[SX] PWM -- SX/B Question'
2008\11\07@173724 by jecuzensn/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, jecuzens wrote:

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

The behaviour I expected was that for the first second the LED is PWM and then after that it is full on... What I am seeing is that the LED goes off after the first second of PWM???

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)

2008\11\07@180042 by beann/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, bean wrote:

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

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, jecuzens wrote:

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

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, JonnyMac wrote:

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)

2008\11\07@182640 by jecuzensn/a
flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, jecuzens wrote:

[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...


Sweet! Thanks! I was pulling my hair for a little bit there! Thanks for the help!

---------- 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...