Shop OBEX P1 Docs P2 Docs Learn Events
Graphics Slave: Don't waste all that valuble HUB RAM! — Parallax Forums

Graphics Slave: Don't waste all that valuble HUB RAM!

MicrocontrolledMicrocontrolled Posts: 2,461
edited 2010-07-05 15:03 in Propeller 1
For this you will need:

2 Propeller setups, with at least 1 having EEPROM
Video setup for the one with the EEPROM
Mouse setup for the other (optional)
A composite video monitor/display

Load up and run the file "Graphics Emulator v.1.0" into the EEPROM on the Propeller with the video. If you have a demo board, use "Graphics Emulator v.1.0 (pins 0 and 1)" as the serial pins will be 0 and 1 instead of 31 and 30.

Hook up the serial lines between the Propellers. I used just wires, but pullups may be used. On the video prop, serial lines are 0 RX and 1 TX, or 31 RX and 30 TX. Change the settings in the Demo to match what pins you hook them up to on the mouse prop.

Once you have everything loaded, run the demo. It will have a short anamation and then let you move the cursor around. Neat, huh?

This project is in the beginning stages, but it is a Graphics Slave for another prop. I had so many projects that needed a lot of HUB RAM but that was limited by the buffer space in the Graphics object. This splits the job up between 2 props to give you lots of HUB RAM on the prop doing the work. It is also amazingly fast for serial communication. The mouse cursor works pretty smooth for being drawn on the fly, transmitted through serial commands with all the handshaking. It operates at 54000 baud, and I've gotten it working at 128000 baud, but that's too risky for some setups. I'll release the code for modifing after I get it fully released. Think of this as a beta test.

Let me know if it works for you! Comments are welcome!

Thanks,

Micro

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Check out my new website!!

Use the Propeller icon!! Propeller.gif

Follow me on Twitter! Search "Microcontrolled"

