2x16 LCD Graphics :)


Closed Thread
Results 1 to 40 of 52

Hybrid View

  1. #1
    Join Date
    Aug 2003
    Posts
    985

    Default 2x16 LCD Graphics :)

    Hi Guys,
    I know the odometer effect has been done, also the bargraph,
    but both use single isolated custom chars as up to eight screen buffers drawn all over the place.

    Has anyone considered making a frame buffer array in RAM, and then copying out
    the bytes to all of the eight custom characters for every frame?



    It's probably five years too late with the price of gfx LCDs now,
    but I think a nice exercise, and think the rotating 3D cube is doable.
    I was thinking do a real 23x17 frame buffer, and just accept that the
    inbetween lines are invisible pixels, so long as the display is animated.



    Most of the points on the cube are duplicates of another with different initial 2D offsets.
    I can't do the point rotation without trig, but can use another program to generate the
    pre rotated list of points of 36 or so different angles around each axis.
    The lines should be right to draw locally since they only need square root.
    Also proper balls bouncing off walls at inverted angles should be ok locally.

    Pixel resolution horizontal scrolling should be also possible on an 8x1 display.

    Any ideas suggestions? Has someone done this?
    Last edited by Art; - 10th October 2013 at 13:42.

  2. #2
    Join Date
    Aug 2003
    Posts
    985


    Did you find this post helpful? Yes | No

    Default Re: 2x16 LCD Graphics :)

    Having to send the command to change lines halfway though the drawing is a tragedy,
    and so is setting the LCD home, but the latter doesn't interrupt drawing halfway through.
    It would be better to waste the same amount of time between sending every character.

  3. #3
    Join Date
    Aug 2003
    Posts
    985


    Did you find this post helpful? Yes | No

    Default Re: 2x16 LCD Graphics :)

    Ok, now I can set pixel coordinates, and no longer have to think about custom characters

    ...

    It was hard because each line for a custom char is still a byte, but only five bits of it are used,
    and the LCD wants them in the least significant bits, but my framebuffer is a continuous stream of bits.
    I'll try the line drawing, and calculating proper angles for balls.
    A smaller (single pixel) ball works better in the small space, but didn't make for a good video.
    Last edited by Demon; - 13th October 2013 at 15:08. Reason: video removed at user's request - Robert

  4. #4
    Join Date
    Aug 2003
    Posts
    985


    Did you find this post helpful? Yes | No

    Default Re: 2x16 LCD Graphics :)

    Line drawing (almost) :

    ...
    Last edited by Demon; - 13th October 2013 at 15:07. Reason: video removed at user's request - Robert

  5. #5
    Join Date
    Aug 2003
    Posts
    985


    Did you find this post helpful? Yes | No

    Default Re: 2x16 LCD Graphics :)

    One more:

    ....
    Last edited by Demon; - 13th October 2013 at 15:07. Reason: video removed at user's request - Robert

  6. #6
    Join Date
    Nov 2003
    Location
    Sao Paulo - Brazil
    Posts
    92


    Did you find this post helpful? Yes | No

    Default Re: 2x16 LCD Graphics :)

    Impressive ! .... Really.
    Last edited by srspinho; - 12th October 2013 at 16:18. Reason: Error

  7. #7
    Join Date
    Feb 2012
    Location
    PERTH AUSTRALIA
    Posts
    838


    Did you find this post helpful? Yes | No

    Default Re: 2x16 LCD Graphics :)

    prity cool art

  8. #8
    Join Date
    Aug 2003
    Posts
    985


    Did you find this post helpful? Yes | No

    Default Re: 2x16 LCD Graphics :)

    Thanks Guys It took far too long for a frivolous thing
    It can run faster than the video, and looks much better, but then also difficult to see each frame.

    The worst part of it is the whole character map has to be stored in the pic.. unless it can be read from
    the display itself which I have never tried, and am not using the signal line to read back from the LCD.

    It’s not in BASIC, but the transition easily could be. Just a bunch of while and for loops and if statements.
    Something I learned, at least with the module I’m using, it takes three times longer to use the 0x02
    command to return to the first line than addressing the memory space for it with he 0x80 command instead.
    I would not ever use 0x02 to send the cursor to the first line again.
    If the delays are too fast that is the first command to choke the display module.
    I am not using any clear screen command to have tried that.

    A poker machine Robert, I think could be done, but you don’t get multiple pay lines like modern slots.

  9. #9
    Join Date
    May 2013
    Location
    australia
    Posts
    2,388


    Did you find this post helpful? Yes | No

    Default Re: 2x16 LCD Graphics :)

    according to my lcd data sheet the 0x02 does more than home the cursor , it says it also returns a shifted display back to original pos (execute time 40uS-1.64mS)
    seems its best to avoid it if timing is an issue

Similar Threads

  1. Need advice with LCD 2x16
    By fratello in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 26th April 2011, 06:58
  2. 2x16 lcd problem
    By k3v1nP in forum mel PIC BASIC
    Replies: 11
    Last Post: - 30th October 2008, 04:46
  3. graphics lcd with lcdout style serial??
    By reaper0995 in forum Serial
    Replies: 4
    Last Post: - 27th March 2008, 19:57
  4. small 2X16 LCD
    By Ron Marcus in forum Off Topic
    Replies: 2
    Last Post: - 26th October 2007, 20:37
  5. OT: KS0108 Graphics LCD control question
    By Archilochus in forum General
    Replies: 2
    Last Post: - 18th December 2004, 18:23

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts