Fix for VGA displays running GCC in external memory
Dr_Acula
Posts: 5,484
There is a timing problem when using VGA display code ported to GCC. The problem only comes up when running GCC from external ram, eg serial spi ram chips.
The discussion that led to this is on this thread http://forums.parallax.com/showthread.php/152730-spin2cpp-version-1.05
The problem is that the display takes several minutes to start, and this give the initial impression that the code is not running.
The fix is to increase a timing delay. For example, in the VGA 80x40 object in the obex there is this code in the startup method
The last line needs the $10000 value increased. $20000 does not work. $40000 works, and to be safe, suggest change to $80000
This will then work if the spin code is run through a spin to C converter such as spin2cpp. It does not appear to introduce any unwanted delay when running Spin code.
The discussion that led to this is on this thread http://forums.parallax.com/showthread.php/152730-spin2cpp-version-1.05
The problem is that the display takes several minutes to start, and this give the initial impression that the code is not running.
The fix is to increase a timing delay. For example, in the VGA 80x40 object in the obex there is this code in the startup method
'implant pin settings reg_vcfg := $200000FF + (BasePin & %111000) << 6 i := $FF << (BasePin & %011000) j := BasePin & %100000 == 0 reg_dira := i & j reg_dirb := i & !j 'implant CNT value to sync COGs to sync_cnt := cnt + $10000
The last line needs the $10000 value increased. $20000 does not work. $40000 works, and to be safe, suggest change to $80000
This will then work if the spin code is run through a spin to C converter such as spin2cpp. It does not appear to introduce any unwanted delay when running Spin code.
Comments