DPC Module:DPC under Windows

From LEXWiKi

(Difference between revisions)
Jump to: navigation, search
Line 11: Line 11:
When the DPC utility starts, it will hide in the notification area (like below picture),<br />
When the DPC utility starts, it will hide in the notification area (like below picture),<br />
-
and double click the tray icon (shown as the red square below), 'DPC v4.3.0', it will show.
+
and double click the tray icon (shown as the red square below), 'DPC v4.4.1', it will show.
[[Image:DPC_AP_1.jpg]]<br />
[[Image:DPC_AP_1.jpg]]<br />
-
[[Image:DPC_IMG_002.jpg]]<br />
+
[[Image:DPC_UI_001.jpg]]<br />
-
1. Frequency of panel selection.
+
1. Set step add / subtract brightness level.
-
2. Apply the frequency of panel which user selected.
+
2. When click the "LightOff" button, the panel will become darkness.
-
3. If checked to save DPC setting , the setting of frequency and duty cycle will be reserved.
+
3. Brightness control scrollbar, you can adjust volume of brightness.
-
4. It will show the MCU version of DPC.
+
4. Show the brightness value which you adjust.
-
5. Brightness control scrollbar, you can adjust volume of brightness.
+
5. Advanced config settings.
-
6. Show the brightness value which you adjust.
+
[[Image:DPC_UI_002.jpg]]<br />
-
7. When click the LightOff button, the panel will become darkness.
+
6. General settings tab page.
-
8. Set step add / subtract brightness unit.
+
7. About touch panel settings tab page.
-
9. Apply the step unit.
+
8. About Hotkey panel settings tab page. User can set the hotkey. When push hot key, the panel will be light on from darkness.
-
10. Reset the record of hot key and picked up area.
+
9. About DPC software and hardware information.
-
11. Click the button. User can pick up the area from object 13. When clicking area, the panel will be light on from darkness.
+
10. Save the setting value but without leaving the window.
-
12. Click the button. User can set the hotkey. When push hot key, the panel will be light on from darkness.
+
11. Restore the setting value before user modifying.
 +
 
 +
12. Save the setting value and close the window.
 +
 
 +
[[Image:DPC_UI_003.jpg]]<br />
13. If user checked, utility will auto startup when system booting.
13. If user checked, utility will auto startup when system booting.
 +
14. If checked to save DPC setting , the setting of frequency and duty cycle will be reserved.
-
[[Image:DPC_IMG_004-1.jpg]]<br />
+
[[Image:DPC_UI_004.jpg]]<br />
-
14. First key of hotkey. Only enter Ctrl, SHIFT, or ALT.
+
15. Frequency of panel.
-
15. Second key of hotkey. Only enter key: 'A' to 'Z'.
+
16. Click the button. User can pick up the area from object 13. When clicking area, the panel will be light on from darkness.
-
16. Clear previous hotkey setting.
+
[[Image:DPC_UI_005.jpg]]<br />
-
17. Apply the hotkey which user entered.
+
17. Pick up the area from panel. After clicking area, the panel will be light on from darkness.
 +
[[Image:DPC_UI_006.jpg]]<br />
-
[[Image:DPC_IMG_003.jpg]]<br />
+
18. First key of hotkey. Only enter Ctrl, SHIFT, or ALT.
-
19. Pick up the area from panel. After clicking area, the panel will be light on from darkness.
+
19. Second key of hotkey. Only enter key: 'A' to 'Z'.
 +
[[Image:DPC_UI_007.jpg]]<br />
-
[[Image:DPC_AP_5.jpg]]<br />
+
20. It will show the DPC utility version.
-
20. If you want to exit DPC , you should click right button of mouse on the icon and choose exit.
+
21. It will show the MCU version.
 +
22. It will show the DPC utility company.
-
== How to use the DPC(Light sensor module) utility ==
+
23. It will show the DPC utility copyright.
-
[[Image:DPC_IMG_006.jpg]]<br />
+
24. It will show the base board model name.
-
21. If checked it. utility will adjust the volume of brightness automatically.
+
25. It will show utility supported backlight type.
 +
 
 +
[[Image:DPC_AP_5.jpg]]<br />
 +
 
 +
If you want to exit DPC , you should click right button of mouse on the icon and choose exit.
 +
 
 +
 
 +
== How to use the DPC(Light sensor module) utility ==
-
22. Light sensor device name.
+
[[Image:DPC_UI_008.jpg]]<br />
-
23. The mode of light sensor in used.
+
26. If checked it. utility will adjust the volume of brightness automatically.
-
24. The range of light sensor in used.
+
27. Light sensor device name.
-
25. Calculated LUX values.
+
28. The mode of light sensor in used.
-
26. Advanced settings.
+
29. The range of light sensor in used.
-
[[Image:DPCv4.1.5setting.jpg]]
+
30. Calculated LUX values.
-
27. Choose which mode of light sensor to use.
+
[[Image:DPC_UI_009.jpg]]<br />
-
28. Choose which range of light sensor to use.
+
31. About light sensor settings tab page.
-
29. Custom limit: light sensor maximum volume of brightness.
+
32. Choose which mode of light sensor to use.
-
30. Custom limit: light sensor median volume of brightness.
+
33. Choose which range of light sensor to use.
-
31. Custom limit: light sensor minimum volume of brightness.
+
34. If checked to get brightness volume in custom limit range.
-
32. Save the setting value but without leaving the window.
+
35. Custom limit: light sensor maximum volume of brightness.
-
33. Save the setting value and close the window.
+
36. Custom limit: light sensor median volume of brightness.
-
34. Close the window and without saving.
+
37. Custom limit: light sensor minimum volume of brightness.

Revision as of 17:04, 19 April 2021

Contents

The Sample code source you can download form

Binary file:
DPCv4.3.0W_bin_x64.zip
DPCv4.3.0W_bin_x86.zip
DPC_LightSensor_4.3.0W_bin_x64.zip
DPC_LightSensor_4.3.0W_bin_x86.zip

How to use the DPC utility

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

Image:DPC_AP_1.jpg


Image:DPC_UI_001.jpg

1. Set step add / subtract brightness level.

2. When click the "LightOff" button, the panel will become darkness.

3. Brightness control scrollbar, you can adjust volume of brightness.

4. Show the brightness value which you adjust.

5. Advanced config settings.

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 before user modifying.

12. Save the setting value and close the window.

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 frequency and duty cycle will be reserved.

Image:DPC_UI_004.jpg

15. Frequency of panel.

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

Image:DPC_UI_005.jpg

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

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'.

Image:DPC_UI_007.jpg

20. It will show the DPC utility version.

21. It will show the MCU version.

22. It will show the DPC utility company.

23. It will show the DPC utility copyright.

24. It will show the base board model name.

25. It will show utility supported backlight type.

Image:DPC_AP_5.jpg

If you want to exit DPC , you should click right button of mouse on the icon and choose exit.


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.

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 to get 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