Shop OBEX P1 Docs P2 Docs Learn Events
forum protocall — Parallax Forums

forum protocall

yarisboyyarisboy Posts: 245
edited 2010-09-12 20:02 in Propeller 1
What is the proper way to post three Spin files that compile with out errors but don't run. I had this working properly but either zapped my breadboard with ESD or made a bunch of code changes that disabled my software. Beginners luck with Spin is frustrating when you don't know what you did right yesterday.

Comments

  • potatoheadpotatohead Posts: 10,261
    edited 2010-09-08 19:53
    I would package them up with the Archive command in the Propeller tool. That way, all the related files are included. People can unzip those and have a look.

    You should consider revisioning your code. How it works is you number all the files, say:

    main_01.spin
    graphics_01.spin
    other_01.spin

    Compile that, and run it.

    So, let's say it works, but something needs to be changed in the graphics_01.spin file.

    Load main_01.spin, and save as: main_02.spin, after having edited the CON section to read graphics : "graphics_02.spin"

    Load graphics_01.spin, and save as graphics_02.spin.

    Compile it again, and run it. Should still work.

    Now make your changes, safe in the knowledge that the 01.spin set of files is still good.

    If you then wanted to change graphics_02.spin, and other_01.spin, your files would look like this:

    main_03.spin (because it now points to the two new files)
    graphics_03.spin
    other_02.spin.

    Then edit.

    The idea here is that when you are getting ready to mess with some code, you take a look at the tree of files needed. Maybe it's just one file. If that's the case, do a save as with a new number, before your edits, so you always have a recovery point.

    If it's a tree of files, decide what it is you want to edit, then go and modify the CON section of the parent files, and do the save as operation to build out the new revision of code, again preserving that recovery point.

    After a few times, this will become habit, and you will seriously appreciate it.

    Over say, a bunch of revisions, you can go back and examine your train of thought, or re-trace your steps to disaster, branching off to a better direction, with the work you did before.

    It's also possible to have the older version file open, and viewable while you complete the changes for the newer version. I do this a lot.
  • Mike GreenMike Green Posts: 23,101
    edited 2010-09-08 19:55
    Best way is to use the attachment manager to attach the files. Look at the menu you get when you click on the little paperclip at the top of the message window.
  • yarisboyyarisboy Posts: 245
    edited 2010-09-09 05:41
    Thanks. I'll upload the code tonight.
    Stan
  • yarisboyyarisboy Posts: 245
    edited 2010-09-10 20:37
    Displaytest.spin may have problems with global memory. I've tried several ways and can seem to get the objects to talk to each other. BS2_functions.spin has been modified in the shiftout object to be compatible with the MC 14489 LED driver chip data sheet. jm_freqin.spin has not been modified (at least intentionally). After I get caught up on sleep I'm transferring my circuit over to stitch wired perf board. I may have worn out areas on my breadboard. I may also have timing problems with how frequently jm_freq is called.
  • yarisboyyarisboy Posts: 245
    edited 2010-09-12 20:02
    The parts on the breadboard all checked out but I wound up having to re-install Windows XP and re-download and repair my Propeller tool software. I think my 10 year old hard drive is wearing out. I haven't had a chance to dive back into the Spin files yet.
Sign In or Register to comment.