'800x480 HDMI example that shows bird photo in WVGA resolution 'RJA figured out that HDMI pulls from LUT starting at index #32 (instead of #0 like VGA). '******************************************** '* VGA 800 x 480 x 8bpp LUT - HDMI * '******************************************** CON hdmi_base = 48'16 'must be a multiple of 8 _clkfreq=300_000_000 'needs a faster clock to avoid flicker on Parallax LCD DAT org ' ' ' Setup ' hubset ##%1_000001_0000011000_1111_10_00 'config PLL, 20MHz/2*25*1 = 250MHz waitx ##20_000_000 / 200 'allow crystal+PLL 5ms to stabilize hubset ##%1_000001_0000011000_1111_10_11 'switch to PLL 'Load LUT mov x,#32'0 Note: HDMI starts at index #32 instead of #0 !!!!!!!!!!!!!!!!!!!!!!!! rdfast #0,##($1000-$400) 'load .bmp palette into lut rep @.end,#$100 rflong y shl y,#8 wrlut y,x add x,#1 .end setxfrq ##$0CCCCCCC+1 'set streamer freq to 1/10th clk setcmod #$100 'enable HDMI mode drvl #7<<6 + hdmi_base 'enable HDMI pins wrpin ##%100100_00_00000_0,#7<<6 + hdmi_base 'set 1mA drive on HDMI pins ' ' Field loop ' field 'RJA adding rdfast here rdfast ##800*480,##$1000 'set rdfast to wrap on bitmap mov hsync0,sync_000 'vsync off mov hsync1,sync_001 callpa #33,#blank 'top blanks mov x,##480 'set visible lines line call #hsync 'do horizontal sync xcont m_rf,#1 'do visible line djnz x,#line 'another line? callpa #10,#blank 'bottom blanks mov hsync0,sync_222 'vsync on mov hsync1,sync_223 callpa #2,#blank 'vertical sync blanks jmp #field 'loop ' ' ' Subroutines ' blank call #hsync 'blank lines xcont m_vi,hsync0 _ret_ djnz pa,#blank hsync xcont m_bs,hsync0 'horizontal sync xzero m_sn,hsync1 _ret_ xcont m_bv,hsync0 ' ' ' Initialized data ' sync_000 long %1101010100_1101010100_1101010100_10 ' sync_001 long %1101010100_1101010100_0010101011_10 ' hsync sync_222 long %0101010100_0101010100_0101010100_10 'vsync sync_223 long %0101010100_0101010100_1010101011_10 'vsync + hsync m_bs long $70810000 + hdmi_base<<17 + 16 'before sync m_sn long $70810000 + hdmi_base<<17 + 96 'sync m_bv long $70810000 + hdmi_base<<17 + 48 'before visible m_vi long $70810000 + hdmi_base<<17 + 800 'visible m_rf long $70880000 + hdmi_base<<17 + 800 'visible rfbyte 8bpp LUT->DAC ' ' x long 0 y long 0 ' Uninitialized data ' hsync0 res 1 hsync1 res 1 ' ' ' Bitmap ' orgh $1000 - $436 'justify pixels at $1000, pallete at $1000-$400 file "bitmapW.bmp"