Shop OBEX P1 Docs P2 Docs Learn Events
Newbie Question-Best way to play with a Propeller — Parallax Forums

Newbie Question-Best way to play with a Propeller

ElectricAyeElectricAye Posts: 4,561
edited 2008-07-27 20:40 in Propeller 1
Greetings, I'm totally new to this Propeller phenomenon and I'm feeling a bit lost with this object-oriented approach to programming.· I learned how to use the Basic Stamp to a limited degree years ago and found that the Debug feature made it easy for me to learn by trial and error.· With the Propellor I can't seem to find anything I can easily "plug and hug" like the Debug system for the Stamp.· There seems to be an endless varieity of possibilities for the Propeller - TV outputs, VGA, LCDs, etc. - but I get the impression I first have to learn heaps and heaps before I can confidently implement any of the objects for those interfaces.· So my question is this - is there anything kinda like the Debug that I can use without knowing so much?· The PE kit exercises, which employ flashing LEDs, are easy for me to follow, but I'm having a hard time making the leap to things like the DS18B20, etc. without something Debug-like to play with.· Any suggestions?· Many thanks, Mark

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-07-26 03:13
    There is an object in the Propeller Object Exchange called "BS2 Functions". It implements many of the specialized statements in Parallax Stamp Basic, not necessarily as statements, but as a series of subroutine calls. In particular, there's a series of DEBUG calls that together do most of what you can do with the DEBUG and DEBUGIN statements in Basic. Download and have a look at it. As is true for many Object Exchange objects, the comments explain how to use the routines and may include examples.
  • Bob Lawrence (VE1RLL)Bob Lawrence (VE1RLL) Posts: 1,720
    edited 2008-07-26 03:18
    Simple Debug


    Starts UART object in a cog at specified baud rate for debug, using FullDuplex.spin.

    obex.parallax.com/objects/44/

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Aka: CosmicBob
  • DroneDrone Posts: 433
    edited 2008-07-26 03:19
    Hi Mark,

    May I suggest you download the "Objects Lab and Code v1.1 (zip)" from here:

    www.parallax.com/tabid/442/Default.aspx

    In this lab you will find the Parallax Serial Terminal (PST) which is sometimes called the Propeller Serial Terminal. PST will let you interact with propeller without the need for any other hardware, I found PST very useful for debugging when I started out.

    Basically, PST allows you to bring up a serial debug terminal on your PC that communicates with the propeller over the same USB or serial cable you use to program the propeller. It is automatically aware of when the propeller is being programmed and gets out of the way! In the propeller, you use the FullDuplexSerialPlus object (also included in the lab's .zip file) to communicate with PST. In the lab's .pdf file, the PST is described in great detail starting on page 13.

    Good luck Mark, and welcome!

    David
  • Nick McClickNick McClick Posts: 1,003
    edited 2008-07-26 03:46
    It was easiest for me to hook the prop up to a TV, and use the TV to display variables. Just use the graphics demo as a template.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Concentrate on understanding the problem, not applying the tool
  • ElectricAyeElectricAye Posts: 4,561
    edited 2008-07-26 04:31
    Drone,

    thanks for the tip about the PST. I had not seen that until you suggested it. I haven't gotten that far in my adventures with the PE lab kit, so I was starting to panic that I might not ever have something Debuglike to play with - without first learning far more than I want to. I'm a nuts and bolts Mech-E trying to get by with what I can, so when electronic geniuses like Bob Lawrence say things like "Simple Debug Starts UART object in a cog at specified baud rate for debug, using FullDuplex.spin"... uh, well, I'm grateful he's taken the time but, uh, I'm, uh, like uh..... duh.....

    Thanks everyone for your kind responses!

    Mark
  • hippyhippy Posts: 1,981
    edited 2008-07-26 13:59
    I too would recommend using a TV as a first step. I think you'll find it a lot easier to use objects than you expect. For the TV object ( and roughly same for any other ) ...

    Include the object ...

    OBJ
    tv : "TV_Text"

    In your PUB Main let the object know what pin the hardware is connected to ...

    tv.Start(12)

    When you want to debug / display something ...

    tv.Str(String("This is easy!"))
    tv.Dec(123456)
    tv.Hex($12345678,8)

    and so on.
  • Cluso99Cluso99 Posts: 18,069
    edited 2008-07-26 14:00
    I just posted an example that uses the FullDuplexSerial and PST where you can test spin code by displaying the output back to PST. The thread is programming question/system clock.
  • ElectricAyeElectricAye Posts: 4,561
    edited 2008-07-26 14:25
    Great, this is awesome! In addition to the PST, I'd like to give this TV thing a go, too. But... anybody have a link to something that shows a clod how to hook up a Propeller to a TV step by step? I'd like to say I'm playing dumb here but, alas, when it comes to microprocessors, mine is not an act.

    thanks again!

    Mark
  • LeonLeon Posts: 7,620
    edited 2008-07-26 15:01
    Look at the schematic for the Demo board, you only need three resistors.

    Leon

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Amateur radio callsign: G1HSM
    Suzuki SV1000S motorcycle

    Post Edited (Leon) : 7/26/2008 3:13:05 PM GMT
  • ElectricAyeElectricAye Posts: 4,561
    edited 2008-07-26 15:26
    Thanks, Leon, this is the kind of thing I was looking for.

    http://www.parallax.com/Portals/0/Downloads/docs/prod/prop/PropDemoDschem.pdf

    Now all I need are some part numbers for the jacks, etc. I'm guessing these are the kinds of things one can find at Radio Shack???

    Also, is this TV output from the propeller the kind of signal that can be piped directly into the little thingy on the back on my TV where my cable connection normally goes?

    Is my profound and unblissful ignorance showing here?

    a thousand thanks for your indefatigable patience,
    Mark
  • LeonLeon Posts: 7,620
    edited 2008-07-26 15:48
    That's right, you only need the three left-hand resistors.

    I used a phono (RCA) socket on one of my boards. On another I just used a two-pin Molex header connected to an in-line phono socket with a couple of wire leads. You are presumably in the USA and I don't know much about US TVs. UK ones have a multi-way SCART socket and I simply bought a SCART to phono adapter. You will need to connect the video output to a baseband composite video input on your TV, I don't know if that is the same as the cable connection.

    Leon

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Amateur radio callsign: G1HSM
    Suzuki SV1000S motorcycle

    Post Edited (Leon) : 7/26/2008 3:53:28 PM GMT
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-07-26 15:58
    Grab a copy of the Propeller Cookbook (listed in my sig)

    It will help you getting started with the hardware basics.

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Getting started with the Protoboard? - Propeller Cookbook 1.4
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card? - PropDOS
    Need a part? Got spare electronics? - The Electronics Exchange
  • ForrestForrest Posts: 1,341
    edited 2008-07-26 16:03
    After you connect the (3) resistors to your PE Kit breadboard, you could simply cut a composite video cable cable in half and wire it directly to your breadboard, or use this RCA to Breadboard Adapter for $4.95 and a composite video cable www.parallax.com/Store/Accessories/CablesConverters/tabid/166/CategoryID/40/List/0/Level/a/ProductID/514/Default.aspx?SortField=ProductName%2cProductName
  • DroneDrone Posts: 433
    edited 2008-07-26 16:37
    Hi Mark,

    TV output is indeed easy provided you are NTSC compatible (PAL is a bit more troublesome but there has been great work done recently - links/sticky anyone I've lost the thread). Never-mind about PAL, your profile says you're in the US, so default NTSC TV output should work for you just fine. Do take into consideration that the TV driver objects use up memory and cog(s), so if your apps are memory intensive and in the end don't require TV out, you may want to use PST which needs very little in terms of resources from the prop.

    For example, I'm working on a clock-generator with variable frequency register data (based on user frequency input; yes this is the Si570/1 part) that is stored in RAM (lots of data). There's no way I could run the TV driver in this case natively the video memory mapping is too large. PST allows me to generate and use the tables in almost all RAM available due to the small serial driver footprint. Yes I could use a larger EEPROM or second EEPROM for the tables, eventually that may be the case; but that's not where I am in the development-cycle at the moment. PST runs on the PC and requires a small resource footprint on the propeller to allow me to debug the complex register generation algorithms for the clock generator.

    In summary - I don't think PST gets a fair-shake here, I see little reference to it. PST is god in terms of: (1) Newbie initial experience with propeller, PST doesn't require any LEDs or buttons for a hello-world (and more) intro to propeller, and (2) a very useful tool as a small footprint debug terminal that really helps when your data-space is large compared to your code-space. Let's not forget, for anyone that travels a lot and wants to work with the propeller, there are the likes of the Propstick (I think now deprecated and maybe I got the name wrong) and Propstick USB that when used in conjunction with PST allow you to continue coding with Propeller in a hotel room, for-example.

    BTW, for TV out consider buying a cheap-small DVD player with video-in (ebaY, amazon?). I use one for TV out display, but it is only PAL (I'm in Jakarta). Cost me around $50 USD. But I still fall-back to PST for quick-lean debug. I've seen a thread on this Forum about buying "broken" LCD DVD players at very low-cost, the DVD drive doesn't work but the display works. Hmmm... YMMV IMHO.

    Regards, David
  • Cluso99Cluso99 Posts: 18,069
    edited 2008-07-27 03:29
    I agree with drone. I started using Hyperterminal (which is a pain and I had to put it on a seperate port because it resets the propeller by DTR). Then I found PST smile.gif
    You can then take your development anywhere with ease.

    Have you considered the VGA connector to a pc screen? - also a cheap option although unless you get the connector from parallax (or their distributor) you will have to butcher a connector to make it fit (without the ps2 ports I mean). Lots of people have old pc screens because they updated to LCD.
  • ElectricAyeElectricAye Posts: 4,561
    edited 2008-07-27 04:07
    You guys are too good to me. Thanks to all your responses, my brainfog on this is finally lifting.

    Drone, you've even given me a good idea on what to do with my broken portable DVD player!

    beauty to all,
    Mark
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-07-27 04:13
    The broken DVD trick woks great. (Just watch to make sure the one you get has AV-in)

    Here's a shot of mine. (picked up from Fleabay for $14 with a broken DVD mech.)
    I can run over 3 hours on the battery.

    bp1.blogger.com/_BIrFr7xyNV0/SCpQcAxN0JI/AAAAAAAAAGA/NOfhNJ7fW6k/s1600-h/GEDC0002.JPG

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Getting started with the Protoboard? - Propeller Cookbook 1.4
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card? - PropDOS
    Need a part? Got spare electronics? - The Electronics Exchange
  • ElectricAyeElectricAye Posts: 4,561
    edited 2008-07-27 04:21
    Oldbit,

    That rescued DVD concept is totally cool. It's just the kind of thing drives my wife crazy seeing piled up on the dining table. I can't wait to make it happen.

    And furthermore, I love your avatar... but tell me... how in hell did you get a photo of me as a kid???

    peace,

    Mark
  • HarleyHarley Posts: 997
    edited 2008-07-27 18:48
    Oldbitcollector and anyone else,

    Does anyone have a clue as to what circuitry is required for portable DVD players that do NOT have a TV-IN jack?

    Seems all the ones I've been looking at do not have TV-IN. Maybe because I'm looking for lower $/inch pricing.

    Also, might a digital photo frame also utilize the same circuitry to display TV-IN?

    Seems an LCD being digital would require some sort of conversion from NTSC to digital plus line and frame sync ability.

    Not meaning to hi-jack this thread. Just seemed appropriate to ask; if new thread s/b done, just say so. Thanks.
    (edit)
    I also meant to say that is one beautiful picture of your DVD player display. Crisp and clear. Looks to be around 26 lines of 40 characters, or so. What driver provided that? Using TV_text object only provides some 13 lines; adequate for my present use, though not as crisp on an analog monitor (5" b/w). Thanks for that photo. (/edit)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Harley Shanko

    Post Edited (Harley) : 7/27/2008 7:23:12 PM GMT
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-07-27 20:40
    You've got a fair chance of being able to hack a portable DVD with an AV in signal.
    (Thats is what I've done here: www.warrantyvoid.us/cyberhomedvdplayer.html )

    But keep in mind its hardware hacking and there is always chance of failure.

    The video driver I use is AI_Generic, you can download it here.
    http://forums.parallax.com/showthread.php?p=704974

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Getting started with the Protoboard? - Propeller Cookbook 1.4
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card? - PropDOS
    Need a part? Got spare electronics? - The Electronics Exchange
Sign In or Register to comment.