Backpack Sync Delay when not connected to prop plug
bunkerush5
Posts: 10
I have modified the propbp_overlay_demo and now when I connect to my monitor I get a very long delay before the overlay comes up when not connected to the board through the prop plug. When programming the board and still connected to the prop plug the overlay comes right up on the screen. As soon as I remove the plug and reset power to the backpack the system takes on average 45 seconds to display the overlay. Has anyone else had this problem. Here is the code I am using
CON _clkmode = xtal1 + pll8x _xinfreq = 10_000_000 BUF_SIZE = 4096 TPT = 0 'Change this to 1 for video sources that do not work well with 'opaque overlays. TPTor0 = ((TPT == 0) | TPT) & _0 'Commands recognized by "out" method. CLS = $00 '( ) Clear the current window, and home cursor. HOME = $01 '( ) Move cursor to home position. CRSRXY = $02 '(col,row) Move cursor to col and row. CRSRLF = $03 '( ) Move cursor to the left. CRSRRT = $04 '( ) Move cursor to the right. CRSRUP = $05 '( ) Move cursor up. CRSRDN = $06 '( ) Move cursor down. SHODSP = $07 '(dispno) Show display number dispno. BKSP = $08 '( ) Erase prior character and move cursor left. TAB = $09 '( ) Move cursor right to next column divisible by 8. LF = $0A '( ) Linefeed. Scroll up if on bottom line. CLREOL = $0B '( ) Clear to the end of the current line. CLRDN = $0C '( ) Clear from cursor position to the end of the window. CR = $0D '( )Carriage return. Scroll up if necessary. CRSRX = $0E '(col) Move cursor to column col. CRSRY = $0F '(row) Move cursor to row. DEFWIN = $10 '(winno,cols,rows) Define a new window winno sized cols x rows. Make it the current window. USEWIN = $11 '(winno) Change the current window to winno. CHGCLR = $12 '(mask,transparent,fgnd,bkgd) Change current window color to mask, transparent, fgnd, and bkgd. SCROLL = $13 '(offset) Set X (one-line) or Y (multi-line) scroll offset (0 - 15) for current window. SMSCRL = $14 '(rate) Set smooth scrolling rate in current window to rate ms/scan line. WDWRAP = $15 '(yn) Set word wrapping for current window: on (yn<>0) or off (yn==0). BLINK = $16 '(yn) Set blinking for current window: on (yn<>0) or off (yn==0). CPYWIN = $17 '(winno) Copy the text from winno to current window. APNDSP = $18 '(disp,winno,x,y) Append window winno to display disp at location (x,y). MOVWIN = $19 '(slot,x,y) Move window in slot to (x,y). SHOWIN = $1A '(slot,yn) Show window in slot: yes (yn<>0) or no (yn==0). CHGWIN = $1B '(slot,winno) Change window in slot to winno. PRESET = $1C '(dispno,presetno) Create display dispno using preset presetno. SETTIM = $1D '(yr,mo,day,hr,min,sec) Set the current time. MARK = $1E '( )Return MARK to acknowledge reaching this point. ESC = $1F '(char) Escape next character char (i.e. print as-is). CLRWIN = $FF '( )Same as CLS where strings do not permit 0. NONE = $FF 'Same as 0 when used as an argument. ZERO = $FF 'Same as 0 when used as an argument. _0 = $FF 'Same as 0 when used as an argument. NO = $FF 'Same as 0 when used as an argument. YES = $01 'Canonical non-zero value used for binary choices. DBL = $80 'OR with height and width arguments to get double-sized characters. SHO = $40 'OR with window number to set visibility on. 'Preset names. BIGWIN = $01 '40 x 13 regular window. CREDITS = $02 'Vertically overscanned window with smooth scrolling. MARQUEE = $03 'Single row at bottom with smooth scrolling. HILO = $04 'Single rows top and bottom. HILO2 = $05 'Dual rows top and bottom. CROSS = $06 'Single cross-shaped cursor in middle of 40 x 13 screen. BOX = $07 'Single box-shaped cursor in middle of 40 x 13 screen. DOT = $08 'Single dot cursor in middle of 40 x 13 screen. ' Window type names. REGWIN = 0 'Regular window. HMS24 = 1 'Time window: 23:59:59 HMS12 = 2 'Time window: 12:59:59pm YMD = 3 'Date window: 2099-12-31 MDY = 4 'Date window: 12/31/2099 DMY = 5 'Date window: 31-12-2099 YMDHMS24 = 6 'Date/time window: 2099-12-31 23:59:59 MDYHMS12 = 7 'Date/time window: 12/31/2099 12:59:59pm DMYHMS12 = 8 'Date/time window: 31-12-2099 12:59:59pm cs = 2 'chip select pin clk = 0 'clock pin d0 = 1 'data pin 'software constants sampleRate = 30 'adc sample rate (samples/sec) OBJ pr : "prop_backpack_tv_overlay2" adc: "adc0831_fast" f:"float32" fstring:"floatstring" num: "Simple_numbers_plus" VAR byte buffer[BUF_SIZE] long adcOut, r PUB start | i pr.start(@buffer, BUF_SIZE) pr.str(string(DEFWIN, 10, 40,2,1, CHGCLR, $f,_0, 8|TPT, 1, APNDSP, 10, SHO|10, _0, 20, SHODSP, 10, WDWRAP, 1)) adc.start(cs,clk,d0,sampleRate,@adcOut) f.start repeat r:=f.fmul(2427.0,f.pow(f.ffloat(adcOut),-1.095)) pr.str(string(cr)) pr.str(num.dec(f.fround(r))) pr.str(string(" in")) pause(500) waitcnt(clkfreq/5+cnt) pr.out(CLS) PRI pace(delay, straddr) | ch repeat while ch := byte[straddr++] pr.out(ch) pause(delay) PRI pause(ms) waitcnt(cnt + clkfreq / 1000 * ms) PRI rep(char, reps) repeat reps pr.out(char)