Shop OBEX P1 Docs P2 Docs Learn Events
P8X32A Breakout: Program compiles and loads successfully, but doesn't run. — Parallax Forums

P8X32A Breakout: Program compiles and loads successfully, but doesn't run.

sshaginyansshaginyan Posts: 9
edited 2013-05-24 08:03 in Learn with BlocklyProp
Hi guys,
This is my first time posting to the forums and first time playing with a propeller microprocessor. This is the breakout I have https://www.sparkfun.com/products/11525 and this is USB to serial I'm using to program it https://www.sparkfun.com/products/9873. I'm on OS X so I'm using bst http://propeller.wikispaces.com/Mac+and+Linux+native+development as an IDE, compiler, and loader. When I click "Detect Propeller" I get a message saying, "Detected a Propeller Version: 1". Also it seems like I can successfully load to Ram and EEPROM. However my program doesn't start. Here is the simple code I'm trying to run

```
CON
_clkmode = xtal1 + pll16x _xinfreq = 5_000_000
PUB main
dira[15] := 1
repeat // with and without repeat
outa[15] := 1
```

The reason I'm using pin 15 is because by default it's connected to an led on board. http://dlnmh9ip6v2uc.cloudfront.net/datasheets/Dev/Propeller/P8X32A_Breakout.pdf (Look at JP9)

I've used the USB to serial programmer to program my Arduino before, so it's not broken. I've also tried using https://www.sparkfun.com/products/9717 with similar problems.

My interface between the programmer (https://www.sparkfun.com/products/9873) and the P8X32A Breakout Looks like this.

programmer=P8X32A Breakout
DTR===== DTR
RXI=======TX
TXO======RX
3v3=======3v3
CTS======Nothing
GND======GND (CTS and GND pins are connected I've tried either one and both)

I've also tried to do the program above with other pins and leds with no success.

I've read in the comments at the SparkFun website
"note, if your using the propstick, you need to apply 5v+ to the VCC pin, not 3.3v to the 3.3v pin just below it. anything under 5 on the top left VCC pin will not power the board on enough for the propstick to recognise it (PWR led comes on but propstick will not see it. Must have 5v+ on VCC pin)."

I haven't tried this with my programmer (however I have the option of converting to 5v instead of 3.3v).

I've been at this for a few days now. Any help would be great.

Thank

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2013-05-24 07:32
    It's hard to tell what your program does because the forum software changes the indenting. See this for posting code

    attachment.php?attachmentid=78421&d=1297987572

    Here's what your program should be (it's probably running, but not doing what you want):
    CON _clkmode = xtal1 + pll16x
        _xinfreq = 5_000_000
    
    PUB main
       dira[15] := 1   ' set direction bit to output mode
       outa[15] := 1   ' set output to high (about +3.3V)
       repeat   ' now hang to prevent program from quitting
    

    In terms of supply voltages, you can either supply 3.3V to the 3.3V input and that should work fine or at least 5V to the Vcc input. The regulator can work with input voltages down to 4.5V, but I'd consider 5V the minimum.
  • PublisonPublison Posts: 12,366
    edited 2013-05-24 07:51
    The Sparkfun Breakout Board you mentioned does not appear to come with a crystal. Do you have a 5 Mhz crystal installed?

    If not set Clock Mode to:
    CON
     _CLKMODE = FAST
    
  • sshaginyansshaginyan Posts: 9
    edited 2013-05-24 07:53
    I have tried this with no avail. If bst says, "Detected a Propeller Version: 1", can I assume my propeller is running without problems? Also when connected but not active to the programmer the voltage across RXI, TXO, and DTR given from the programmer is 3.3v. Is this normal?
  • PublisonPublison Posts: 12,366
    edited 2013-05-24 07:56
    sshaginyan wrote: »
    No, but shouldn't the internal one be sufficient?

    It's looking for the external crystal. See my edited post above
  • sshaginyansshaginyan Posts: 9
    edited 2013-05-24 07:58
    Unresolved Symbol - _CLKMODE. So it can't recognize `fast`.
  • PublisonPublison Posts: 12,366
    edited 2013-05-24 08:00
    sshaginyan wrote: »
    Unresolved Symbol - _CLKMODE

    Sorry spelling error
    [COLOR=#333333][FONT=Parallax]CON
    [/FONT][/COLOR][COLOR=#333333][FONT=Parallax] _CLKMODE = RCFAST[/FONT][/COLOR]
    
  • sshaginyansshaginyan Posts: 9
    edited 2013-05-24 08:01
    Thank you very much, that was the problem.
  • PublisonPublison Posts: 12,366
    edited 2013-05-24 08:03
    Your welcome!

    And welcome to the forums!
Sign In or Register to comment.