Shop OBEX P1 Docs P2 Docs Learn Events
debugging on HYDRA — Parallax Forums

debugging on HYDRA

phillip vphillip v Posts: 48
edited 2007-10-22 18:04 in Propeller 1
Hi, I have a HYDRA and was working my way threw the book... on page 93 under the tip box it talks about hooking a lcd to the expansion port for debugging... has anyone dune this???? this sounds like a veary handy debugging tool.... I know I'de love to have one, but its ben a little while since I've made anything myself and I'm just getting back into programming...

Comments

  • phillip vphillip v Posts: 48
    edited 2007-10-21 15:39
    the more I think about it, I'de think it would be better to hook it to the [url=mailto:USB@SER]USB2SER[/url] serial interface that way we leave the expansion port open......
  • ColeyColey Posts: 1,110
    edited 2007-10-21 17:19
  • phillip vphillip v Posts: 48
    edited 2007-10-21 17:39
    thanks, I'll check thare.... I did finde the propeller cookbook but it didn't have anything on lcd's....
  • phillip vphillip v Posts: 48
    edited 2007-10-21 17:56
    I've ben looking at the parallax 2x16 serial LCD, I think I may be able to hook it to the USB2SER port on the HYDRA...."but·I'm not shure yet"·if I can,all I need is a driver for it... I've never wrote a driver.... but I would realy like haveing something like this when I start programming on the HYDRA, it would be a real help...
  • phillip vphillip v Posts: 48
    edited 2007-10-22 00:13
    after reading up on the·parallax 2x16 serial LCD and the propeller chip I can see this lcd won't work..... and I was so hopeing for an easy way to see what the hydra was doing when it was running code... I was hopeing it would help me better understand how the propeller chip works... and it would have ben a good debug tool as well...
  • Mike GreenMike Green Posts: 23,101
    edited 2007-10-22 04:24
    The serial LCD should work fine and you could hook it to the USB2SER port or the network port. I've also used the VGA and TV ports simultaneously for debugging (except you can't really use the expansion port when you're using the VGA port ... they use the same pins).

    What sort of things were you thinking of doing with a debug display?
  • phillip vphillip v Posts: 48
    edited 2007-10-22 12:21
    what I was hopeing to do was to send code or a copy of it from a cog and or ram to an LCD at the USB2SER ..... so I could watch the code as it is running.... I was hopeing to use the "parallax 2x16 serial LCD" because it has a bult in driver... but after reading up on that·LCD I found it was made for the stamp2 and I don't think it will work with the propeller,"will it?????"... anyways if it will not that leaves me with hooking some kind of LCD to the USB2SER and then I need a driver.... "or some way to send code if I can get the parallax LCD to work" something I've never wrote... you see, the only back ground I have in programming is a "tandy 64k color computer 2" when I was a kid so I'm no whare near the skill level to write a driver.... haveing a LCD would not only help with debugging it would help me to better understand the propeller it self....

    Post Edited (phillip v) : 10/22/2007 2:11:56 PM GMT
  • phillip vphillip v Posts: 48
    edited 2007-10-22 12:34
    I just though of something.... anything we pull from the cog's or ram will be in machine code... "RIGHT????"
  • Mike GreenMike Green Posts: 23,101
    edited 2007-10-22 14:28
    This sounds like one of these "make sure you can walk before you try to run" sort of situations. The serial LCDs need a serial data stream. In the Stamps, all the work to make that happen is hidden in the SEROUT statement. In the case of the Propeller, it's only partially hidden (in what's called an object ... just a package of subroutines that someone else wrote that you can include in your program). There are several different objects that you could use to talk to a serial LCD. There's one written mostly in assembly language called FullDuplexSerial. There are several others written in Spin including one (the BS2 library) that's designed to make it easier for people to move programs from Stamps to the Propeller and provides some of the built-in functionality of the Stamps as a "ready-to-go" library for the Propeller.

    A couple of points ...
    1) Assembly language programs exist when they run as what's called machine code ... just 32-bit numbers that the hardware knows what to do with. These run in the COGs. It would be possible for someone to write an assembly language debugger, but it would be pretty complex. There's a PC program called GEAR that's available here (http://forums.parallax.com/showthread.php?p=624986) that simulates a Propeller and might be the sort of thing you want.
    2) Spin programs reside in the HUB memory and are interpreted (like what the Stamps do) by a Spin interpreter that's running in a cog and loaded from on-chip ROM automatically. GEAR knows about Spin code too.
  • phillip vphillip v Posts: 48
    edited 2007-10-22 15:31
    ok.. I see.. I'll ckeck gear out right now..
  • phillip vphillip v Posts: 48
    edited 2007-10-22 15:39
    yes, that is the kind of thing I've ben looking for... thank you very much...
    I'm allso thinking of getting the Basic stamp activity kit, I've worket with the stamp2 befor but I think I need a refreasher in programming microprocessors....

    Post Edited (phillip v) : 10/22/2007 4:42:07 PM GMT
  • Mike GreenMike Green Posts: 23,101
    edited 2007-10-22 17:14
    That's one option. Another might be to get a Propeller Education Kit and work through the exercises/labs that come with it and the ones downloadable from here (see the "sticky" thread at the top of the Propeller forum list).
  • phillip vphillip v Posts: 48
    edited 2007-10-22 18:04
    yha... I've ben reading the propeller manual(.pdf) and I think the propeller education kit is what I need.... thanks for everythingroll.gif but I'm starting to understand the propellers architecture....

    Post Edited (phillip v) : 10/22/2007 8:13:43 PM GMT
Sign In or Register to comment.