Shop OBEX P1 Docs P2 Docs Learn Events
Ds1620 — Parallax Forums

Ds1620

Jon WilliamsJon Williams Posts: 6,491
edited 2007-06-02 03:57 in Propeller 1
This will get released as part of an archive so you can run it, but I'm posting it here so that BASIC Stamp users familiar with the DS1620 can get an idea how Spin works.

A funny thing happened today... a Nuts & Volts reader send me a note claiming that the Propeller was an elaborate April Fool's Day joke.· Yeah, like we'd go through THAT much trouble for a prank.· The funniest part of the whole deal was that the domain used by the reader had "robots" in it and yet when I visited the site there was nothing but pictures of donkeys.· Who's fooling with whom?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax

Comments

  • Kaos KiddKaos Kidd Posts: 614
    edited 2006-03-29 14:07
    Jon, this is awesome...
    ..Clear, easy to read, and no "fat" in the code.
    ...It shows encapulation, which has a number of benifits:
    ..#1 For the beginner who is trying to learn uMicro programming, it hides the "details" and lets then work on getting the "code" working.
    ..#2 It lets the programmer determin "how deep" they are going to go into the program they are writing.
    ..#3 It gives the expierenced programmer the examples needed to expand on the code.
    ..#4 It provides for recycled code.

    I hope you and the other Propeller gods are planning on doing exactly what you did for this device for other devices Parallax sells.
    ... looking foward to reading and seeing more code...

    If you moved the CON and VAR statments into the OBJ block, would that make all the CON's and VAR's private to that object, making the entire object private, excluding the pub routines ?

    What I'm seeing here is if this object is loaded with another object in the same window, then the CON's and VAR's would be intermixed.· Is that right?· Or, does the IDE provide the encapulsation between the objects?

    Lastly, is there an object explorer within the ide?· For example, I load the BS2 Object lib.· Can I explore the various functions / procedures within that object without knowing first hand what they are?· (I envision something like VB's editor, where you type the object, when you hit the "." you get a list of valid objects you can work with.)·

    .... Man, I can't wait to get my hands on the IDE, chip & dev board and some goodies! ...

    BTW: Thanks...

    ·

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Just tossing my two bits worth into the bit bucket


    KK


    Post Edited (Kaos Kidd) : 3/29/2006 2:20:57 PM GMT
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-03-29 15:18
    Thanks, KK, we can't wait until we can get the Propeller and and the Propeller Tool (IDE) into our friends' (customers') hands either -- we're having a blast.· Still, we've got left to do, so please bear with us.

    Object variables (even global)·are always private to that object.· Constants can, however, be accessed and used by a top-level object that uses a lower-level object.· That is demonstrated in this line of code:

    ··lcd.putc(lcd#LCD_LINE0 + 9)

    The format is:

    · objectName#CONSTANT_NAME

    In this case the lcd object·has a lot of useful constants that can be accessed by any object using lcd.

    The Propeller Tool has some neat tricks that make exploring a project nice.· One is the Object View of the current project -- it shows the objects used and their hierarchy.· Here's the object view from my DS1620 demo:

    attachment.php?attachmentid=41003

    Of note is that the timing object is used three times in the project.· There's no worry about code-bloat, though, the compiler has an element called the "object distiller" so that that there is only one set of code for any Spin object in memory.

    Another nice feature is the Summary View of the editor pane:

    attachment.php?attachmentid=41004

    And finally, if the programmer has added appropriate documentation comments, the Documentation View in the editor pane will probably look something like this:

    attachment.php?attachmentid=41006

    Pretty neat, huh?· And on a chip that runs twice as fast as the BS2px -- with seven engines (cogs) to spare!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax

    Post Edited (Jon Williams (Parallax)) : 3/29/2006 3:45:17 PM GMT
    358 x 164 - 25K
    666 x 234 - 109K
    656 x 895 - 223K
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-03-29 16:01
    Here's another neat Propeller Tool trick: it uses the Parallax True-Type(r) font and allows one to create simple schematics and timing diagrams -- the idea is to keep as much information in one place as possible.· Here's the character chart:

    attachment.php?attachmentid=41008

    ... and how I used elements to create a timing diagram in my ShiftIO object:

    attachment.php?attachmentid=41010

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax

    Post Edited (Jon Williams (Parallax)) : 3/29/2006 4:56:25 PM GMT
    647 x 393 - 252K
    655 x 319 - 194K
  • Martin HebelMartin Hebel Posts: 1,239
    edited 2006-03-29 16:10
    Kaos Kidd said...

    Lastly, is there an object explorer within the ide?· For example, I load the BS2 Object lib.· Can I explore the various functions / procedures within that object without knowing first hand what they are?· (I envision something like VB's editor, where you type the object, when you hit the "." you get a list of valid objects you can work with.)··

    Hi KK,
    I didn't see this answer jump out me in Jon's post, but at this point typing in an object name and "." will not provide in text help as to the methods and such within it.· I've asked for it, though even allowing the Explorer window to be expanded out to see the methods within it.

    A·nice feature·that does help·is the spilt screen, so you can have the method object showing documentation view in one section (or computer screen) and the code you are working on in another.

    I'm sure once everything is done and released, they'll be able to take a breather and start on enhancing the software based on demand and benefits.

    -Martin


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Martin Hebel
    Southern Illinois University Carbondale - Electronic Systems Technologies

    Personal Links with plenty of BASIC Stamp info
    StampPlot - Graphical Data Acquisition and Control
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-03-29 16:21
    Sorry, I wasn't clear. The Propeller Tool doesn't provide an automatic drop-down list of methods for an object that you're using. That would nice, and who knows, maybe we can add it in the future but we'll just have to see. One thing that's a little tricky to demo in the forums is that you can "rip" any editor pane out of the main window and drop it onto your monitor. This is great when you've got a dual-monitor setup; you can rip-and-drop the pane for an object of interest and put it into Summary or Documentation mode for reference.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • Kaos KiddKaos Kidd Posts: 614
    edited 2006-03-29 17:05
    Nice...
    Real nice...
    Sweet answers to some of the toughest questions:How to make a tool that works for most everyone...

    And thanks for the answers...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Just tossing my two bits worth into the bit bucket


    KK
    ·
  • Tracy AllenTracy Allen Posts: 6,660
    edited 2006-03-29 17:22
    While on the subject of the Propeller Tool IDE, it does provide an amazing array of thoughtful features and shortcuts. If you are looking at an object file in Object view, and you want to know what's in it, a quick double click and a hit the button (or shortcut key ALT-U) will show you the summary view. These object files open very quickly!

    Another shortcut I like very much is CTRL-rightArrow or leftArrow, which moves you rapidly from one tab to the next. (Jeff promised to add that to the Stamp IDE -hint hint) Shortcut CTRL-T always takes you right to your top object file.

    Of course there are bookmarks, similar to the Stamp IDE, with up to 10 per tab. The IDE remembers those bookmarks for the last 10 files that you use. You can also toggle line numbers on and off with CTRL-N. The list of navigation and editing shortcuts that we get out of the starting gate goes on and on!

    Jon, great job on the DS1620. I hadn't received my printed copy of April N&V yet, so I finally wnt online to activate the online version. They don't make it easy to find how to do that. Great cover article. Six more years assured, acting as the lead helicopter pilot.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-03-29 18:45
    Thanks, Tracy.

    Honestly, I may actually be one of the guys precariously dangling from the helicopter skid, but I'm up for it. To be candid, the last week things have really become fun for me; Spin is sinking in a feeling more natural, and when I ran my DS1620 program yesterday it actually worked on the first try. That made me smile, big time. Now it's a matter of going through and refining so that it's as elegant as I can make it (my code, that is).

    After some obligatory office paperwork I'm going to make a DS1620HR object for 0.05c resolution -- thanks to tricks I learned from you, Tracy!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • TransistorToasterTransistorToaster Posts: 149
    edited 2007-05-29 23:11
    Hello,
    I am getting a temperature somewhat offset with my DS1620. It gives me 25C, however other mercury and digital thermometers around say 22C. Do any of you have similar findings? Please send me a private message and carbon copy it on the board.
    Thanks.
  • parts-man73parts-man73 Posts: 830
    edited 2007-05-30 03:59
    You probably won't get a reply from Jon, he hasn't been on these forums in a long time. Too bad also, he was another source of wisdom here! For those of you that don't know who he is, He wrote a 2 part series in Nuts and Volts Magazine on the Propeller when it was first introduced. That article was what drew me in. He still has an occasional column about Stamps in N&V.


    About your question... I have gotten very accurate readings from my DS1620. Could the reading be a little higher due to heat produced by the chip itself, or other nearby components (voltage regulators can put out quite a bit of heat)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Brian Meade

    "They who dream by day are cognizant of many things which escape those who dream only by night" - Edgar Poe
  • inserviinservi Posts: 113
    edited 2007-05-30 08:22
    Hello Jon ,

    When you write :
    Jon Williams said...
    I'm going to make a DS1620HR object for 0.05c resolution

    Is it realy 0.05°C resolution or is that a mistake ?
    I find a DS1620HR in the Maxim site but it look to not existing ?

    dro.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    in medio virtus
  • Tracy AllenTracy Allen Posts: 6,660
    edited 2007-05-30 14:46
    The main temperature register of the DS1620 returns a 9 bit reading with 0.5 degree resolution. Internal registers are accessible that allow improved resolution, out to 0.01 degree. That does not imply greater accuracy, but it does become a very sensitive indicator. You can read about it on the DS1620 data sheet, and also here. The DS1620 is obsoleted, and the replacement is the DS1626, which allows direct access at up to 12 bits.

    Jon is around, being an actor, he would wrap himself in new roles, new names.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • TransistorToasterTransistorToaster Posts: 149
    edited 2007-05-31 03:34
    Brian,
    Thanks for your reply.

    >Could the reading be a little higher due to heat produced by the chip itself, or other nearby components (voltage regulators can put out quite a bit of heat)

    The DS1620 is very far from everything besides the DIP40 Propeller, where it is 0.3" away. When I touch the propeller with a finger, I don't detect any warmth from it. I have the propeller reading the temperature once every 2 seconds. I suppose internal heat could be the cause. I'll try putting a little fan on top of the DS1620 and see if it changes anything.

    So Brian, how did you mount the chip? Are you using the PDIP package DS1620?
  • parts-man73parts-man73 Posts: 830
    edited 2007-05-31 18:10
    TransistorToaster said...
    So Brian, how did you mount the chip? Are you using the PDIP package DS1620?

    I have used a 8 pin DIP, I just had it plugged into a solderless breadboard. The breadboard is a good 3 inches from the PCB that the Propeller and related circuitry was located.

    Could there be minor variations in manufacturing for the DS1620? If you had 2 otherwise identical DS1620's next to each other, would they give the same temperature measurement. I would say repeatability of measurements is more important. If it reads 2 degrees different than a mercury thermometer, that ok, as long as it's always 2 degrees different.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Brian Meade

    "They who dream by day are cognizant of many things which escape those who dream only by night" - Edgar Poe
  • TransistorToasterTransistorToaster Posts: 149
    edited 2007-06-02 03:57
    I don't have a second one to compare with. I probably should.
Sign In or Register to comment.