Any ideas for P2 demos?

123457

Comments

  • roglohrogloh Posts: 2,806
    edited 2020-04-26 - 16:00:43
    KMyers wrote: »
    Not to hijack this thread but on the video discussion. What would be a good LCD for the P2 eval b board. Something in 3.5 to 5 inch display. Software also.

    Thanks in advance.

    If you are keen to get going right now HDMI based panels may be your easiest option to try out assuming the selected panel's resolution and timing suits DVI signalling and pixel clocks in the 25-30MHz range (250-300MHz P2 freq).

    There's also those cheap small panels that are commonly used for Arduino & RasPi's but many use serial SPI and these won't be compatible with my parallel oriented driver at this time. They do have low pin count and could be easy to interface to the P2-EVAL, assuming you already have or develop some other software to drive it.

    When I get finally done with the whole HyperRAM thing I still want to and still plan to get LCD sync added to my video driver. This should be useful for interfacing parallel LCDs with DE/CLK to the P2. It's not a lot of code and I already should have a 7 inch 800x480 LCD panel I can use for testing it out.
  • Btw some time ago here I posted how to do 24 bit color with 8 pins...
  • rogloh wrote: »
    When I get finally done with the whole HyperRAM thing I still want to and still plan to get LCD sync added to my video driver. This should be useful for interfacing parallel LCDs with DE/CLK to with the P2. It's not a lot of code and I already should have a 7 inch 800x480 LCD panel I can use for testing it out.
    Be aware that those raw interfaces require a continuous clock while powered. So if the prop2 is generating the LCD clock then it should also switch power to the LCD when starting the clock.

  • My suggestion was not intended to start a discussion on the merits of various video connection methods, but instead as an example of the potential dynamism of the P2 for developers.

    Say you are developing a product for a customer and they see your prototype and wish to make ‘a small change’, like changing from a collection of buttons to a USB connected keyboard. On many other platforms that could be a huge amount of rework, potentially even changing to a new member of the family of processors. For the P2 it might be possible to demonstrate the change before the customer has left your facility.

    I had originally mentioned vídeo standards because Roger has made such great progress with an easily reconfigured driver supporting many different connection types. A suitably abstracted user input driver could provide the same benefits for switching between serial, USB, or discrete input controls, as another example.
  • Aren't the various ways of outputting video far more closely related than different input methods? What you have to do to scan a matrix keypad is totally different from what you need to do to talk to a USB device; on the other hand, every standard video interface, from NTSC to HDMI, is very similar, in that they all consist of building lines and then using the streamer to output pixels top-to-bottom and left-to-right. A universal input driver would make far less sense than a universal video driver.
  • AJL wrote: »
    My suggestion was not intended to start a discussion on the merits of various video connection methods, but instead as an example of the potential dynamism of the P2 for developers.

    Say you are developing a product for a customer and they see your prototype and wish to make ‘a small change’, like changing from a collection of buttons to a USB connected keyboard. On many other platforms that could be a huge amount of rework, potentially even changing to a new member of the family of processors. For the P2 it might be possible to demonstrate the change before the customer has left your facility.

    I had originally mentioned vídeo standards because Roger has made such great progress with an easily reconfigured driver supporting many different connection types. A suitably abstracted user input driver could provide the same benefits for switching between serial, USB, or discrete input controls, as another example.

    Yes, this type of thing would be very good. I am actually experimenting at this input layer right now, and it would be handy to take multiple inputs from different COG sources/drivers to control a mouse cursor or keyboard input for example. It's all doable, mainly just further software middleware design to abstract things. Unfortunately I just don't want to get bogged down doing it myself at the moment as I have lots of other things to do...

    One thing I have found with all this is that designing driver code that can be controlled from well defined memory input/output structures can be a simple way to interact with code from different languages. Some wrappers can be developed in different languages on top of that if required. Ideally it's just the core functionality that needs to be exposed in these structures not every single thing. I found this when I could easily get my driver running under MicroPython this way with very little effort. However once you need to sequence things in some well controlled order this can break down, and an API can be required to control/enforce things to a finer degree. Ideally you can build something where you do all config and startup once when the COG is spawned, then let other COGs access and control the key data items via the shared memory structures. This model can break when things get more complex though and obviously won't work for all applications. The key is to probably expose only independent control parameters and keep everything as simple as you can which is always a good goal regardless.
  • roglohrogloh Posts: 2,806
    edited 2020-04-26 - 04:16:58
    Aren't the various ways of outputting video far more closely related than different input methods? What you have to do to scan a matrix keypad is totally different from what you need to do to talk to a USB device; on the other hand, every standard video interface, from NTSC to HDMI, is very similar, in that they all consist of building lines and then using the streamer to output pixels top-to-bottom and left-to-right. A universal input driver would make far less sense than a universal video driver.

    It would be difficult to fit all these different input types in the same COG yes. You could possibly have a suite of these input drivers that are abstracted by another outer one (ie. they share the same control interface to the caller). Whether or not it burns extra COGs to do this is another thing however. Ideally it would not, but perhaps that COG could be made do a bunch of useful things beyond translating input driver types. It's sort of an I/O COG. Maybe it could also do i2c polling, SPI transfers etc, or other background things as well, making it more worthwhile as an independent COG.
  • A recompile with the alternate selection wouldn't be unexpected.
  • Thanks Guys for info on the LCD displays. Does look like HDMI panels the easiest one but I have used SPI for the ESP things so somewhat familiar with that. Still pondering and looking.
  • I found the thread where I posted design files for using two octal d-flip-flops as a fifo to get 24-bit color with 8-pins:
    https://forums.parallax.com/discussion/169490/breakouts-for-p2-eval/p1

    I would have thought I would have posted a photo of it working, but I can't find it...
  • jmgjmg Posts: 14,540
    edited 2020-04-26 - 22:28:50
    Cluso99 wrote: »
    Thanks Roy.
    I thought the cheapie HDMI to VGA boxes and cables were just passive, but looking a little closer it seems they use an NXP chip....

    I think there are both.

    Aliexpress has 'pure cables' listed for under $1US, like
    1m/1.5m/1.8m HDMI Cable HDMI To VGA 1080P HD With Audio Adapter Cable HDMI TO VGA Cable 24K Gold-plated Connector Cable
    "NOTE:This HDMI line has no decoding function, so you need to purchase the decoder yourself, otherwise this line can't work properly."

    Those would allow a P2 HDMI connector to Physically plug into VGA, but does not support Audio on this pathway.
    (P2 code needs to deliver VGA to the appropriate pins, the cable is purely wiring)

    The active ones seem to have 'better ones' that include Audio 3.5mm support.
    Some 'cables' (no apparent boxes) include a stub USB lead by the HDMI for power. I guess that makes them active, tho specs are sparse.

    Audio seems to be a sticking point here ?

    Still showing are cables that do HDMI to 5-RCA and 3-RCA, but those are fading. These are also wiring only, so need the P2 host to do component video+stereo audio out.

  • jmgjmg Posts: 14,540
    edited 2020-04-26 - 22:23:57
    David Betz wrote: »
    Wuerfel_21 wrote: »
    JT Cook wrote: »
    David,
    The only concern about having the display attached to the unit in whole is usability and visibility. Everyone's workstation is different and having it all attached may make it hard from some people to use. I was thinking more pairing with a small generic display since it makes it easier to source and you aren't tied to a single display/manufacture. Also you can make the kit cheaper if the screen is optional since not everyone will need it.

    I think it'd be hard to beat the price of sourcing some cheap monitors vs a built-in LCD. Also, IIRC from my (admittedly limited) research a while ago, a lot of generic LCD modules don't expose the controller pins necessary for a parallel RGB+sync interface, which is what the P2 streamer is good at.
    It certainly wouldn't be good if the built-in LCD display cost more than a separately sourced LCD monitor. I withdraw my suggestion! :smile:

    Another issue of a 'built-in LCD' design is longevity. (as well as 'what size do you choose' ? )
    The separate monitors avoid that supply-line issue, and also lowers the size and base price of the P2 side.

    There seems still a healthy (even growing) supply of 'any-video-source' smaller monitors, tho the prices are not super-cheap, they are more commercial/industrial than plastic consumer items.

    A quick look at Aliexpress finds
    Eyoyo 5 inch Mini HDMI Monitor 800x480 Car Rear View TFT LCD Screen Display With BNC/VGA/AV/HDMI Output Built-in Speaker (USD $47)
    &
    ZHIXIANDA 7" 1024x600 TFT LCD Monitor With HDMI VGA AV BNC Input for Car CCTV DVR Microscope desktop monitor (USD 32)

    These ZHIXIANDA ones even include an open frame variant.
    ZHIXIANDA 8 inch 4:3 1024*768 open frame industrial monitor display with HDMI VGA / D-Sub BNC AV USB input US $55.86
    and can go up to higher resolutions
    ZHIXIANDA 11.6 inch 1920*1080 Portable HDMI Monitor TFT LCD Screen with Mini HD Color Display with Built-in Speaker (VGA+HDMI+USB+AV+BNC ) US $69.91

    expanding to include touch, also found is
    Mini 7" monitor VGA HDMI LCD Touch Screen interface Display Capacitive Module for CCTV car PC Raspberry Pi US $55.91
    7" 1024*600 LCD Monitor with capacitive touchscreen
    but seems to have no connectors for the Touch side in the photos ? Are the images wrong, or does this really do touch-over-hdmi ? (or do they use VGA i2c pins ?)

    and
    10.1 Inch IPS HDMI Capacitive Touch Screen 1280x800 LED Monitor for PS3 4 Windows 7 8 10 VGA/AV USB Computer LED PC Car Display US $84.17
    Looks to have identical connector array as ZHIXIANDA, so has (VGA+HDMI+USB+AV+BNC ), but is also vague on touch connection - do we guess via USB ? This one also mentions USB drive support.

  • jmg,
    There is no way a cable without any active components is going to convert HDMI signalling to be VGA compatible. You must know that.
  • jmgjmg Posts: 14,540
    Roy Eltham wrote: »
    jmg,
    There is no way a cable without any active components is going to convert HDMI signalling to be VGA compatible. You must know that.

    Yes, I thought I was clear enough there, but I've edited my post to hopefully make it even clearer.
  • jmg wrote: »

    Aliexpress has 'pure cables' listed for under $1US, like
    1m/1.5m/1.8m HDMI Cable HDMI To VGA 1080P HD With Audio Adapter Cable HDMI TO VGA Cable 24K Gold-plated Connector Cable
    "NOTE:This HDMI line has no decoding function, so you need to purchase the decoder yourself, otherwise this line can't work properly."

    Those would allow a P2 HDMI connector to plug into VGA, but does not support Audio on this pathway.

    If by some random fluke all the RGB signals broken out happened to fall on any of pins 1,2,3 or 5,6,7 of an 8 pin group these passive cables could actually be rather useful to build something with the P2 that can output VGA or HDMI from the same connector, otherwise either some cable/connector rewiring or a custom bit banging driver that doesn't make full use the streamer would probably be the only way to use them for VGA. Perhaps mono VGA may in theory be an option using SoG on any P2 pin...?

    I know Tubular was also interested in some of the component breakout ones a while ago. I have a feeling each HDMI diff pair was used for each RGB channel which is not what we want but I can't recall the mapping.
  • jmgjmg Posts: 14,540
    edited 2020-04-27 - 00:33:06
    rogloh wrote: »
    If by some random fluke all the RGB signals broken out happened to fall on any of pins 1,2,3 or 5,6,7 of an 8 pin group these passive cables could actually be rather useful to build something with the P2 that can output VGA or HDMI from the same connector, otherwise either some cable/connector rewiring or a custom bit banging driver that doesn't make full use the streamer would probably be the only way to use them for VGA. Perhaps mono VGA may in theory be an option using SoG on any P2 pin...?
    Yes, I was wondering if the P2 pin constraints on VGA and HDMI, would make such a cable improbable to support both :(

    I also wondered about VGA[HD15] supporting touch+audio, as the SCL.SDA lines should allow i2c touch, and there are 2 nominally reserved pins (Pin 4 ID2/RES Pin 11 ID0/RES)
    - but no one seems to have fully used VGA that way ? (A quick check of a VGA cable here, finds p4,p11 are commoned to all the ground pins, so that is a classic 'saves copper' design & rather torpedoes that idea )

    Addit: I find some VGA cables claiming to be 'all-pass', and can find cable that says 3*Coax + 8*conductor, so it looks like there are all-connected VGA cables ?
    Addit 2: Looks like VGA 3+9 is the 'top line' which has 2 GND wires (aside from RGB braids) and a number appear with 'clean/elegant' backshells like this
    HLB1YuC9RgHqK1RjSZFkq6x.WFXaR.jpg_300x300.jpg
  • Pumping analogue signals through a HDMI connector is pretty much an irrelevant topic. You still need an analogue input to the TV/monitor to make that work.
  • jmgjmg Posts: 14,540
    evanh wrote: »
    Pumping analogue signals through a HDMI connector is pretty much an irrelevant topic. You still need an analogue input to the TV/monitor to make that work.
    Yes, the idea was to try to make things more flexible, and yet keep a compact PCB.
    Nothing is ideal - HDMI pushes the P2 clock, and lacks Touch, whilst VGA lacks 'standard' Audio, but might allow touch via i2c pins.
  • You're way in another world there JMG.
  • Higher resolution HDMI/DVI could still be done with external parallel input encoder devices, but it burns lots of P2 pins. Once I add LCD support to my driver I hope it should be possible to also share that parallel mode for those external encoder applications as well. We will of course need a pixel clock output though, so the P2 may need to be running at twice the pixel clock to generate one without further PLLs etc unless the encoder chip uses a DDR clock (I think some can).

    The other option already mentioned are those active VGA to HDMI converters, which if they are any good at sampling high VGA resolutions could become very useful to transform 1080p from the P2's VGA into HDMI. I only have the reverse type here myself so don't yet know how well those work.
  • RaymanRayman Posts: 11,494
    edited 2020-04-27 - 00:23:49
    One I have is great and does audio too

    Active vga-> hdmi
  • evanhevanh Posts: 10,088
    edited 2020-04-27 - 00:31:57
    I think I'd personally be happy at low res modes, whatever can be pushed out prop2's TDMS encoder. Hopefully there is a quarter FHD or something similar that suits 16:9 aspect.

    EDIT: Amusingly, an old mono 720x400 is a close fit for 16:9.

  • jmgjmg Posts: 14,540
    rogloh wrote: »
    When I get finally done with the whole HyperRAM thing I still want to and still plan to get LCD sync added to my video driver. This should be useful for interfacing parallel LCDs with DE/CLK to the P2. It's not a lot of code and I already should have a 7 inch 800x480 LCD panel I can use for testing it out.
    Where did you get to with Audio via HDMI on P2 ?
  • jmg wrote: »
    evanh wrote: »
    Pumping analogue signals through a HDMI connector is pretty much an irrelevant topic. You still need an analogue input to the TV/monitor to make that work.
    Yes, the idea was to try to make things more flexible, and yet keep a compact PCB.
    Nothing is ideal - HDMI pushes the P2 clock, and lacks Touch, whilst VGA lacks 'standard' Audio, but might allow touch via i2c pins.

    Yep this is exactly right the micro HDMI let you bring out 8~13 signals that can in turn do anything you like. As I mentioned in another thread Jaycar sell the matching breakout plugs, which for some reason are hard to get on digikey/mouser

    As Rogloh said I started gathering up the various passive cables that let you break out easily and cheaply. I talked to vendors at the local computer swap meet, explaining that I deliberately wanted the passive rather than active cables. They tend not to carry them any more, because they got many people returning them saying that they didn't work. Hardly surprising, but makes those cables harder to get now
  • jmg wrote: »
    Where did you get to with Audio via HDMI on P2 ?

    Audible test tone heard on a PC monitor Tubular had. But still only clicks on my plasma TV which is probably stricter coming from the consumer electronic world instead of the PC world. Something still wasn't quite right somewhere. On hold for now. It is likely feasible if all the information is known and IP issues are sorted.
  • jmgjmg Posts: 14,540
    edited 2020-04-27 - 03:07:51
    rogloh wrote: »
    jmg wrote: »
    Where did you get to with Audio via HDMI on P2 ?

    Audible test tone heard on a PC monitor Tubular had. But still only clicks on my plasma TV which is probably stricter coming from the consumer electronic world instead of the PC world. Something still wasn't quite right somewhere. On hold for now. It is likely feasible if all the information is known and IP issues are sorted.

    Thanks. Most smallish monitors seem to use a new narrow PCB module that has VGA and HDMI, and Line in and Headphones out. I wonder what their HDMI would make of your P2-HDMI Audio ?

    found on Aliexpress ( modules appear identical, but the specs differ - maybe the main controller varies in the same package ? )
    Yqwsyxl Kit for LTM230HT10 1920*1080 TV+HDMI+VGA+AV+USB LCD LED screen Controller Driver Board US $20.66
    Tv+Hdmi+Vga+Av+Usb+Audio Tv Lcd Driver Board 15.4 Inch Lp154W01 B154Ew08 B154Ew01 Lp154Wx4 1280X800 Lcd Controller Board Diy Kit US $12.61
  • evanh wrote: »
    I think I'd personally be happy at low res modes, whatever can be pushed out prop2's TDMS encoder. Hopefully there is a quarter FHD or something similar that suits 16:9 aspect.

    EDIT: Amusingly, an old mono 720x400 is a close fit for 16:9.

    Well DVI over HDMI is already available if you want to experiment with the timing in my driver which is all fully customizable. I was able to achieve 800x600 at reduced blanking / 50Hz refresh with this setting below but didn't play with 16:9 modes except via VGA. It's going to be monitor / panel dependent as to what it actually accepts in the end. You could of course try to push up the TMDS output higher too, with the P2 at 300MHz+. I think I recall Chip had 720p going at very low refresh. Maybe a monitor would upscale 960x540 if you tried it. The dot clock is the limiting factor, 35MHz might be achievable perhaps?
    svga_dvi_timing   ' massively reduced blanking for 800x600 50Hz at 25.2MHz clk YMMV
                long   CLK252MHz
                long   252000000
                       '_HSyncPolarity___FrontPorch__SyncWidth___BackPorch__Columns
                       '     1 bit         7 bits      8 bits      8 bits    8 bits
                long   (SYNC_POS<<31) | (  8<<24) | (  8<<16) | (  8<<8 ) | (800/8)
                       
                       '_VSyncPolarity___FrontPorch__SyncWidth___BackPorch__Visible
                       '     1 bit         8 bits      3 bits      9 bits   11 bits
                long   (SYNC_POS<<31) | (  2<<23) | (  2<<20) | ( 11<<11) | 600
                long    8 << 8
                long    0
                long    0   ' reserved for CFRQ parameter
    
  • goes hunting ... https://forums.parallax.com/discussion/170676/p2-dvi-vga-driver

    Huh, I've got it stashed all ready, not sure I've used it yet though ...

  • rogloh wrote: »
    jmg wrote: »

    Aliexpress has 'pure cables' listed for under $1US, like
    1m/1.5m/1.8m HDMI Cable HDMI To VGA 1080P HD With Audio Adapter Cable HDMI TO VGA Cable 24K Gold-plated Connector Cable
    "NOTE:This HDMI line has no decoding function, so you need to purchase the decoder yourself, otherwise this line can't work properly."

    Those would allow a P2 HDMI connector to plug into VGA, but does not support Audio on this pathway.

    If by some random fluke all the RGB signals broken out happened to fall on any of pins 1,2,3 or 5,6,7 of an 8 pin group these passive cables could actually be rather useful to build something with the P2 that can output VGA or HDMI from the same connector, otherwise either some cable/connector rewiring or a custom bit banging driver that doesn't make full use the streamer would probably be the only way to use them for VGA. Perhaps mono VGA may in theory be an option using SoG on any P2 pin...?

    I know Tubular was also interested in some of the component breakout ones a while ago. I have a feeling each HDMI diff pair was used for each RGB channel which is not what we want but I can't recall the mapping.

    Yes, That is what I'm looking to do if it's possible :)
    I'll check those passive cables out on fleabay and order one.
  • Capt. QuirkCapt. Quirk Posts: 831
    edited 2020-04-28 - 23:58:30
    KMyers wrote: »
    Not to hijack this thread but on the video discussion. What would be a good LCD for the P2 eval b board.
    Something in 3.5 to 5 inch display. Software also.
    I think what needs to be sold is flexibility, not talent at performing a certain task:

    "The P2 can do this." "Yes, but a RasPi can do it better and cheaper."
    "The P2 can do that." "Yes, but a DSP chip can do it better and cheaper."
    "The P2 can do another thing." "Yes, but a you-name-it chip can do it better and cheaper."

    The P2's selling point has to be that it can do this, that, and the other thing, simultaneously, in separate processors. It's all
    about functional integration, not narrow ability in one realm or another, where it will always be beaten.

    -Phil
    The big thing would be to use the P2 as the computer where you can program on it.
    JonnyMac wrote: »
    Why? For $15 more than the current price of a P2 chip you can have a Raspberry Pi. IMO, the better use of the Propeller
    is as a specialized co-processor for the RPi or similar computers.

    In this discussion about what the P1 & P2 is capable of, and displays.
    My interpretation of JonnyMac's comment is to pair the Propeller with
    something else that will complement the Propeller.

    My suggestion is for Parallax to provide code to allow the Propeller
    to easily integrate with Android.

    I have a stack of old Android tablets and phones.

    At the very least, a P2 module for wifi, bluetooth, and Android Open
    accessory (usb connection) with Android software support might be
    a step in the right direction.


    Bill M.
Sign In or Register to comment.