PROJECT: Hydra 16x2 LCD Screen and Debug Monitor Process.
epmoyer
Posts: 314
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:
Post Edited (epmoyer) : 6/11/2007 5:37:42 AM GMT
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:
Post Edited (epmoyer) : 6/11/2007 5:37:42 AM GMT
Comments
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
Post Edited (CardboardGuru) : 6/3/2007 3:38:59 PM GMT
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.
'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)
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