Shop OBEX P1 Docs P2 Docs Learn Events
Spin Code & the Phantom LED — Parallax Forums

Spin Code & the Phantom LED

HumanoidoHumanoido Posts: 5,770
edited 2010-08-17 07:36 in Propeller 1
Using the Demo Board, can someone tell me why this code lights up the yellow LED on pin 20 and a phantom LED on pin 21 which is half as bright? Thanks in advance.

Humanoido
'' DEMO200.spin for the Demo Board
'' Set yellow LED on pin 20 to output and blink
CON
  LED      = 20                              ' I/O pin
PUB LEDBlink                                 ' Main method on/off signals
  dira[LED]~~                                ' Set pin to output
  repeat                                     ' Loop
    ! outa[LED]                              ' Change pin state
      waitcnt(clkfreq / 4 + cnt)             ' Wait

Comments

  • Ron CzapalaRon Czapala Posts: 2,418
    edited 2010-08-17 06:09
    I had the same issue. It is caused by the resistors between them wired to the VGA connector. To avoid the problem, make the all the LED pins outputs e.g. dira[16..23]~~

    Check the schematic http://www.parallax.com/Portals/0/Downloads/docs/prod/prop/PropellerDemoBd-RevG-Schem.pdf
  • Toby SeckshundToby Seckshund Posts: 2,027
    edited 2010-08-17 07:26
    On one of my homemade "DemoBoard" I put two diodes, in series, from the R,G and B feeds from the 15 way (Anode) down to ground (Cathode). The 1.4V is too small to allow the backfeed to the 1.8V LEDs and too high to affect the 1.0V VGA signal.
  • HumanoidoHumanoido Posts: 5,770
    edited 2010-08-17 07:33
    I had the same issue. It is caused by the resistors between them wired to the VGA connector. To avoid the problem, make the all the LED pins outputs e.g. dira[16..23]~~
    Check the schematic http://www.parallax.com/Portals/0/Downloads/docs/prod/prop/PropellerDemoBd-RevG-Schem.pdf
    Ron, thanks, that worked perfect. Here's the working code.

    Humanoido
    '' DEMO2.spin for the Demo Board
    '' Set a yellow LED on the VGA circuit to output and blink
    '' Choose p16 - p23
    CON
      LED      = 19                   ' I/O pin for on/off signals
    PUB LEDBlink                      ' Main method to send on/off signals
    dira[16..23]~~                    ' Make the all the LED pins outputs to prevent phantom LEDs   
      repeat                          ' Loop
        ! outa[LED]                   ' Change pin state
          waitcnt(clkfreq / 4 + cnt)  ' Wait
    
  • HumanoidoHumanoido Posts: 5,770
    edited 2010-08-17 07:36
    On one of my homemade "DemoBoard" I put two diodes, in series, from the R,G and B feeds from the 15 way (Anode) down to ground (Cathode). The 1.4V is too small to allow the backfeed to the 1.8V LEDs and too high to affect the 1.0V VGA signal.
    Toby, this is brilliant. It sounds like a plan for Parallax to incorporate in the next Demo Board Revision.

    Humanoido
Sign In or Register to comment.