Shop OBEX P1 Docs P2 Docs Learn Events
How do I figure out what went wrong — Parallax Forums

How do I figure out what went wrong

imekonimekon Posts: 6
edited 2009-11-20 06:54 in Propeller 1
I've put together a Propeller chip and memory onto a custom board, fired it up. I plugged in a prop clip - it indicates there is a propeller chip present - it lets me download to ram or to rom - does that mean that everything should be working?

I have an LED attached to pin 5 (P4) so I tried setting it to turn it on, however I see no signal on the output - so I tried different outputs and nothing seemed to work.

I can see a 10MHz signal on the crystal.

Not sure where to go from here.

Comments

  • HarpritHarprit Posts: 539
    edited 2009-11-19 22:50
    We need to look at your code.
    Harprit
  • imekonimekon Posts: 6
    edited 2009-11-19 23:19
    {{
      Toggle various pins
    }}
    
    CON
      _clkmode = xtal1 + pll16x
      _xinfreq = 10_000_000
    
      pin = 4
    
    var
      long t
      
    PUB toggle
      dira[noparse][[/noparse]pin]~~
    
      outa[noparse][[/noparse]pin] := 0
    
      t := cnt
      
      repeat
        t += clkfreq / 111
        !outa[noparse][[/noparse]pin]
        waitcnt(t)
        t += clkfreq / 21
        !outa[noparse][[/noparse]pin]
        waitcnt(t)
        t += clkfreq / 15
        !outa[noparse][[/noparse]pin]
        waitcnt(t)
         
    
    
  • Mike GreenMike Green Posts: 23,101
    edited 2009-11-19 23:23
    For a start, you can't run the Propeller at 160MHz (10MHz x 16). Try using PLL8X instead of PLL16X.
  • HarpritHarprit Posts: 539
    edited 2009-11-19 23:27
    try this

    CON
    _CLKMODE=XTAL1+ PLL2X 'The system clock spec
    _XINFREQ = 5_000_000 'crystal frequency

    Con
    pin=5

    PUB Demo 'subroutine to toggle the output line

    dira[noparse][[/noparse]pin]~~ 'gain access to line
    repeat
    !outa[noparse][[/noparse]pin]
    waitcnt(clkfreq/4+cnt)
  • imekonimekon Posts: 6
    edited 2009-11-20 06:33
    Mike Green said...
    For a start, you can't run the Propeller at 160MHz (10MHz x 16). Try using PLL8X instead of PLL16X.

    Thank you! Now the LED is flashing quite happily!

    Phew, thought I'd created a duff board

    turn.gif
  • imekonimekon Posts: 6
    edited 2009-11-20 06:54
    Here are some photos of the partly populated board I'm working on:

    http://imekon.blogspot.com/search/label/Hardware
Sign In or Register to comment.