Shop OBEX P1 Docs P2 Docs Learn Events
multiple .spin files in an archive newbie question. — Parallax Forums

multiple .spin files in an archive newbie question.

kf4ixmkf4ixm Posts: 529
edited 2010-02-18 21:15 in Propeller 1
Hi all, ok i am just starting out with the propeller, been reading the prop manual and the 'programming and customizing the multicore propeller microcontroller' book. i have yet to write any programs yet. the question i have is that in alot of code archives i find, there are multiple spin files in the zip file. For example, here is a demo program for the spinvent proplab, (which i have) and on that page theres some example code, 'resistor-capacitor discharge time measurment'. inside the archive there are 3 spin files with a readme with this inside...

───────────────────────────────────────
Parallax Propeller Chip Project Archive
───────────────────────────────────────
·Project :· "PropLAB_RC_SevenSegmet"
Archived :· Sunday, December 27, 2009 at 11:06:30 AM
··· Tool :· Propeller Tool version 1.2.6

··········· PropLAB_RC_SevenSegmet.spin
·············
············· ├──PropLAB_SevenSegment.spin
·············
············· └──RCTIME.spin

My question is when loading the 'proplab_rc_sevensegmet.spin, are the other 2 files loaded during compile or do all 3 files have to be loaded into prop tool then compiled together. i have tried looking for the answer in the documentation, but really couldn't find a definitive answer without going off on a tangent from my learning course, turning my brain to mush and basically forgetting everything i've learned so far. i'm pretty confident this will be a easy question for all experienced in the propeller, (i can see people rolling thier eyes now!) I believe from what i've learned so far that these are objects, but im not sure on how to combine them all to download into the prop. (i'm probably wrong, so all suggestions welcomed.)

Thanks!

Post Edited (kf4ixm) : 2/18/2010 3:26:46 PM GMT

Comments

  • WhitWhit Posts: 4,191
    edited 2010-02-18 15:32
    kf4ixm,

    When the completed code is "archieved," is is saved along with the objects (small sections of code that solve specific problems) that are used by the main (or top) code. The "readme" file (which you show above) contains a tree or diagram that gives the structure and lots of other info. PropLAB_RC_SevenSegmet.spin (though I think that is supposed to be Segment) is the main or top code. I uses the PropLAB... and RCTIME objects. Achieving saves all this together with the readme file and compresses it (zips) for sharing or transmitting to others.

    As long as these pieces of code are in a file together, when you open the top or main code and send it to your Propeller via the Propeller Tool, it finds and and complies all the subreference objects and sends them too. You do not need to load them seperately.

    More experience Prop users can probably say this better and mroe acurately than I have. Have fun with you Prop! Don't be afraid to ask questions.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Whit+


    "We keep moving forward, opening new doors, and doing new things, because we're curious and curiosity keeps leading us down new paths." - Walt Disney
  • kf4ixmkf4ixm Posts: 529
    edited 2010-02-18 15:40
    Thank you very much Whit, i think that answered my question completly. i was kinda thinking that this is how it was done. Ok, another question... is there any reason why the code in all three files could not be combined into one .spin file, or is this just done this way for programming/troubleshooting efficiency/simplicity? im just trying to find a method to the madness, so to speak.
  • Cluso99Cluso99 Posts: 18,069
    edited 2010-02-18 19:07
    Usually we try to have seperate files (objects) to performa a section of code. Objects are posted on the OBEX to do various functions such as serial, keyboard, tv, vga, etc. This way you can add say a keyboard object to your code and it is easy to use.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Links to other interesting threads:

    · Home of the MultiBladeProps: TriBlade,·RamBlade,·SixBlade, website
    · Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
    · Prop Tools under Development or Completed (Index)
    · Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) ZiCog (Z80) , MoCog (6809)·
    · Prop OS: SphinxOS·, PropDos , PropCmd··· Search the Propeller forums·(uses advanced Google search)
    My cruising website is: ·www.bluemagic.biz·· MultiBlade Props: www.cluso.bluemagic.biz
  • kf4ixmkf4ixm Posts: 529
    edited 2010-02-18 21:15
    ok, makes perfect sense. thank you guys alot!
Sign In or Register to comment.