Shop OBEX P1 Docs P2 Docs Learn Events
propeller project — Parallax Forums

propeller project

elecnoobelecnoob Posts: 123
edited 2009-10-17 11:26 in Propeller 1
hey,

i'm making a project but i have a problem with the code and i can't figure out what the problem is ...

but maybe first a littlle information about me.

i'm 20 years old
i'm a student at de nayer instituut in belgium. here i'm finishing my last year, the education that i'm doing is electronics.

now a little information about the project.
i'm making some kind of a multigame console...
but i have a problem with a little sub in the code
the problem:

when you've won the game there are lights that needs to flash and a little speaker that need to say beep.. tongue.gif ( very simple)
and sometimes it works but it's very random sometime the lights start to flash ( but not in the sequence that i like) an you hear no music
sometimes only the music an no lights ....

so it doesn't work like it should ....

please help me

grtz

elecnoob

Comments

  • AJMAJM Posts: 171
    edited 2009-10-16 12:11
    Hi elecnoob,

    You really must post all of your code if you wish someone to assist you.

    Thanks,
  • StefanL38StefanL38 Posts: 2,292
    edited 2009-10-16 15:28
    guessing in the fog:

    might be array boundary corruption
    might be stack-over-flow through too much recursive calling methods
    might be be PASM-code that writes to the wrong HUB-RAM-adresses

    but what is it and where ?

    need the WHOLE code of the COMPLETE project to analyse this

    If you want to narrow down this problem yourself:
    disable all code but the one that does the blinking and sound
    then add again small pieces of code until the problem occurs

    best regards

    Stefan

    Post Edited (StefanL38) : 10/16/2009 6:59:15 PM GMT
  • MagIO2MagIO2 Posts: 2,243
    edited 2009-10-16 19:00
    If you even don't know which COG runs mad, you could put an additional instruction in the code which toggles a pin. Attach a LED and see what happens. Best would be a pin per COG, otherwise do it one after another.

    If you know the COG you can look at that particular code end try to find out why that COG is halted.
    * Does it read HUB memory which is overwritten by another COG?
    * Is it a SPIN COG:
    maybe the HUB RAM with the SPIN code is overwritten
    maybe the stack is to small
  • elecnoobelecnoob Posts: 123
    edited 2009-10-17 11:26
    tnx for all the help so far

    @ stefan : I will try do delete some parts from the code and try to get it working.


    grtz
Sign In or Register to comment.