Download Latest Version pnglib.c.zip (4.9 MB)
Email in envelope

Get an email when there's a new version of pnglib

Name Modified Size InfoDownloads / Week
Parent folder
vc_exe.bat 2019-05-08 138 Bytes
hd66789.h 2019-05-08 5.7 kB
vc_dll.bat 2019-05-08 185 Bytes
hd66789.c 2019-05-08 19.0 kB
hd66789.dll 2019-05-08 5.6 kB
emulat51.c 2019-05-08 20.3 kB
emulat51.exe 2019-05-08 4.6 kB
bc_dll.bat 2019-05-08 231 Bytes
bc_exe.bat 2019-05-08 260 Bytes
AGSI.h 2019-05-08 10.5 kB
bc.def 2019-05-08 65 Bytes
Totals: 11 Items   66.5 kB 0
  This is used by keil 51's uVision2 2.40A
This project is copy from [uv2\C51\EXAMPLES\FarMemory\16MB RAM on ADuC812].

1)before building:
  uVision can use agsi(Advance Generic Simulator Interface) to simulate LCD.
i make one to simulate HD66789 LCD(Liquid Crystal Display), which is 176 * 220 * RGB565.
You can copy the "sample.uv2\agsi\hd66789.dll" to "uv2\C51\bin\hd66789.dll"

2)usage:
  uv2.exe ADUC812.Uv2

  After modify th path of png file,
in ld_file.c\void main (void){
    main2("D:\\program\\pnglib.c\\pnglib.PNG",12,0);//ok
//  main2("D:\\program\\pnglib.c\\01.PNG",47, 0);//ok
//  main2("D:\\program\\pnglib.c\\04.PNG", 0, 0);//ok
//  main2("D:\\program\\pnglib.c\\08.PNG",44,20);//ok
//  main2("D:\\program\\pnglib.c\\24.png",54, 0);//ok
//  main2("D:\\program\\pnglib.c\\32.png", 0, 0);//ok
}
  We can build sample51.bin by uVision now.
And we can debug it(set break point, watch variables..)now.



----------------------------------------------------------------------
The below tells how to make bin by hand, show png without IDE.
We needn't do that.
----------------------------------------------------------------------
3)how to build sample51.bin:
3.1)modify the path of keil c.
  In my computer, it is in F:\program.2\uv2\C51
so i write this path in set_path.bat
But it is maybe not your vc path.
You can modify them in set_path.bat and make.bat

3.2)make sample51.bin:
NOTE:before we run make.bat lots of times, we must run set_path.bat 1st.

  make.bat will make sample51.bin, after compile ld_file.c and pnglib.c.
Because the later(pnglib.c) #include over 20 files which are in [source] folder.
That's quick and dirty technique by Leisure bamboo.



4)how to show png without IDE:
  d:\program\pnglib.c\sample.uv2\agsi\emulat51.exe /c51="f:\program.2\uv2\c51" /bin="d:\program\pnglib.c\sample.uv2\sample51.bin" /png="D:\program\pnglib.c\pnglib.PNG" /x=12  /y=0

  Of course, we may modify the c51 path,name of sample51.bin,name of png file,
and the x&y of png in HD66789's window.

4.1)The emulat51.exe is rely on c51\bin\s8051.dll,
c51\bin\dp51.dll, c51\bin\mon51.dll,
so we must write c51 path in command line.

4.2)s8051.dll want to load the bin which he can debug,
so we must write name of sample51.bin and its path in command line.

4.3)sample51.bin want to load the png which will be show,
so we must write name of png and its path in command line.

4.4)HD66789=176*220. If our png>176*220, the dll just show a part of png.
But we can define x&y of the part.



5)how to build emulat51.exe, or hd66789.dll:

  For vc user: after ..\sample.vc6\set_path.bat, and cd .\agsi
vc_exe.bat will make emulat51.exe, vc_dll.bat will make hd66789.dll
See about ..\sample.vc6\readme.txt\2.1)modify the path of visual c.

  For bc user: after modify bc's path,
bc_exe.bat will make emulat51.exe, bc_dll.bat will make hd66789.dll
See about ..\sample.bc4\readme.txt\2.1)modify the path of borland c.

Source: readme.txt, updated 2019-05-09