IO Device:F75113 SMbus under Windows(64bit)

From LEXWiKi

(Difference between revisions)
Jump to: navigation, search
Current revision (11:13, 25 February 2022) (edit) (undo)
(The Sample code source you can download from)
 
(5 intermediate revisions not shown.)
Line 2: Line 2:
== The Sample code source you can download from ==
== The Sample code source you can download from ==
-
Source file: [ftp://ftp.lex.com.tw/Engineer/SoftSupport/AP_Module/F75113/Windows/SMBUS/F75113v1.0W_SMbus_src.zip F75113v1.0W_SMbus_src.zip]
+
<Google Drive>
-
Binary file for x64: [ftp://ftp.lex.com.tw/Engineer/SoftSupport/AP_Module/F75113/Windows/SMBUS/F75113v1.0W_SMbus_bin.zip F75113v1.0W_SMbus_bin.zip]
+
Source file: [https://drive.google.com/file/d/1-vRDmqenP7v7nfq5q7nYMPopxtWMuwx1/view?usp=sharing F75113v1.0W_SMbus_Src]
 +
 
 +
Binary file(64 bit): [https://drive.google.com/file/d/13Rwn-ToFziZUE1t7VB8wivH8lG5S63vF/view?usp=sharing F75113v1.0W_SMbus_Bin]
 +
 
 +
<FTP>
 +
 
 +
Source file: [ftp://ftp.lex.com.tw/Engineer/SoftSupport/AP_Module/F75113/Windows/SMBUS/F75113v1.0W_SMbus_src.zip F75113v1.0W_SMbus_Src]
 +
 
 +
Binary file(64 bit): [ftp://ftp.lex.com.tw/Engineer/SoftSupport/AP_Module/F75113/Windows/SMBUS/F75113v1.0W_SMbus_bin.zip F75113v1.0W_SMbus_Bin]
 +
 
 +
We do the demo test with a test tool which DIx connect to DOx with Relay.
 +
 
 +
== MB Support List ==
 +
<!--box uid=f777871962f1c0432784d4e0e73802b8.1588.Y5cca8faf3aa49-->
 +
<!--
 +
******************************************************************************************
 +
*
 +
* ** PLEASE DON'T EDIT THIS TABLE DIRECTLY. Use the edit table link under the table. **
 +
*
 +
****************************************************************************************** -->
 +
{|border="2" cellpadding="4" cellspacing="0" style="margin: 1em 1em 1em 0; border: 1px #aaa solid; border-collapse: collapse;"
 +
|-
 +
! |Cacrd
 +
|
 +
M113A
 +
|}
 +
[{{SERVER}}/lexwiki/index.php?title=Special:TableEdit&id=f777871962f1c0432784d4e0e73802b8.1588.Y5cca8faf3aa49&page=1588&pagename={{FULLPAGENAMEE}} edit table]
 +
<!--box uid=f777871962f1c0432784d4e0e73802b8.1588.Y5cca8faf3aa49-->
-
We do the demo test with a test tool which DIx connect to DOx with Relay.
 
== How to use this Demo Application ==
== How to use this Demo Application ==

Current revision

Contents

The Sample code source you can download from

<Google Drive>

Source file: F75113v1.0W_SMbus_Src

Binary file(64 bit): F75113v1.0W_SMbus_Bin

<FTP>

Source file: F75113v1.0W_SMbus_Src

Binary file(64 bit): F75113v1.0W_SMbus_Bin

We do the demo test with a test tool which DIx connect to DOx with Relay.

MB Support List

Cacrd

M113A

edit table


How to use this Demo Application

Image:F75113_SMBus.jpg

1. Press the "Test" button to test CIO1 function

2. Press the "C2test" button to test CIO2 function

3. Press the "C3test" button to test CIO3 function

4. Press the "C4test" button to test CIO4 function

If the next picture appears

Image:t3.jpg

MB no SMBus or the drive placement is wrong

Drive the location for the next picture

Image:floder_SMBus.jpg

F75113 GPIO Picture

Image:t5.jpg

Introduction

F75113 driver connection

 hinstLib = LoadLibrary(L"Fintek.dll");
 if (hinstLib == NULL)
 {
    if(Application->MessageBoxW(L"Load fail Fintek.dll,Continued?",L"Error",16+4)==IDNO)
    {
      Application->Terminate();
    }
      return; 
 }

GPIO Status Register Write

 SETINT2PROC ProcAdd;
 char *endptr;
 char Numbers[] = "0x20";
 char Value[] =   "0xF0";
 ProcAdd = (SETINT2PROC) GetProcAddress(hinstLib, "GPIO_SMBus_W");
 if (NULL != ProcAdd)
 {
   if (! (*ProcAdd)( strtol(Numbers, &endptr, 16), strtol(Value, &endptr, 16)))
   {
     ShowMessage("Write Fail");
   }
 }

GPIO Status Register Read

 GETINT2PROC ProcAdd1;
 int datatest;
 char NRtest[] = "0x22";
 ProcAdd1 = (GETINT2PROC) GetProcAddress(hinstLib, "GPIO_SMBus_R");
 if (NULL != ProcAdd1)
 {
   if (! (*ProcAdd1)( strtol(NRtest, &endptr, 16), &datatest))
   {
     ShowMessage("Read Fail");
   }
 }

GPIO Comparison

 if( data == 0xF0 )
 {
  ((CStatic *)GetDlgItem(IDC_LED_DO0))->SetBitmap(::LoadBitmap(AfxGetInstanceHandle(),MAKEINTRESOURCE(IDB_BITMAP_Green)));
  ((CStatic *)GetDlgItem(IDC_LED_DO1))->SetBitmap(::LoadBitmap(AfxGetInstanceHandle(),MAKEINTRESOURCE(IDB_BITMAP_Green)));
  ((CStatic *)GetDlgItem(IDC_LED_DO2))->SetBitmap(::LoadBitmap(AfxGetInstanceHandle(),MAKEINTRESOURCE(IDB_BITMAP_Green)));
  ((CStatic *)GetDlgItem(IDC_LED_DO3))->SetBitmap(::LoadBitmap(AfxGetInstanceHandle(),MAKEINTRESOURCE(IDB_BITMAP_Green)));	
   if( data2 == 0x01 )
   {
     ((CStatic *)GetDlgItem(IDC_LED_DI0))->SetBitmap(::LoadBitmap(AfxGetInstanceHandle(),MAKEINTRESOURCE(IDB_BITMAP_Green)));
     ((CStatic *)GetDlgItem(IDC_LED_DI1))->SetBitmap(::LoadBitmap(AfxGetInstanceHandle(),MAKEINTRESOURCE(IDB_BITMAP_Red)));
     ((CStatic *)GetDlgItem(IDC_LED_DI2))->SetBitmap(::LoadBitmap(AfxGetInstanceHandle(),MAKEINTRESOURCE(IDB_BITMAP_Red)));
     ((CStatic *)GetDlgItem(IDC_LED_DI4))->SetBitmap(::LoadBitmap(AfxGetInstanceHandle(),MAKEINTRESOURCE(IDB_BITMAP_Red)));
   }
   .....
 }

F75113 driver delete

  char N9[] = "0x10";
  char V9[] = "0x00";
  ProcAdd = (SETINT2PROC) GetProcAddress(hinstLib, "GPIO_SMBus_W");
   if (NULL != ProcAdd)
    {
     if (! (*ProcAdd)( strtol(N9, &endptr, 16), strtol(V9, &endptr, 16)))
      {
       ShowMessage("Write Fail");
      }
    }
    if (hinstLib != NULL)
    {
     FreeLibrary(hinstLib);
    }
Personal tools