Shop OBEX P1 Docs P2 Docs Learn Events
How do I use the PTP as a VGA replacement? — Parallax Forums

How do I use the PTP as a VGA replacement?

StephenMooreStephenMoore Posts: 188
edited 2013-02-12 03:03 in Propeller 1
A friend of mine obtained a Propeller Touchscreen Platform with 4.3" Touchscreen. He asked me to help him get a series of VGA menu screens transferred over to it. However, when I add code of any size at all I get a compiler error saying out of memory.

The graphics demo has the following statements:
screensize = 20 * 15
_stack = ($3000 + $3000 + 200 + 2 * screensize) >> 2

This seems to be the culprit. All he really needs are screens to match the vga (~30 cols x 13 rows) along with a vga like object (vga.str, vga.out, etc.). Has anyone worked on this sort of thing for the LCD display?

Regards,

sm

Comments

  • RaymanRayman Posts: 14,826
    edited 2013-02-11 17:54
    There are some code examples here for PTP:
    http://www.rayslogic.com/Propeller/Products/PTP/PTP.htm

    But, this is a 3.5" screen. If you really have a 4.3" screen maybe you have a PSB equivalent:
    http://www.rayslogic.com/Propeller/Products/PSB/PSB.htm
  • StephenMooreStephenMoore Posts: 188
    edited 2013-02-11 21:36
    You are right. It is the 3.5" PTP. Any ideas to free up stack space?

    If I use the graphics object I see I can use
    gr.textmode
    gr.text
    to display alphanumeric.

    sm
  • MagIO2MagIO2 Posts: 2,243
    edited 2013-02-11 23:03
    I don't know the PTP and especially which drivers are available for that. But if available/possible you should rather use a text-driver. Together with the propeller font you can draw nice borders to give a windows-look. A text-driver needs much less RAM than a graphics driver.

    You have plenty of space on the SD-card! For menus and stuff it is fast enough! So, put all the strings you need to display on the SD-card and load them just before display. I enhanced the FSRW with some functions which make copying things from and to SD-card very easy and there is no FAT32 overhead.
    http://forums.parallax.com/showthread.php/117573-Virtual-Memory
  • RaymanRayman Posts: 14,826
    edited 2013-02-12 03:03
    Check out the PTP_Paint example... It has a graphics area and 2-bit bitmap buttons and has plenty of free space.
    There are tools on my website to create 1-bit and 2-bit bitmaps that can be used here...
Sign In or Register to comment.