Shop OBEX P1 Docs P2 Docs Learn Events
Program loading but not running — Parallax Forums

Program loading but not running

kylekenjkylekenj Posts: 2
edited 2012-09-17 21:23 in Propeller 1
I created a program that would run on the quick start board so I build a PCB for to run it using a minimum board like http://www.parallax.com/Portals/0/Downloads/docs/prod/prop/PropellerHardwareConnections.pdf. I was able to get the first board I built to read the chip and program after fixing my connections but it fried because I wasn't filtering my power supply. I fixed that on my next board and the propeller will read off the prop plug and I can program the ram and the eeprom but the program won't work I then tried to take a simpler program and used this code from ganster gadget.

CON
_clkmode = xtal1 + pll16x
_xinfreq = 5_000_000

OBJ
pst :"Parallax Serial Terminal"
PUB main
pst.Start(115200)
dira[0] :=1
repeat
outa[0] :=1
pst.str(string("LED ON",13))
waitcnt(clkfreq+cnt)
outa[0] :=0
pst.str(string("LED OFF",13))
waitcnt(clkfreq + cnt)

I checked everything with a voltmeter and everything looks good coming in. It loaded but doesn't seem to work. I am not sure what is wrong.

Comments

  • JonnyMacJonnyMac Posts: 9,194
    edited 2012-09-16 22:57
    You have a hardware problem because the code runs fine. I'm running this on a QuckStart. Note, too, that you should use the [ code ] and [ /code ] tags (remove spaces).
    con
    
      _clkmode = xtal1 + pll16x
      _xinfreq = 5_000_000
      
    
    obj
    
      pst : "Parallax Serial Terminal"
    
      
    pub  main
    
      pst.Start(115200)
      dira[16] :=1
      
      repeat
        outa[16] :=1
        pst.str(string("LED ON", 13))
        waitcnt(clkfreq+cnt)
        outa[16] :=0
        pst.str(string("LED OFF", 13))
        waitcnt(clkfreq + cnt)
    
  • average joeaverage joe Posts: 795
    edited 2012-09-17 02:40
    Sounds like a fried PLL. Try
    on
    
      _clkmode = xtal1
      _xinfreq = 5_000_000
      
    
    obj
    
      pst : "Parallax Serial Terminal"
    
      
    pub  main
    
      pst.Start(115200)
      dira[16] :=1
      
      repeat
        outa[16] :=1
        pst.str(string("LED ON", 13))
        waitcnt(clkfreq+cnt)
        outa[16] :=0
        pst.str(string("LED OFF", 13))
        waitcnt(clkfreq + cnt)
    

    If that runs, it's confirmed fried PLL :(

    Note to the guys @Parallax.... Please get rid of these examples that do not show bypass caps!!! I've seen several posts about this issue recently. Might help the "Beginner Friendly" image ;)
  • MagIO2MagIO2 Posts: 2,243
    edited 2012-09-17 02:43
    Try to run it with internal clock (maybe using a smaller baudrate). If this works there is probably something wrong with the crystal. You can also try out other xtal - settings.
  • Dave HeinDave Hein Posts: 6,347
    edited 2012-09-17 08:07
    Post your schematic and pictures of your board. You may still have a problem with the power voltage going to the Prop. The power may be clean enough to run one cog, but when the program runs it starts up a second cog, which increases the current usage. You might need a few bypass caps, or there may be something else wrong with the power conditioning.
  • kylekenjkylekenj Posts: 2
    edited 2012-09-17 21:23
    Thanks a ton guys. It was the lack of bypass caps. I used the tips to check. Sample program worked and my other program works great now.
Sign In or Register to comment.