Comments

  • jazzedjazzed Posts: 11,803
    edited 2010-06-11 02:34
    Nice out of the box thinking there. I always thought it would be valuable to have a second propeller be the 32KB VRAM video graphics engine with 8 cogs doing graphics primitives. If I'm not mistaken Baggers PropGFX does that. It's nice to see another example especially from you [noparse]:)[/noparse]

    Cheers.
    --Steve

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Propeller Pages: Propeller JVM
  • RossHRossH Posts: 5,519
    edited 2010-06-11 02:47
    @Microcontrolled,

    Very nice. I did something similar for Catalina (I called them "proxy" drivers). Doing the same for SPIN programs is a great idea - it really makes the multi-prop platforms (e.g. Morpheus, TriBladeProp) very attractive.

    My proxy video driver only supports text functions, but I also allow the keyboard, mouse and SD card drivers to work the same way. You might consider providing SPIN versions of those as well. In Catalina all the proxied drivers share a common serial link between the Props - see the Catalina Reference Manual for details (the protocol is documented right at the end of the manual).

    Ross.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Catalina - a FREE C compiler for the Propeller - see Catalina
  • heaterheater Posts: 3,370
    edited 2010-06-11 05:56
    Wow. X11 for the Propeller [noparse]:)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    For me, the past is not over yet.
  • Cluso99Cluso99 Posts: 18,069
    edited 2010-06-11 07:32
    Great work microcontrolled.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Links to other interesting threads:

    · Home of the MultiBladeProps: TriBlade,·RamBlade,·SixBlade, website
    · Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
    · Prop Tools under Development or Completed (Index)
    · Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) ZiCog (Z80) , MoCog (6809)·
    · Prop OS: SphinxOS·, PropDos , PropCmd··· Search the Propeller forums·(uses advanced Google search)
    My cruising website is: ·www.bluemagic.biz·· MultiBlade Props: www.cluso.bluemagic.biz
  • Ym2413aYm2413a Posts: 630
    edited 2010-06-11 11:48
    A second Prop for Video output is a great idea. I wonder why more people don't play around with the idea. :]
    Nice job!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Share the knowledge: propeller.wikispaces.com
    Lets make some music: www.andrewarsenault.com/hss

  • Bill HenningBill Henning Posts: 6,445
    edited 2010-06-11 13:29
    Nice work - very useful indeed.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.mikronauts.com E-mail: mikronauts _at_ gmail _dot_ com
    My products: Morpheus / Mem+ / PropCade / FlexMem / VMCOG / Propteus / Proteus / SerPlug
    and 6.250MHz Crystals to run Propellers at 100MHz & 5.0" OEM TFT VGA LCD modules
    Las - Large model assembler Largos - upcoming nano operating system
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2010-06-11 15:30
    Right on TRACK! This is EXACTLY what I've been envisioning for a Propeller computer. Now, drop in Ahle2's SIDcog software and dump both graphics and sound on a second propeller. [noparse]:)[/noparse]

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Propeller Feature Projects: PropellerPowered.com
    Visit the: PROPELLERPOWERED SIG forum kindly hosted by Savage Circuits.
  • MicrocontrolledMicrocontrolled Posts: 2,461
    edited 2010-06-11 16:52
    Thanks everyone!

    I have made a cool looking "3D" demo attached that you can try out.

    It's a shame SD won't fit on the program, or I could do a WAV player or SIDcog or something too.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Check out my new website!!

    Use the Propeller icon!! Propeller.gif

    Follow me on Twitter! Search "Microcontrolled"
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2010-06-11 16:54
    You don't need the SD driver to do SIDcog...

    Just open the file with the first propeller and send the 25 registers over the serial link to the second Propeller running
    video and SIDcog. Should be easy-peasy. [noparse]:)[/noparse]

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Propeller Feature Projects: PropellerPowered.com
    Visit the: PROPELLERPOWERED SIG forum kindly hosted by Savage Circuits.
  • MicrocontrolledMicrocontrolled Posts: 2,461
    edited 2010-06-11 17:06
    The SIDcog program consumes 843 longs not counting variables. There is a little more then 100 longs available on the Graphics Emulator. I could make a sound chip that could play WAV, RTTTL, and SID files. It would make the classic 3 Prop system.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Check out my new website!!

    Use the Propeller icon!! Propeller.gif

    Follow me on Twitter! Search "Microcontrolled"
  • MicrocontrolledMicrocontrolled Posts: 2,461
    edited 2010-06-11 17:18
    I just tried to single-buffer it, but the flicker was horrible.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Check out my new website!!

    Use the Propeller icon!! Propeller.gif

    Follow me on Twitter! Search "Microcontrolled"
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2010-06-11 17:18
    Micro:

    Post some source code to your binaries and let the mass of experts see if they can wedge more toys in. [noparse]:)[/noparse]
    Collaboration will lead to more ideas and features.

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Propeller Feature Projects: PropellerPowered.com
    Visit the: PROPELLERPOWERED SIG forum kindly hosted by Savage Circuits.
  • MicrocontrolledMicrocontrolled Posts: 2,461
    edited 2010-06-11 17:30
    Here is the source. Hope it helps! smile.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Check out my new website!!

    Use the Propeller icon!! Propeller.gif

    Follow me on Twitter! Search "Microcontrolled"
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2010-06-11 17:43
    This is the client side (video display) right? Seems there is plenty of room for SIDcog and more...

    Am I missing something important?

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Propeller Feature Projects: PropellerPowered.com
    Visit the: PROPELLERPOWERED SIG forum kindly hosted by Savage Circuits.
  • MicrocontrolledMicrocontrolled Posts: 2,461
    edited 2010-06-11 18:08
    On the memory map the stack space needed for the video buffer is not shown. The buffer takes up 6,100 longs(!) of space.
    Add the program space, the variable space, and 6,100 together to get the true amount, and you only have about 100 longs left.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Check out my new website!!

    Use the Propeller icon!! Propeller.gif

    Follow me on Twitter! Search "Microcontrolled"
  • koze85koze85 Posts: 18
    edited 2010-07-03 14:28
    Great Code just what i needed...
    The only problem i have is that adds in the text·string a "T" character so i terminated the string 2 characters before it is to be terminated and its fine
            "T":
              commands[noparse][[/noparse]0] := ser.rxtime(100)
              commands[noparse][[/noparse]1] := ser.rxtime(100)
              repeat i from 0 to 100
                text[noparse][[/noparse]i] := ser.rxtime(100)
                if text[noparse][[/noparse]i] == 0
                  quit
              if CheckForTimeout == 1
                text[noparse][[/noparse]i-2]:=$00
                gr.text(commands[noparse][[/noparse]0], commands[noparse][[/noparse]1], @text)
                ser.tx(ACK)
                ComClear
    

    I dont know if it my configuration but now it works fine
  • blittledblittled Posts: 681
    edited 2010-07-03 16:16
    I've been looking into using the propeller as a media slave for other micro controllers, like the Chameleon. Could this be used for such a project?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Will work for Propeller parts!
  • MagIO2MagIO2 Posts: 2,243
    edited 2010-07-03 17:10
    I don't understand why you are so fixed to the propeller?! I have the same plan ... support the propeller with a graphics engine. But my prefered co-processor would be an XMOS with enough SRAM, an SD card and a nice 800x600 display.

    Of course only because the prop II still needs a while to come.
  • AleAle Posts: 2,363
    edited 2010-07-03 17:35
    I made something similar a while ago... propeller.wikispaces.com/MonoLCD640 but I never wrap them for the OBEX, so nobody uses my ideas [noparse]:([/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Visit some of my articles at Propeller Wiki:
    MATH on the propeller propeller.wikispaces.com/MATH
    pPropQL: propeller.wikispaces.com/pPropQL
    pPropQL020: propeller.wikispaces.com/pPropQL020
    OMU for the pPropQL/020 propeller.wikispaces.com/OMU
    pPropellerSim - A propeller simulator for ASM development sourceforge.net/projects/ppropellersim
  • AleAle Posts: 2,363
    edited 2010-07-03 17:38
    MagIO2: Even the XMOS does not have enough internal SRAM but you can connect a SDRAM and thus have a nice external and big framebuffer [noparse]:)[/noparse]... did you try that already ? I think the project is called XMOSone or similar... I'm detached of so many things lately...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Visit some of my articles at Propeller Wiki:
    MATH on the propeller propeller.wikispaces.com/MATH
    pPropQL: propeller.wikispaces.com/pPropQL
    pPropQL020: propeller.wikispaces.com/pPropQL020
    OMU for the pPropQL/020 propeller.wikispaces.com/OMU
    pPropellerSim - A propeller simulator for ASM development sourceforge.net/projects/ppropellersim
  • MicrocontrolledMicrocontrolled Posts: 2,461
    edited 2010-07-03 22:04
    @koze85: Thanks! I didn't realize that it was there, as I haven't been working a lot with text.
    @MagIO2: Because I only know how to program the Propeller. That is a pretty good reason for being fixed to it. smile.gif
    @blittled: This should work with the Chameleon board, although you may have to change some pin settings.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Check out my new website!!

    Use the Propeller icon!! Propeller.gif

    Follow me on Twitter! Search "Microcontrolled"
  • koze85koze85 Posts: 18
    edited 2010-07-05 08:26
    Hello microcontrolled it can be an awesome object for the obex , i think that you should release it!

    For the text handling it is much better· to do the following


    For the receiver
            "T":
              commands[noparse][[/noparse]0] := ser.rxtime(100)
              commands[noparse][[/noparse]1] := ser.rxtime(100)
              commands[noparse][[/noparse]2] := ser.rxtime(100)
              repeat i from 0 to commands[noparse][[/noparse]2]
                text[noparse][[/noparse]i] := ser.rxtime(100)
                if text[noparse][[/noparse]i] == 0  
    
                  quit
              if CheckForTimeout == 1
                text[noparse][[/noparse]commands[noparse][[/noparse]2]]:=$00
                gr.text(commands[noparse][[/noparse]0], commands[noparse][[/noparse]1], @text)
                ser.tx(ACK)
                ComClear
    

    and for the transmitter (graphicse object)
    PUB Text(x,y,str) | strs
      ''Prints text in str on the screen at x,y
      init
      strs := strsize(str)                                 
      repeat
        ser.tx("T")
        ser.tx(x)
        ser.tx(y)
        ser.tx(STRSIZE(str))
        ser.str(str)
        if GetAck == 1
          quit
    

    This lets the graphics engine exacltly where to terminate the string

    Why the baudrate is slightly·different from receiver to transmitter?
    To transmit quicker all that matters is the baudrate???
    ·
  • MicrocontrolledMicrocontrolled Posts: 2,461
    edited 2010-07-05 15:03
    The baud rate is slightly different? It must have been a typo, I thought that they both had the same baud rate! It's a wonder that it worked then......

    Thanks,
    Micro

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Check out my new website!!

    Use the Propeller icon!! Propeller.gif

    Follow me on Twitter! Search "Microcontrolled"
Sign In or Register to comment.