Shop OBEX P1 Docs P2 Docs Learn Events
Graphics tutorial. Non-hydra based? — Parallax Forums

Graphics tutorial. Non-hydra based?

tmshawtmshaw Posts: 14
edited 2009-11-11 20:14 in Propeller 1
Hello.
I am using a small lcd propeller module. www.gadgetgangster.com/find-a-project/56.html?projectnum=162

I am having a hard time getting my head around how to draw graphics on the screen. I have looked over the propeller graphics demo code, but it is doing so much that it is hard to break it down into something basic that I can understand.

Does anyone know of any tutorials on graphics for propeller that aren't based on the Hydra system? Something simple like...drawing a circle on the screen and moving it from Point A to Point B?

I think I would be using the following Objects: graphics.spin, TV.spin, and i2cDrivers.spin

Comments

  • Erik FriesenErik Friesen Posts: 1,071
    edited 2009-11-11 19:26
    why don't you just comment out most of the code in the graphics demo code, and figure out what does the circles. The low level code goes pretty deep, but the top level code should be understandable enough to do what you want.
  • JRetSapDoogJRetSapDoog Posts: 954
    edited 2009-11-11 20:14
    I've used that board a bit (but by no·means am I an·expert and I've been focused on other matters).· You probably know this, but if you're just drawing to the attached LCD screen (as opposed to trying to go to a TV or a VGA monitor), you'll want to download Rayman's versions of various objects·that are modified to work with the LCD.· Rayman is the forum member here that designed the board and who modified software to work with it.· The LCD of that board has its own graphics RAM, and Rayman wrote/modified·code to initialize the LCD and write to it.·
    Here's the PSM page of Rayman's "rayslogic" site: ·http://www.rayslogic.com/Propeller/Products/PSM/PSM.htm
    And here are·the file downloads for the PSM:· http://www.rayslogic.com/Propeller/Products/PSM/Files.htm

    If you want to experiment with the original graphics objects without modification, then you'll need to add an 8-pin header (or 10-pin) and connect to a small breakout board with a few resistors and an appropriate connector, either VGA, composit video or both.· You could probably add the three resistors required for TV to the PSM itself, and then use a cable to a composite video plug or whatever.· I'd recommend adding at least one of VGA or TV output capability so that you can experiment with Propeller objects more directly, or at least because it's cool to see the Propeller drive a big display (the little engine that could).

    Again, the board has it's own graphics ram.· If you do hook up to a VGA/TV breakout board, and you first run a program on the LCD, it will continue to display that program on the LCD statically even after you've wiped the Prop memory and are displaying a program on a VGA monitor or TV.· That's because nothing resets the LCD display when you reprogram the Prop's memory.·

    At this point, I've just used the display for alphanumerics and to paint the screen with a solid color, no circles and such.· But if one can draw a point (or series of points), one can draw a square, circle, etc., especially since the screen has it's own memory.· You can draw as fast or slow as you want, and only have to draw once.· That is, you don't have to constantly refresh the screen like you do with a VGA monitor or TV.· It's not exactly what you were asking, but perhaps it will help a little bit.· Good luck.· --Jim




    Post Edited (JRetSapDoog) : 11/11/2009 8:19:58 PM GMT
Sign In or Register to comment.