Shop OBEX P1 Docs P2 Docs Learn Events
PROJECT: Hydra 16x2 LCD Screen and Debug Monitor Process. — Parallax Forums

PROJECT: Hydra 16x2 LCD Screen and Debug Monitor Process.

epmoyerepmoyer Posts: 314
edited 2007-06-10 15:24 in Propeller 1
I just got a 16x2 LCD display working on the Hydra, wired to the expansion slot.

I'm now working on a Debugging Monitor process that will run in a cog and display the contents of whatever memory locations are requested by the user in the user's selected format (hex, decimal, fixed point). The watch process will support a multi line view which can be scrolled up or down under the direction of the calling procedure; allowing the watched data to be scrolled using whatever user input device the calling program has available (mouse, keyboard, game pad, whatever). In a nutshell you can pass it the address of one or more variables and be able to monitor them as your program runs. I'll also make a (slower) cog-less version for applications where a dedicated cog cannot be spared for debug.

Is anyone out there interested in having such a thing for their own debugging/development? If so I'll make a nice user's manual and manufacture a handful of displays mounted to a small PCB so that they plug (oriented vertically) straight into the expansion slot (mine is remoted on wires right now for development). Target price would be something like $35 for the package (display, general purpose drivers, debug "watch" application, user's manual).

Here's my Frankenstein photo of the first working display:

hydra_debugger.jpg

Post Edited (epmoyer) : 6/11/2007 5:37:42 AM GMT

Comments

  • HallomannHallomann Posts: 21
    edited 2007-06-03 14:29
    Looks great.
    Can you post the schematic?
    Because I have already a Display, but no Ideo how to interface it.

    Cheers,
    Hallomann

    Post Edited (Hallomann) : 6/3/2007 6:13:21 PM GMT
  • CardboardGuruCardboardGuru Posts: 443
    edited 2007-06-03 14:45
    That's great. It'd have saved my bacon several times over the last couple of months. I'll buy one. It's be nice if it was horizontal or on a flylead, but no worries if not.

    Post Edited (CardboardGuru) : 6/3/2007 3:38:59 PM GMT
  • epmoyerepmoyer Posts: 314
    edited 2007-06-04 01:58
    I'll post some schematics in about a week. I'm headed out of the country for most of next week so I'll be laying low on the Hydra scene. I may get time to work on some of the LCD related documentation and code while I'm traveling.

    The display is a Lumex LCM-S01602DSF/C, which has a parallel interface to an on board Samsung S6A0069 controller. The schematics aren't much use without the driver, as it was rather tricky to get the thing up and talking. There are a lot of subtleties to getting it into 4 bit mode (which allows you to easily interface it to the Hydra's expansion port), and a lot of trickiness to getting the init code right so that the display can be properly initialized in the case of a "warm" restart (i.e. downloading a new SPIN code image to RAM without a power off).

    Right now I have all the fundamental low level control code working and need to code the debug monitor app on top of it.

    Also I think the SCuM tool would be very useful in conjunction with the debug process for this project, so I may bang that out on my trip (see my posted .PLAN for an explanation of SCuM and links to the discussion thereof). Since people will be cramming the debugger process into small code footprints as their apps grow, SCuM would allow one to pair down the debug code to a minimal footprint if necessary by dropping unused features.
  • epmoyerepmoyer Posts: 314
    edited 2007-06-10 15:24
    This project is going very well and is already proving useful. Nearly finished now. The debug monitor supports multiple LCD "pages", where each page gives you info on a variable you are watching. For a given watched variable the LCD screen looks something like:

    01:ship_dx[noparse][[/noparse]0]
    Fix  0001.02521
    



    '01' is the number of the watched variable (i.e. its order in the list of all watched variables)
    'ship_dx[noparse][[/noparse]0]' is the name of the watched variable
    'Fix' is the format (fixed point 16.16 in this case)
    '0001.02521' is the variable's current value. The value is maintained in real time so it updates live as the program runs.

    The debug monitor supports a call to add watch variables and calls to page up/page down, which you can hook to whatever user interface your game has available (keyboard, mouse, gamepads)
    PUB add_watch (watch_addr_arg, watch_format_arg, watch_text_p)
    PUB page_up  
    PUB page_down
    
    



    Supported data formats are Hex(32,16,8), Int(32,16,8), Uint(32,16,8), Fix(16.16), Float(32). Just have to finish the Uint's and the Float and it's done.

    Post Edited (epmoyer) : 6/10/2007 5:50:25 PM GMT
Sign In or Register to comment.