Shop OBEX P1 Docs P2 Docs Learn Events
Prop programs but doesn't work — Parallax Forums

Prop programs but doesn't work

JonathanJonathan Posts: 1,023
edited 2021-08-01 01:54 in Propeller 1

Been a while since I played with the Propeller. I started with one I have mounted on a breadboard. It programmed but wouldn't do anything. At first I assumed that I had something wrong in the program. Looked and looked but saw nothing wrong. Then after programming a prop on a PCB board I made a few years ago and it working with the program I working on, I figured it must be a PLL failure. So I put a new DIP prop in the breadboard. Still not working. Then I thought maybe it is the crystal. I don't seem to have any 5mHz crystals laying around but I have a 3.57 mHz, at least it is marked 3.57. Still no no joy.

Any ideas? I will order some crystals, but would like to figure out what the heck is going on here.

Comments

  • Cluso99Cluso99 Posts: 18,069

    Best to post a pic. Often we can see the problem this way.

  • If your program calls for a crystal oscillator, and you haven't provided a crystal -- or one at the wrong frequency -- it won't run properly, if at all.

    What are the first lines of your main program?

    -Phil

  • JonathanJonathan Posts: 1,023
    edited 2021-08-01 04:01

    Phil, Cluso, so glad you guys are still here!

    I am using a 5mHz crystal, both on my home made PCB and on the breadboard. I just tried a crystal that I unsoldered from a board and added legs to, still no luck. The following program runs fine on the PCB but not on the breadboard. It downloads just fine.

    EDIT: I see the formatting of the code got trashed but it is indented correctly.
    CON
    _clkmode = xtal1 + pll16x
    _xinfreq = 5_000_000

    input = 0
    output = 1

    OBJ
    pst : "Parallax Serial Terminal"

    PUB init
    dira[15] := output
    pst.Start(115_200)
    pst.clear
    pst.home
    wait_ms(2000)
    pst.str(string("GPS Timebase..."))
    pst.newline
    pst.str(string("Version 0.1"))
    wait_ms(1000)
    repeat
    pst.str(string("Testing,,,"))
    pst.newline
    outa[15] := 1
    wait_ms(1000)
    outa[15] := 0
    wait_ms(1000)

    Cluso, here is a picture:

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2021-08-01 04:11

    You need bypass caps on both Vdd/Vss pin-pairs. It could be that, lacking both, the PLL got fried. It's a known failure mode from inadequate bypassing.

    -Phil

  • Aha! Found the problem! Cluso, thanks for asking me to take a pic. Looking at it I noticed that the decoupling cap on the power pins on the left side was missing. Put one in and all is well. Sometimes it is the little things.

  • Well spotted Phil! We must have cross posted.

Sign In or Register to comment.