Shop OBEX P1 Docs P2 Docs Learn Events
What's wrong with this Propeller? — Parallax Forums

What's wrong with this Propeller?

Ken PetersonKen Peterson Posts: 806
edited 2009-03-21 08:14 in Propeller 1
Hi all,

I have a Propeller Protoboard with a problem. To test it, I run the following program on it. It basically clocks all of the pins high and low at 0.5 Hz. I use this program all the time to check suspect Propellers for proper pin operation.

CON
  _clkmode = RCFAST

pub main
  dira[noparse][[/noparse]31..0]~~
  repeat
    waitcnt(clkfreq+cnt)
    !outa[noparse][[/noparse]31..0]




When I run the program on this particular Protoboard, I get a constant voltage of 0 - 1.7V (depending on the pin) except for pins 28 and 29 which are at a constant 3.3V. The funny thing is that it loads the program, programs and verifies the EEPROM all without error, but after the program is loaded I don't see the output on the pins as expected - including pins 28 - 31.

Any ideas what's wrong with it?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·"I have always wished that my computer would be as easy to use as my telephone.· My wish has come true.· I no longer know how to use my telephone."

- Bjarne Stroustrup

Post Edited (Ken Peterson) : 3/20/2009 6:14:48 PM GMT

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-03-20 18:17
    I'd say that the program isn't really running and that all your pins are inputs. Pins 28 and 29 are high because they're pulled up.

    When something like this happens to me, it's usually one of three things:

    1. The programming cable is actually plugged into another board,

    2. I hit F9 instead of F10 or F11 (old BASIC Stamp habit),

    3. The scope probe is lying on the bench instead of being clipped onto a signal.

    -Phil

    Post Edited (Phil Pilgrim (PhiPi)) : 3/20/2009 6:23:05 PM GMT
  • Ken PetersonKen Peterson Posts: 806
    edited 2009-03-20 18:22
    That makes sense, but if the program loader runs why doesn't my program run?

    We've had this exact thing happen with two or three Protoboards for no apparent reason. I've put together numerous custom boards and hand-soldered the Propellers (44 QFP) down, and I didn't have this happen to any of them. Seems pretty strange to me.

    If I use RCFAST, would this rule out a bad PLL?


    BTW: I watched the display (loading, programming eeprom, verifying.. etc.) so I didn't hit the wrong key. It's plugged into the right board because it's the only board on my desk. And I'm using a DMM to check the pins so I'm sure that's connected.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·"I have always wished that my computer would be as easy to use as my telephone.· My wish has come true.· I no longer know how to use my telephone."

    - Bjarne Stroustrup

    Post Edited (Ken Peterson) : 3/20/2009 6:28:04 PM GMT
  • smbakersmbaker Posts: 164
    edited 2009-03-20 18:50
    I recently had a custom·board where I had unknowingly bridged one of the crystal pins to ground. I was able to download code to the eeprom and ram, but otherwise the program was not working. I didn't attach a scope to it, so I have no idea if it was working, but at a wildly incorrect frequency. Only after taking a magnifier to the board did I realize I'd bridged that crystal pin. Since you are using RCFAST, I'm guessing it's not the problem, but just tossing this out there as the symptoms sound suspiciously similar.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-03-20 18:57
    Ken,

    I think you're getting a bus conflict on pin A31, which causes the Prop to draw too much power, causing a brownout and a subsequent reset. Try excluding pins A28-A31 and see what happens.

    -Phil

    Post Edited (Phil Pilgrim (PhiPi)) : 3/20/2009 7:09:10 PM GMT
  • Ken PetersonKen Peterson Posts: 806
    edited 2009-03-20 19:17
    I'm testing a bare Protoboard.· Nothing's connected to·P31.· What could be causing a bus conflict?· If there were a bus conflict, how come the program loads and the EEPROM gets verified?· Nothing's getting warm.

    smbaker:· I also had the test program running at a higher frequency using the crystal.· I scoped the crystal and saw 5MHz on both pins.· I am running the test program on RCFAST hoping to rule out a bad PLL.· The boot loader runs on RCFAST because not all Propellers have a crystal on them.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·"I have always wished that my computer would be as easy to use as my telephone.· My wish has come true.· I no longer know how to use my telephone."

    - Bjarne Stroustrup

    Post Edited (Ken Peterson) : 3/20/2009 7:25:42 PM GMT
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-03-20 19:21
    The output of the PropPlug/USB is connected to pin A31. You can't program the Prop without that connection. As soon as the program starts, it tries to pull that pin low, which is being driven high by the serial programming interface.

    -Phil
  • Ken PetersonKen Peterson Posts: 806
    edited 2009-03-20 19:25
    Phil: I have unplugged the prop plug and power-cycled the board. Same results.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·"I have always wished that my computer would be as easy to use as my telephone.· My wish has come true.· I no longer know how to use my telephone."

    - Bjarne Stroustrup
  • s2jesses2jesse Posts: 62
    edited 2009-03-20 19:54
    I·had a very similar problem with like 3 of my custom boards...i could download to the prop but all the pins were putting out like around 1.7 volts·. ·I seriously think my problem was the flux i didnt clean well enough off and it was conducting.. I cleaned it super well let it fully dry and they started working...

    I·was using the flux pen from spark fun. I know it sounds wierd but i tested the conductivity of the flux by just painting a little on soem cardboard·and even when it basically dried i was getting like 100k ohms

    It was driving me nuts.

    OOPS sorry i see this is a propeller proto board your talking abotu not a custom board.... so probably ignore this post [noparse]:)[/noparse]

    Jesse
    ·
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-03-20 19:57
    And the program is in EEPROM, right? In that case, try cycling fewer pins just to see what happens.

    -Phil
  • s2jesses2jesse Posts: 62
    edited 2009-03-20 20:16
    FYI when I had my problem the program made no difference. I could run any code and it would still output values around 1.7 volts at alot of the pins.
  • PhilldapillPhilldapill Posts: 1,283
    edited 2009-03-20 20:54
    Did you check the crystal?
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-03-20 20:55
    He's not using the crystal.

    -Phil
  • RiJoRiRiJoRi Posts: 157
    edited 2009-03-20 21:14
    Ken Peterson said...

    CON
      _clkmode = RCFAST
    
    pub main
      dira[noparse][[/noparse]31..0]~~
      repeat
        waitcnt(clkfreq+cnt)
        !outa[noparse][[/noparse]31..0]
    
    



    Any ideas what's wrong with it?

    I don't do much Prop Programming (tempus fugit), but (1) What is cnt initialized to? Also, I would initialize the pins to some known state:
    dira[noparse][[/noparse]31..0]~~
    outa := $AAAAAAAA

    And if I was really desperate, simply put a repeat (loop forever) after the outa command.

    HTH,
    --Rich
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-03-20 21:28
    In Ken's code, it doesn't matter what cnt is initialized to. outa is always initialized to zero.

    -Phil
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-03-20 21:36
    Ken,

    Wild thought: Are you using the USB protoboard? If so, toggling A30 and A31 like you're doing will repetitively reset the Prop if the USB cable is unplugged.

    -Phil
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2009-03-21 02:10
    Just an observation about "voltage" measurement in general. The standard digital multimeter normally has about 10M-20M input resistance (cheap ones about 1M) so that it does not load a sensitive circuit unduly. However if you measure a floating pin (or yourself) you will get a reading which is not really indicative of the actual condition. However if you place a 100K load across the meter probes the reading that you will take of digital circuits will be more realistic. The other side effect of using digital multimeters is that they will average a high frequency signal so 1.7V could very well represent a 0 to 3.3V square wave.

    The 3.3V on 28 and 29 is what you would expect from pullup resistors. What do you measure on all the pins when you hold the reset in? As a normal step simplify you code down to a single pin and confirm that works first then stage up until you hit a problem (could be a short).

    *Peter*
  • Ken PetersonKen Peterson Posts: 806
    edited 2009-03-21 02:20
    Thanks for all of your input. I don't think one or two shorted pins would bring the Prop to it's knees that quickly, but if many of them were it might. I can't imagine how that would be happening, because it's a bare Protoboard. I checked for shorts with a DMM and there were none detected that way.

    I do think all of the pins are inputs for some reason, but what's stumping me is why the boot loader program is running with no apparent problem but nothing else works. I tried toggling only pins 28 and 29 and that didn't even work. How is it programming the EEPROM?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·"I have always wished that my computer would be as easy to use as my telephone.· My wish has come true.· I no longer know how to use my telephone."

    - Bjarne Stroustrup
  • s2jesses2jesse Posts: 62
    edited 2009-03-21 08:14
    again when i had the similar issue i tried several programs... they all output the 1.7 voltsish on pretty much all pins.. Even when i wrote a simple blinker to test a pin with like a 5 second interval on the blink still, all pins read about 1.7ish volts... LAter after cleaning the board very well which cleared up my shorts my multimeter correctly read the 0 - 3.3v toggled output in the pin. Just feeling its gotta be some sort of short somewhere. I just found it so wierd that i could write the program to the chip but it didnt seem to run.
Sign In or Register to comment.