Shop Learn
P2 HDMI - Page 2 — Parallax Forums

P2 HDMI

2

Comments

  • No. We’re having trouble with the fact that Parallax doesn’t provide Mac versions of the tools they use for their example code.
  • AribaAriba Posts: 2,439
    David Betz wrote: »
    No. We’re having trouble with the fact that Parallax doesn’t provide Mac versions of the tools they use for their example code.

    And why can't you compile the example code with flexGUI / Fastspin?
  • Ariba wrote: »
    David Betz wrote: »
    No. We’re having trouble with the fact that Parallax doesn’t provide Mac versions of the tools they use for their example code.

    And why can't you compile the example code with flexGUI / Fastspin?
    Might be able to as long as there isn't a lot of inline assembly that might work differently between the two compilers. I'll give it a try.

  • Ariba wrote: »
    David Betz wrote: »
    No. We’re having trouble with the fact that Parallax doesn’t provide Mac versions of the tools they use for their example code.

    And why can't you compile the example code with flexGUI / Fastspin?
    I compiled HDMI_Spiral_Demo.spin2 with fastspin and loaded it but it doesn't display anything on the 7" LCD. Does it need to be modified to work on a 800x600 display?

  • AribaAriba Posts: 2,439
    There is a version: HDMI_Spiral_Demo_800x480.spin2 for the 7" display.

    Chips HDMI examples are normally pure PASM code. And Fastspin should handle inline assembly from PNUT without problems (but not vice versa).

    Andy
  • Ariba wrote: »
    There is a version: HDMI_Spiral_Demo_800x480.spin2 for the 7" display.

    Chips HDMI examples are normally pure PASM code. And Fastspin should handle inline assembly from PNUT without problems (but not vice versa).

    Andy
    I tried that as well and it also doesn't display anything. Maybe my 7" LCD is bad. Do any of the jumpers or switches on the P2 Rev C eval board need to be set in a particular way?

  • David Betz wrote: »
    Ariba wrote: »
    There is a version: HDMI_Spiral_Demo_800x480.spin2 for the 7" display.

    Chips HDMI examples are normally pure PASM code. And Fastspin should handle inline assembly from PNUT without problems (but not vice versa).

    Andy
    I tried that as well and it also doesn't display anything. Maybe my 7" LCD is bad. Do any of the jumpers or switches on the P2 Rev C eval board need to be set in a particular way?
    David Betz wrote: »
    Ariba wrote: »
    There is a version: HDMI_Spiral_Demo_800x480.spin2 for the 7" display.

    Chips HDMI examples are normally pure PASM code. And Fastspin should handle inline assembly from PNUT without problems (but not vice versa).

    Andy
    I tried that as well and it also doesn't display anything. Maybe my 7" LCD is bad. Do any of the jumpers or switches on the P2 Rev C eval board need to be set in a particular way?
    .
    I power the display with a separate phone-type 5v source (making sure to swap the wires RED/BLACK on the connector Parallax gives us). No special changes to the P2ES were required.

    I also got rogloh’s example running on the display (be sure to uncomment the DVI initialization and comment the original VGA init)
    dgately
  • And, I am on macOS also, so use flex GUI mostly with an occasional jump over to a VM Windows 10 for PNut & PropTool 2.
  • roglohrogloh Posts: 2,957
    edited 2020-08-17 04:44
    dgately wrote: »
    I also got rogloh’s example running on the display (be sure to uncomment the DVI initialization and comment the original VGA init)
    dgately
    Glad to hear the driver is working on that display. We should try to come up with special custom timing that allows native resolution of 800x480. Perhaps start out with the 252MHz 800x600 reduced blanking below and drop the visible lines to 480 and play with the vertical/horizontal timing until it syncs at a usable frame rate. With any luck something should be possible to achieve on that display. If we have any timing specs for the display it would help too.
    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    10 << 8  ' note needs to be 10 for DVI!
                long    0
                long    0   ' reserved for CFRQ parameter
    
    
  • pilot0315pilot0315 Posts: 662
    edited 2020-08-18 19:02
    Ariba wrote: »
    pilot0315 wrote: »
    ...
    Do you know where it is?
    Thanks

    Google will give you the answer in 0.24 seconds, after typing the filename into the search box...
    @cgracy
    I found the file and downloaded it. I get an error of pnut not finding the bmp file. I put it where it tells me but still does not find it. What am I missing?
    Thanks
    Martin

    1122 x 330 - 37K
    1064 x 429 - 90K
    990 x 594 - 35K
    996 x 454 - 27K
  • Make sure the filename matches what you have in your program.

    Since you downloaded the file, make sure it did not somehow get permission limits on it. If it will open in paint with a double click you are good.

    Make sure it is in the same directory as your program.

    Make sure you are running the version of Pnut you think you are. You could put a copy right in the directory with everything else and run it.

    Seems close now. You have some really silly thing, like an extra space, or path going wrong.

  • @pilot0315 I believe I asked about a year ago to uncheck "hide file extensions of known file types" but you only tried it once and encountered whatever issue, and immediately enabled it again.

    So you might have a file called:
    birds_16bpp.bmp.bmp

  • Bob Lawrence (VE1RLL)Bob Lawrence (VE1RLL) Posts: 1,718
    edited 2020-08-19 16:06
    @ Andy
    There is a version: HDMI_Spiral_Demo_800x480.spin2 for the 7" display.

    I'm not sure if this is the version Andy was referring to but it works :) It was in Pnut Ver V.

    This is what I used:

    *****************
    '* HDMI Spiral *
    '*****************

    CON hdmi_base = 48 'must be a multiple of 8

    _clkfreq = 250_000_000 'system clock frequency must be 250 MHz for HDMI

    fast = 1 '0 for small code (7.8 fps), 1 for fast code (36.6 fps)

    bitmap = $400 'HDMI bitmap (300 KB)

    DAT org

    asmclk

    coginit #1,##@pgm_hdmi 'launch HDMI
    coginit #0,##@pgm_bmap 'launch bitmap cog


    '*********************************
    '* HDMI 640 x 480 x 8bpp rgbi8 *
    '*********************************

    LCD_7_M.png

    2000 x 1500 - 6M
  • HDMI_640_x_480_16bPP.spin

    '************************************************************
    '* VGA 640 x 480 x 16bpp 5:6:5 RGB - HDMI *
    ' Works Han 22, 2020 - HDMI Port - 5 Birds Picture
    '***************************************************************

    CON hdmi_base = 48

    DAT org
    '
    '
    ' Setup
    '
    hubset ##%1_000001_0000011000_1111_10_00 'configure PLL, 20MHz/2*25*1 = 250MHz
    waitx ##20_000_000 / 200 'allow crystal and PLL 5ms to stabilize
    hubset ##%1_000001_0000011000_1111_10_11 'switch to PLL

    rdfast ##640*350*2/64,##$1000 'set rdfast to wrap on bitmap

    setxfrq ##$0CCCCCCC+1 'set transfer frequency to 1/10th clk, +1 for initial rollover

    setcmod #$100 'enable HDMI

    drvl #7<<6 + hdmi_base 'enable HDMI pins

    'wrpin ##%10110_1111_1110_10_00000_0,#7<<6 + hdmi_base '123-ohm DAC needs 1-step diff
    'wrpin ##%10110_0001_0000_10_00000_0,#7<<6 + hdmi_base '123-ohm DAC needs 1-step diff
    'wrpin ##%10100_1111_1100_10_00000_0,#7<<6 + hdmi_base '990-ohm DAC needs 3-step diff
    'wrpin ##%10100_0011_0000_10_00000_0,#7<<6 + hdmi_base '990-ohm DAC needs 3-step diff
    wrpin ##%001001_00_00000_0,#7<<6 + hdmi_base '1k-ohm drive

    P2_Birds.png
    2000 x 1500 - 5M
  • @pilot0315

    I received a I/O error the first time I tried it but it worked the second time I compiled and loaded it . I don't thing I changed anything.

  • whicker wrote: »
    @pilot0315 I believe I asked about a year ago to uncheck "hide file extensions of known file types" but you only tried it once and encountered whatever issue, and immediately enabled it again.

    So you might have a file called:
    birds_16bpp.bmp.bmp

    I changed the setting and get the same thins.
    Martin
    1297 x 624 - 87K
  • It shows the path as to where the file is. I can't see the complete path from your screen shot. The path for the Bird file has be the same as where the spin file is. Put in in you projects folder. Copy and paste it there if you have to.
  • Try using a path without spaces (the "PNUT V" folder has a space in it's name). Like, in general, never create files/folders with spaces or other weird characters.
  • Wuerfel_21 wrote: »
    Try using a path without spaces (the "PNUT V" folder has a space in it's name). Like, in general, never create files/folders with spaces or other weird characters.

    Changed the spacing not says pnut_v. Same error.
    I will probably delete the files and start again.
    1784 x 945 - 148K
  • Rename the file to birds_16bpp
  • Tried all that and still does not work.
    Should I delete all of it and start over?
    1307 x 773 - 50K
    1588 x 834 - 128K
  • It was correct for you to rename the file in the windows folder (you removed .bmp)

    But you added a step.

    HDMI_Test1c.spin2 should have been left alone. It still should be asking for the birds_16bpp.bmp file. The letters ".bmp" should still be present in PNut. Type those letters back in, in PNut only.
  • And if that still doesn't work, try moving the folder to a different location other than Desktop. Something might be trying to protect your desktop folder and preventing PNut from accessing files there.

    A location like C:\parallax\PNUT_V\PNut_34v\
  • Thanks I will try that and let you know.
  • Thanks I will try that and let you know.
  • whicker wrote: »
    And if that still doesn't work, try moving the folder to a different location other than Desktop. Something might be trying to protect your desktop folder and preventing PNut from accessing files there.

    A location like C:\parallax\PNUT_V\PNut_34v\

    I have tried everybody's suggestions to no avail. I will delete all and start again. Just in case I will try an earlier version of pnut and see what happens.
    Thanks to all
  • whicker wrote: »
    And if that still doesn't work, try moving the folder to a different location other than Desktop. Something might be trying to protect your desktop folder and preventing PNut from accessing files there.

    A location like C:\parallax\PNUT_V\PNut_34v\

    Tried that also and get the same errors can't read the file and error 103
    sometimes get an error that the file is too large
  • pilot0315 wrote: »
    Tried that also and get the same errors can't read the file and error 103
    sometimes get an error that the file is too large
    I noticed I get the error 103 when I have the image open in another app.

  • pilot0315pilot0315 Posts: 662
    edited 2020-11-10 23:18
    Glad that I am not the only one. Still can't get it to work
    @doggiedoc
  • whicker wrote: »
    @pilot0315 I believe I asked about a year ago to uncheck "hide file extensions of known file types" but you only tried it once and encountered whatever issue, and immediately enabled it again.

    So you might have a file called:
    birds_16bpp.bmp.bmp

    Been busy teaching. Sorry it has been a while. I checked that and it only had a single .bmp
Sign In or Register to comment.