Shop OBEX P1 Docs P2 Docs Learn Events
how to read eprom? is my propeller dead? — Parallax Forums

how to read eprom? is my propeller dead?

RontopiaRontopia Posts: 139
edited 2008-03-05 23:53 in Propeller 1
Im sure its been asked before but I cant seem to find any threads..

how do I grab whatever is on the eprom and read it back to the propeller tool?

I think I may have a dead propeller chip. I cant seem to load either ram or eprom.. propeller tool says the code compiled. but nothing happens.. even with the simple blink program from the methods lab. I have changed nothing on the breadboard.

when I load ram propeller tool says its loading ram.

when I load the eprom the propeller tool says loading eprom and then varifying eprom.

when I use run/identify hardware I get propeller version 1 found on com4.

so.. whats up.. I have had nothing but trouble with this thing in the past few days. how do i check to see if I have somehow damaged the propeller chip, though I have no idea how I might have done that, its the only thing I can think of? but what is my pc talking to if load ram, load eprom and identify hardware are all working as expected?


▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔



IC layout designer
Austin Texas

Comments

  • Bob Lawrence (VE1RLL)Bob Lawrence (VE1RLL) Posts: 1,720
    edited 2008-03-05 18:35
    If you are using the external Xtal and the PLL , try changing your program to run the prop in the internal R/C oscillator mode. There have been a few problems with the PLL circuit failing.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Aka: CosmicBob
  • RontopiaRontopia Posts: 139
    edited 2008-03-05 18:49
    I dont think im using the xtal.. i letting the prop run at 12mhz or whatever its default is. is that what your talking about?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔



    IC layout designer
    Austin Texas
  • Paul BakerPaul Baker Posts: 6,351
    edited 2008-03-05 19:06
    Rontopia said...

    Im sure its been asked before but I cant seem to find any threads..

    how do I grab whatever is on the eprom and read it back to the propeller tool?
    This functionality isn't supported

    I think I may have a dead propeller chip. I cant seem to load either ram or eprom.. propeller tool says the code compiled. but nothing happens.. even with the simple blink program from the methods lab. I have changed nothing on the breadboard.

    when I load ram propeller tool says its loading ram.

    when I load the eprom the propeller tool says loading eprom and then varifying eprom.

    when I use run/identify hardware I get propeller version 1 found on com4.

    so.. whats up.. I have had nothing but trouble with this thing in the past few days. how do i check to see if I have somehow damaged the propeller chip, though I have no idea how I might have done that, its the only thing I can think of? but what is my pc talking to if load ram, load eprom and identify hardware are all working as expected?
    ·
    If your propeller was actually dead it wouldn't be discovered by F7, or respond to a F9 or F10. Since this is a breadboarded Propeller I would double check the connections and continuity of the connections. Have you tried a FullDuplexSerial test where it sends data back through the programming port? (you'd need an crystal for the test) Since these connections seem to be operating correctly, test the propeller's operation through those lines. If it works you know it's an I/O connection which is misbehaving.·

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.

    Post Edited (Paul Baker (Parallax)) : 3/5/2008 7:13:35 PM GMT
  • RontopiaRontopia Posts: 139
    edited 2008-03-05 19:12
    I agree.. its not acting like its dead. I took a volt meter to the power and im getting 3.322v. all other signs, tell me that the chip is talking to the propeller software so.. im think that its wired up correctly? I havent really changed anything on the board in months.. I just leave it on my desk. but even if something had changed, its getting power and its talking to the software on my laptop.. so im lost.

    im starting to think it software but i cant prove it. and i dont know how.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔



    IC layout designer
    Austin Texas
  • Paul BakerPaul Baker Posts: 6,351
    edited 2008-03-05 19:18
    How about an extremely simple program like:

    CON pin = 0 
    
    PUB go 
      dira[noparse][[/noparse]pin]~~ 
      outa[noparse][[/noparse]pin]~~ 
      repeat
    



    You can attach an LED + resistor to whichever pin you want to test. If the LED lights at all you know it was something with your software.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • RontopiaRontopia Posts: 139
    edited 2008-03-05 19:58
    ok.. its me.. im really glad its not the chip because welp.. i didnt want to have to eplain to my wife that i need another one[noparse]:)[/noparse]

    if I can ask whats wrong with this code?

    VAR
    ······· long stack[noparse][[/noparse]60]
    PUB ButtonBlinkTime | time, index, cog[noparse][[/noparse]6]
    ··· repeat
    ······· repeat index from 0 to 5
    ······· time := ButtonTime(23)
    ······· cog[noparse][[/noparse]index] := cognew(Blink(index + 4, time, 1_000_000), @stack[noparse][[/noparse]index * 10])
    ··· repeat index from 5 to 0
    ······· ButtonTime(23)
    ······· cogstop (cog[noparse][[/noparse]index])

    PUB Blink(pin, rate, reps)
    ··· dira[noparse][[/noparse]pin]~~
    ··· outa[noparse][[/noparse]pin]~

    ··· repeat reps * 2
    ······· waitcnt(rate/2 + cnt)
    ······· !outa[noparse][[/noparse]pin]

    PUB ButtonTime(pin) : delta | time1, time2
    ··· repeat until ina[noparse][[/noparse]pin] == 1
    ··· time1 := cnt
    ··· repeat until ina[noparse][[/noparse]pin] == 0
    ··· time2 := cnt
    ··· delta := time2 - time1
    ···


    this I copied from the mathods lab.. what Im trying to do here at work is run a simple program on the prop, but the prop will be powered with our handy dandy new voltage regulator we are just about to go to market with.. now you dont need to know all that but, but I am not sure whats wrong with this code none the less. it has compiled and loaded into the rom so im assuming that there are no misspelled words, missed "," or brackets... i have actually gone through the methods lab before and I remember getting this code to run no problems.. that was on another system tho.

    ok im rambling..

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔



    IC layout designer
    Austin Texas
  • Paul BakerPaul Baker Posts: 6,351
    edited 2008-03-05 20:22
    Offhand I see you are doing a backwards repeat loop but dont specify a step of -1. Also I don't know if arrays can be declared in temp space (cog[noparse][[/noparse] 6 ]), but it may work just fine. A stack size of 10 for each cog is a bit low so you may be observing stack clobbering. There may be some other issues at play, but those are the ones which stand out to me.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • hippyhippy Posts: 1,981
    edited 2008-03-05 20:32
    Paul Baker (Parallax) said...
    Offhand I see you are doing a backwards repeat loop but dont specify a step of -1.

    I'm glad I'm not the only one who thinks that way, but unfortunately it doesn't work !

    The Propeller determines the descending range and using -1 will mess it up. I spent ages tracking that Spin bug feature down.

    @ Rontopia : re-post your code with 'code' and '/code' tags so people can see if it's an indentation error.
  • Paul BakerPaul Baker Posts: 6,351
    edited 2008-03-05 20:37
    Ah, thanks Hippy, I was unaware of that. That likely explains why the decrypt function of my Blowfish object doesn't work even though the code is identical to the reference and all other parts of the library have been validated through test vectors (decrypt uses a backwards count while encrypt uses a forward count).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • stevenmess2004stevenmess2004 Posts: 1,102
    edited 2008-03-05 20:40
    Thats weird, I'm sure that I've used a descending loop without any problems. I'll go and have a look at my code.

    Edit: Just checked and I have and as far as I could see it worked fine.
  • Paul BakerPaul Baker Posts: 6,351
    edited 2008-03-05 20:51
    Try doubling the stack used for each cog. What rate are you specifying? If you are operating off the internal RC your counts should be lower than ordinarily used for crystals.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • RontopiaRontopia Posts: 139
    edited 2008-03-05 20:53
    guys.. this is a direct copy out of the methods lab.. I didnt add or subtract anything.

    and I dont know what the code /code thing means.. when I do that I get this

    [noparse][[/noparse]code]

    VAR

    ······· long stack[noparse][[/noparse]60]

    PUB ButtonBlinkTime | time, index, cog[noparse][[/noparse]6]

    ··· repeat
    ······· repeat index from 0 to 5
    ······· time := ButtonTime(23)
    ······· cog[noparse][[/noparse]index] := cognew(Blink(index + 4, time, 1_000_000), @stack[noparse][[/noparse]index * 10])
    ··· repeat index from 5 to 0
    ······· ButtonTime(23)
    ······· cogstop (cog[noparse][[/noparse]index])

    PUB Blink(pin, rate, reps)

    ··· dira[noparse][[/noparse]pin]~~
    ··· outa[noparse][[/noparse]pin]~

    ··· repeat reps * 2
    ······· waitcnt(rate/2 + cnt)
    ······· !outa[noparse][[/noparse]pin]

    PUB ButtonTime(pin) : delta | time1, time2

    ··· repeat until ina[noparse][[/noparse]pin] == 1
    ··· time1 := cnt
    ··· repeat until ina[noparse][[/noparse]pin] == 0
    ··· time2 := cnt
    ··· delta := time2 - time1
    ···

    [noparse][[/noparse]/code]

    oh ok.. i· get it now.



    now i dont get it.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔



    IC layout designer
    Austin Texas

    Post Edited (Rontopia) : 3/5/2008 9:06:22 PM GMT
  • Paul BakerPaul Baker Posts: 6,351
    edited 2008-03-05 20:59
    the code and /code should be enclosed in brackets, the result is something which looks like this:

    Testing, Testing 1,2,3
    

    If you are using IE, in the full editor the # button places a code box in your post.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • Chuck RiceChuck Rice Posts: 210
    edited 2008-03-05 21:19
    Rontopia said...

    
    VAR 
    
            long stack[noparse][[/noparse]60] 
    
    PUB ButtonBlinkTime | time, index, cog[noparse][[/noparse]6] 
    
        repeat
            repeat index from 0 to 5
            time := ButtonTime(23)
            cog[noparse][[/noparse]index] := cognew(Blink(index + 4, time, 1_000_000), @stack[noparse][[/noparse]index * 10])
        repeat index from 5 to 0
            ButtonTime(23)
            cogstop (cog[noparse][[/noparse]index]) 
    
    PUB Blink(pin, rate, reps) 
    
        dira[noparse][[/noparse]pin]~~
        outa[noparse][[/noparse]pin]~ 
    
        repeat reps * 2
            waitcnt(rate/2 + cnt)
            !outa[noparse][[/noparse]pin] 
    
    PUB ButtonTime(pin) : delta | time1, time2 
    
        repeat until ina[noparse][[/noparse]pin] == 1
        time1 := cnt
        repeat until ina[noparse][[/noparse]pin] == 0
        time2 := cnt
        delta := time2 - time1
        
    
    
    




    Your "Repeat 0 to 5" (and others) function as a no-op (does nothing) because of the indentation.

    A simple trick I have used when I make something go whack-o and it looks
    like the hardware is broken, is to comment out everything but the most
    basic thing in your code. Then run that If it works, uncomment a few
    things at a time till you find the line that is causing the whack-o.

    -Chuck-
  • RontopiaRontopia Posts: 139
    edited 2008-03-05 21:35
    DUHHH ok i knew it was something stupid..

    the reason I thought I might have damaged the part is .. well because im actaully hooking it up or a config-able voltage regulator. and thoguth I might have zaped it somewhere in the process. that combined with the other post I had here yesterday about the software issue I was having(which I think was a real issue) and its not been a productive couple of days.

    one other thing I might add.

    on the propeller education kit.

    I have the battery and usb connector hooked up just like the instructions show. but when I unhook the battery the power light is still lit, very dimly but i put a volt meter across it and im getting about 2v with no battery pluged in to the bread board... so am i getting some snick circuit to gnd? or is the the expected to behave this way?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔



    IC layout designer
    Austin Texas
  • Paul BakerPaul Baker Posts: 6,351
    edited 2008-03-05 21:50
    That is to be expected, the PropPlug gets it's power from·USB, this power is still applied to the Tx (of the PropPlug)·and Reset pins even when the Propeller is powered down, this flows through the ESD diodes of the Propeller into the Vdd rail. It is this current which is dimly illuminating the LED, but no harm is done. I believe this is discussed in one of the Labs.

    If you type <Ctrl>-I in the Tool, it will show how the compiler will interpret the indentation. This should help you from doing similiar things in the future.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.

    Post Edited (Paul Baker (Parallax)) : 3/5/2008 9:56:03 PM GMT
  • RontopiaRontopia Posts: 139
    edited 2008-03-05 22:00
    k thanks

    sorry about all the trouble

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔



    IC layout designer
    Austin Texas
  • Paul BakerPaul Baker Posts: 6,351
    edited 2008-03-05 22:13
    No worries, even I still get things wrong (as evidenced by the step -1) and I started working with the Propeller 4 months before it was commercially availible (I was one of thier customers invited to the unveiling of the Propeller in Feb '06, which eventually led to Parallax offering me a job).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • RontopiaRontopia Posts: 139
    edited 2008-03-05 22:42
    well thanks for your help just the same..

    My current job I aquired in much the same way.. well not really.. I came in here to help layout a chip.. I did a good enough job that they offered me a job and now Im doing circuit board layout as well as IC layout. also, Testing and some work in the lab.. so I have got to do a lot more fun stuff now that im no longer doing contract work.

    when this product is done and out, it will be something that you would be interested in. its a power module that uses PMBus as will as other things. you can configure 3 different rails on the fly and see the results in real time. so 12v in.. and 3 rails of up to 3.5v .. anyway. I have it on my desk and I was going to use one rail to power the prop just for kicks. one guy here was using it to power his ipod. GOSH i love R&D work!!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔



    IC layout designer
    Austin Texas
  • Paul BakerPaul Baker Posts: 6,351
    edited 2008-03-05 22:55
    That does sound intersting. I hear you on the R&D, I'm working on our next oscilloscope. Great excuse to crack open Spice and do some what-ifs, with that I was able to reduce a 5 opamp front-end design down to 1 opamp and 2 transistors and it actually performs better than the orginal design. Mixed signal design is alot of fun.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • deSilvadeSilva Posts: 2,967
    edited 2008-03-05 23:26
    stevenmess2004 said...
    Thats weird, I'm sure that I've used a descending loop without any problems. I'll go and have a look at my code.
    Steven, its best to not use STEP. Many things will work automatically as you expect, some not...

    I should recommend reading pp 296/297 in the manual. It will take you the rest of your confidence smile.gif
    I have derived 6 rules, but I am not sure whether they really apply smile.gif

    It is most important to understand that a "counted loop" is always performed at least once; there is no "empty loop" ("FROM 1 TO 0")
    Also note that the count variable is left set to the value which leads to the loop termination, i.e. its value is ALWAYS out ouf the lower/upper range after the loop

    Sadly this is utilized by some Parallax examples for the beginner (e.g. "Bilnker2")
  • stevenmess2004stevenmess2004 Posts: 1,102
    edited 2008-03-05 23:37
    I should have made that clearer. I just use
    repeat i from 200 to 130
    


    and it works fine. I'll have to try some step values now just to see if anything strange happens.
  • deSilvadeSilva Posts: 2,967
    edited 2008-03-05 23:53
    Positive values will do fine...
    My theory is that the initial STEP value (or the implicite 1) is just negated when the direction of the loop is determined in the beginning.

    Note that all three fields FROM, TO, STEP are dynamic and can be modified within the loop (see the example on p. 297)

    You can also state STEP 0 smile.gif
Sign In or Register to comment.