DPC Module:DPC under Windows

From LEXWiKi

(Difference between revisions)
Jump to: navigation, search
(The Sample code source you can download form)
Current revision (18:28, 26 March 2024) (edit) (undo)
(The Sample code source you can download form)
 
(77 intermediate revisions not shown.)
Line 1: Line 1:
[[Category:AllowPages]]
[[Category:AllowPages]]
== The Sample code source you can download form ==
== The Sample code source you can download form ==
-
Source file:<br />
 
-
[ftp://ftp.lex.com.tw/Engineer/SoftSupport/AP_Module/DPC_release/Windows_base/DPC_v3.0w_Src(x86).zip DPC_v3.0w_Src(32bit).zip]<br />
 
-
[ftp://ftp.lex.com.tw/Engineer/SoftSupport/AP_Module/DPC_release/Windows_base/DPC_v3.0w_Src(x64).zip DPC_v3.0w_Src(64bit).zip]<br />
 
-
Binary file:<br />
+
(*)Windows must updated Redistributable latest supported [https://download.microsoft.com/download/1/6/5/165255E7-1014-4D0A-B094-B6A430A6BFFC/vcredist_x64.exe For X64]
-
[ftp://ftp.lex.com.tw/Engineer/SoftSupport/AP_Module/DPC_release/Windows_base/DPC_v3.0w_Bin(x86).zip DPC_v3.0w_Bin(32bit).zip]<br />
+
-
[ftp://ftp.lex.com.tw/Engineer/SoftSupport/AP_Module/DPC_release/Windows_base/DPC_v3.0w_Bin(x64).zip DPC_v3.0w_Bin(64bit).zip]<br />
+
-
== How to use the DEMO application ==
 
-
When the DPC utility starts, it will hide in the notification area (like below picture),<br />
+
DPC
-
and double click the tray icon (shown as the red square below), 'DPC v3.0w.exe', it will show.
+
 
 +
<Google Drive>
 +
Binary file:
 +
<!--[https://drive.google.com/file/d/11ltW5GRW7wUNxC-sNm1wj6e42Trf8sHw/view?usp=sharing DPC_v4.4.3W_Bin_x86]-->
 +
[https://drive.google.com/file/d/1Vf7VcI_wqrCiUK_YKoiwdn-M_swNlsCS/view?usp=drive_link DPC_v4.4.6.10W_Bin_x64]
 +
 
 +
<FTP>
 +
Binary file:
 +
<!--[ftp://ftp.lex.com.tw/Engineer/SoftSupport/AP_Module/DPC_release/Windows_base/DPC_v4.4.3W_bin_x86.zip DPC_v4.4.3W_Bin_x86]-->
 +
[ftp://ftp.lex.com.tw/Engineer/SoftSupport/AP_Module/DPC_release/Windows_base/DPC_v4.4.6.10W_bin_x64 DPC_v4.4.6.10W_Bin_x64]
 +
 
 +
 
 +
DPC LightSensor
 +
 
 +
<Google Drive>
 +
Binary file:
 +
[https://drive.google.com/file/d/1lRwCw5qlHItqFJlj7SagvP8aJssKUUWf/view?usp=sharing DPC_LightSensor_v4.4.3W_Bin_x86]
 +
[https://drive.google.com/file/d/1Kh5SNp-U2x1RE3-UbS29cilR2xfv2lMb/view?usp=sharing DPC_LightSensor_v4.4.3W_Bin_x64]
 +
 
 +
<FTP>
 +
Binary file:
 +
[ftp://ftp.lex.com.tw/Engineer/SoftSupport/AP_Module/DPC_release/Windows_base/DPC_LightSensor_v4.4.3W_bin_x86.zip DPC_LightSensor_v4.4.3W_Bin_x86]
 +
[ftp://ftp.lex.com.tw/Engineer/SoftSupport/AP_Module/DPC_release/Windows_base/DPC_LightSensor_v4.4.3W_bin_x64.zip DPC_LightSensor_v4.4.3W_Bin_x64]
 +
 
 +
 
 +
DPC Utility Dll
 +
 
 +
<Google Drive>
 +
Binary file:
 +
[https://drive.google.com/file/d/1ROsku64nTpeA0S7NRZ--htGGflIpas3X/view?usp=sharing DPCUtilityDll_v1.0.1.2_x86]
 +
[https://drive.google.com/file/d/1duRbgZ3ur1lfr7_lw35HKU9JGU90qfqQ/view?usp=sharing DPCUtilityDll_v1.0.1.2_x64]
 +
 
 +
<FTP>
 +
Binary file:
 +
[ftp://ftp.lex.com.tw/Engineer/SoftSupport/AP_Module/DPC_release/Windows_base/DPCUtilityDll_v1.0.1.2_x86.zip DPCUtilityDll_v1.0.1.2_x86]
 +
[ftp://ftp.lex.com.tw/Engineer/SoftSupport/AP_Module/DPC_release/Windows_base/DPCUtilityDll_v1.0.1.2_x64.zip DPCUtilityDll_v1.0.1.2_x64]
 +
 
 +
 
 +
User Guide:
 +
 
 +
<Google Drive> [https://drive.google.com/file/d/1re0cJQcxGfE-Ycq4P6wrExNv4IKrvGP-/view?usp=sharing DPCUtilityDll_Guide]
 +
 
 +
<FTP> [ftp://ftp.lex.com.tw/Engineer/SoftSupport/AP_Module/DPC_release/Windows_base/DPCUtilityDll_Guide.pdf DPCUtilityDll_Guide]
 +
 
 +
 
 +
Sample code:
 +
 
 +
<Google Drive> [https://drive.google.com/file/d/1PYxPqgnZKvGcx3ctZlwTJRzj_v2xK08l/view?usp=sharing DPCUtilityDll_v1.0.1.2_Sample]
 +
 
 +
<FTP> [ftp://ftp.lex.com.tw/Engineer/SoftSupport/AP_Module/DPC_release/Windows_base/DPCUtilityDll_v1.0.1.2_Sample.zip DPCUtilityDll_v1.0.1.2_Sample]
 +
 
 +
== How to use the DPC utility ==
 +
 
 +
[[Image:DPC_UI_001.jpg]]<br />
 +
 
 +
1. Set step add / subtract brightness level.
 +
 
 +
2. When click the "LightOff" button, the panel will become darkness.<br />
 +
(*)Hot key and touch position to light on panel must set first.
 +
 
 +
3. Brightness control scrollbar, you can adjust volume of brightness. Value from 1 to 100.
 +
 
 +
4. Show the brightness value which you adjust.
 +
 
 +
5. Advanced config settings.
 +
 
 +
(*)When DPC utility minimize, it will hide in the notification area (like below picture),<br />
 +
and double click the tray icon (shown as the red square below), 'DPC Utility', it will show.
[[Image:DPC_AP_1.jpg]]<br />
[[Image:DPC_AP_1.jpg]]<br />
 +
== How to set advanced settings of the DPC utility ==
 +
[[Image:DPC_UI_002.jpg]]<br />
 +
 +
6. General settings tab page.
 +
 +
7. About touch panel settings tab page.
 +
 +
8. About Hotkey panel settings tab page. User can set the hotkey. When push hot key, the panel will be light on from darkness.
 +
 +
9. About DPC software and hardware information.
 +
 +
10. Save the setting value but without leaving the window.
 +
 +
11. Restore the setting value to last saved.
 +
 +
12. Save the setting value and close the window.
 +
 +
=== General settings tab page ===
 +
[[Image:DPC_UI_003.jpg]]<br />
 +
 +
13. If user checked, utility will auto startup when system booting.
 +
 +
14. If checked to save DPC setting , the setting of utility will be saved in INI file.
 +
 +
=== Touch panel settings tab page ===
 +
[[Image:DPC_UI_004.jpg]]<br />
 +
 +
15. Frequency of panel. Only support in DPC onboard module.
 +
 +
16. Click the button. User can pick up the area from object 17. When clicking area, the panel will be light on from darkness.
 +
 +
[[Image:DPC_UI_005.jpg]]<br />
 +
 +
17. Pick up the area from panel. When clicking area, the panel will be light on from darkness.
 +
 +
=== Hotkey settings tab page ===
 +
[[Image:DPC_UI_006.jpg]]<br />
 +
 +
18. First key of hotkey. Only enter Ctrl, SHIFT, or ALT.
 +
19. Second key of hotkey. Only enter key: 'A' to 'Z'.
-
[[Image:DPC_AP1.png]]<br />
+
=== Information tab page ===
 +
[[Image:DPC_UI_007.jpg]]<br />
-
1. Frequency of panel selection
+
20. Show the DPC utility version.
-
2. Confirm the panel which selected
+
21. Show the MCU version.
-
3. If you choose to save DPC setting , the setting of frequency and duty cycle will be reserved.
+
22. Show the DPC utility company.
-
4. It will show the MCU version of DPC.
+
23. Show the DPC utility copyright.
-
5. Brightness control , you can choose : 10,20,30,40,50,60,70,80,90,100.
+
24. Show the base board model name.
-
6. Show the brightness data which you choose.
+
25. Show utility supported backlight type.
-
7. When click the LightOff button , the panel will become darkest.
 
-
8. Record mouse position for go to 50 when LightOff. If click the button , 13 will show , you can click anywhere which you want for light on.
+
== How to use the DPC(Light sensor module) utility ==
-
9. Record hotkey for go to 10 when LightOff. If click the button , The Record Hot Key window will show.
+
[[Image:DPC_UI_008.jpg]]<br />
-
10. When click minimized , DPC will hide and show in the notification area.
+
26. If checked it. utility will adjust the volume of brightness automatically.
-
11. Reset the record of hot key and position.
+
27. Light sensor device name.
 +
28. The mode of light sensor in used.
-
[[Image:DPC_AP_3.jpg]]<br />
+
29. The range of light sensor in used.
-
12. The light on mouse position and hotkay can not use together , after you record hotkey , you can't use the position anymore.
+
30. Calculated LUX values.
-
[[Image:DPC_AP_4.jpg]]<br />
+
=== Lightsensor settings tab page ===
 +
[[Image:DPC_UI_009.jpg]]<br />
-
13. First key of hotkey
+
31. About light sensor settings tab page.
-
15. Second key of hotkey
+
32. Choose which mode of light sensor to use.
-
16. Third key hotkey
+
33. Choose which range of light sensor to use.
-
17. Confirm the hotkey which you entered
+
34. If checked it. Light sensor automatically modify brightness volume in custom limit range.
-
18. Show hotkey which you set.
+
35. Custom limit: light sensor maximum volume of brightness.
-
19. Hotkey will show here.
+
36. Custom limit: light sensor median volume of brightness.
-
[[Image:DPC_AP_5.jpg]]<br />
+
37. Custom limit: light sensor minimum volume of brightness.
-
20. If you want to exit DPC , you should click right button of mouse on the icon and choose exit.
 
== Sample code Introduction ==
== Sample code Introduction ==
-
===Define SMBus regester===
+
===Define SMBus register===
#define SMBUSPORT 0x0500
#define SMBUSPORT 0x0500
#define HST_STS SMBUSPORT+0x00
#define HST_STS SMBUSPORT+0x00

Current revision

Contents

The Sample code source you can download form

(*)Windows must updated Redistributable latest supported For X64


DPC

<Google Drive> Binary file: DPC_v4.4.6.10W_Bin_x64

<FTP> Binary file: DPC_v4.4.6.10W_Bin_x64


DPC LightSensor

<Google Drive> Binary file: DPC_LightSensor_v4.4.3W_Bin_x86 DPC_LightSensor_v4.4.3W_Bin_x64

<FTP> Binary file: DPC_LightSensor_v4.4.3W_Bin_x86 DPC_LightSensor_v4.4.3W_Bin_x64


DPC Utility Dll

<Google Drive> Binary file: DPCUtilityDll_v1.0.1.2_x86 DPCUtilityDll_v1.0.1.2_x64

<FTP> Binary file: DPCUtilityDll_v1.0.1.2_x86 DPCUtilityDll_v1.0.1.2_x64


User Guide:

<Google Drive> DPCUtilityDll_Guide

<FTP> DPCUtilityDll_Guide


Sample code:

<Google Drive> DPCUtilityDll_v1.0.1.2_Sample

<FTP> DPCUtilityDll_v1.0.1.2_Sample

How to use the DPC utility

Image:DPC_UI_001.jpg

1. Set step add / subtract brightness level.

2. When click the "LightOff" button, the panel will become darkness.
(*)Hot key and touch position to light on panel must set first.

3. Brightness control scrollbar, you can adjust volume of brightness. Value from 1 to 100.

4. Show the brightness value which you adjust.

5. Advanced config settings.

(*)When DPC utility minimize, it will hide in the notification area (like below picture),
and double click the tray icon (shown as the red square below), 'DPC Utility', it will show.

Image:DPC_AP_1.jpg

How to set advanced settings of the DPC utility

Image:DPC_UI_002.jpg

6. General settings tab page.

7. About touch panel settings tab page.

8. About Hotkey panel settings tab page. User can set the hotkey. When push hot key, the panel will be light on from darkness.

9. About DPC software and hardware information.

10. Save the setting value but without leaving the window.

11. Restore the setting value to last saved.

12. Save the setting value and close the window.

General settings tab page

Image:DPC_UI_003.jpg

13. If user checked, utility will auto startup when system booting.

14. If checked to save DPC setting , the setting of utility will be saved in INI file.

Touch panel settings tab page

Image:DPC_UI_004.jpg

15. Frequency of panel. Only support in DPC onboard module.

16. Click the button. User can pick up the area from object 17. When clicking area, the panel will be light on from darkness.

Image:DPC_UI_005.jpg

17. Pick up the area from panel. When clicking area, the panel will be light on from darkness.

Hotkey settings tab page

Image:DPC_UI_006.jpg

18. First key of hotkey. Only enter Ctrl, SHIFT, or ALT.

19. Second key of hotkey. Only enter key: 'A' to 'Z'.

Information tab page

Image:DPC_UI_007.jpg

20. Show the DPC utility version.

21. Show the MCU version.

22. Show the DPC utility company.

23. Show the DPC utility copyright.

24. Show the base board model name.

25. Show utility supported backlight type.


How to use the DPC(Light sensor module) utility

Image:DPC_UI_008.jpg

26. If checked it. utility will adjust the volume of brightness automatically.

27. Light sensor device name.

28. The mode of light sensor in used.

29. The range of light sensor in used.

30. Calculated LUX values.

Lightsensor settings tab page

Image:DPC_UI_009.jpg

31. About light sensor settings tab page.

32. Choose which mode of light sensor to use.

33. Choose which range of light sensor to use.

34. If checked it. Light sensor automatically modify brightness volume in custom limit range.

35. Custom limit: light sensor maximum volume of brightness.

36. Custom limit: light sensor median volume of brightness.

37. Custom limit: light sensor minimum volume of brightness.


Sample code Introduction

Define SMBus register

#define SMBUSPORT		0x0500
#define	HST_STS			SMBUSPORT+0x00
#define	HST_CNT			SMBUSPORT+0x02
#define	HST_CMD			SMBUSPORT+0x03
#define	XMIT_SLVA		SMBUSPORT+0x04
#define	HST_D0			SMBUSPORT+0x05
#define bSize			1
#define SADD			0xb0
#define PWMFeq			0x01
#define PWMDuty			0x02

Set Frequency data

DWORD dwPortVal;
bool bResult;
bResult = InitializeWinIo();

if (bResult){
     SetPortVal(HST_STS, 0xFE, bSize); //start
     Sleep(20);
     SetPortVal(XMIT_SLVA, SADD, bSize); //set
     Sleep(20);
     SetPortVal(HST_CMD, PWMFeq, bSize); //set frequency
     Sleep(20);
     GetPortVal(HST_STS, &dwPortVal, bSize);
     Sleep(20);
     dwPortVal = dwPortVal & 0x01;
     if (dwPortVal == 0){
          SetPortVal(HST_D0, fvalue, bSize); //write data into frequency
          Sleep(20);
          SetPortVal(HST_CNT, 0x48, bSize); //stop
          Sleep(20);
          ShutdownWinIo();
     }
     else
          ShutdownWinIo();
}
ShutdownWinIo();

Set Duty data

UpdateData(TRUE);
DWORD dwPortVal;
bool bResult;
bResult = InitializeWinIo();

if (bResult){
     SetPortVal(HST_STS, 0xFE, bSize); //start
     Sleep(20);
     SetPortVal(XMIT_SLVA, SADD, bSize); //set 
     Sleep(20);
     SetPortVal(HST_CMD, PWMDuty, bSize); //set duty
     Sleep(20);
     GetPortVal(HST_STS, &dwPortVal, bSize);
     Sleep(20);
     dwPortVal = dwPortVal & 0x01;
     if (dwPortVal == 0){
          if (inverter == false)
               SetPortVal(HST_D0, dvalue * 10 , bSize); //write data into data
          else if (inverter == true)
               SetPortVal(HST_D0, (10 - dvalue) * 10 , bSize); 
          Sleep(20);
   	   SetPortVal(HST_CNT, 0x48, bSize); //stop
          Sleep(20);
          ShutdownWinIo();
     }
     else
          ShutdownWinIo();
}
ShutdownWinIo();
Personal tools