IO Device:IntelDIO

From LEXWiKi

(Difference between revisions)
Jump to: navigation, search
Current revision (12:44, 25 February 2022) (edit) (undo)
(The Sample code source you can download from)
 
(7 intermediate revisions not shown.)
Line 1: Line 1:
[[Category:AllowPages]]
[[Category:AllowPages]]
- 
-
== The Sample code source you can download from ==
 
- 
-
( This sample code using WinIO.dll )
 
- 
-
[ftp://ftp.lex.com.tw/Engineer/SoftSupport/AP_Module/852_DIO_Sample_Windows/852_DIO_WDT.rar 852_DIO_WDT.rar]
 
- 
-
== How to use this Demo Application ==
 
-
1. Press the "Start" button to test DIO function
 
- 
-
2. Press the "Enable" button to test WDT function
 
- 
-
3. Press the "Disable" button when WDT enable to disable WDT
 
- 
-
[[Image:DIO.jpg]]
 
== Introduction ==
== Introduction ==
Line 42: Line 27:
Enable : SetPortVal(INTEL_WDTE, m_CountDown, 1); // m_CountDown is timer of WDT
Enable : SetPortVal(INTEL_WDTE, m_CountDown, 1); // m_CountDown is timer of WDT
Disable: GetPortVal(INTEL_WDTD,&dwPortVal,1);
Disable: GetPortVal(INTEL_WDTD,&dwPortVal,1);
 +
 +
 +
== The Sample code source you can download from ==
 +
 +
=== For Looping test ===
 +
 +
( This sample code using WinIO.dll )
 +
 +
<Google Drive>
 +
 +
Source file: [https://drive.google.com/file/d/1QksUdVVbX-QpIVO96sA1nuTDaO4Ittis/view?usp=sharing 852_DIO_WDT_Src]
 +
 +
Binary file: [https://drive.google.com/file/d/1jUW7RyjTfMpstk9Z7fJtiQ4dYpJsluEi/view?usp=sharing 852_DIO_WDT_Bin]
 +
 +
<FTP>
 +
 +
Source file: [ftp://ftp.lex.com.tw/Engineer/SoftSupport/AP_Module/852_DIO_Sample_Windows/852_DIO_WDT.rar 852_DIO_WDT_Src]
 +
 +
Binary file: [ftp://ftp.lex.com.tw/Engineer/SoftSupport/AP_Module/852_DIO_Sample_Windows/852_DIO_WDT_Bin.rar 852_DIO_WDT_Bin]
 +
 +
=== For Single pin test ===
 +
 +
<Google Drive>
 +
 +
Source file: [https://drive.google.com/file/d/14Q8WRNev0HJ8uV1gXm9uIxVbDQ76R1G_/view?usp=sharing 852_DIO_WDT_Single_Src]
 +
 +
Binary file: [https://drive.google.com/file/d/1_xGejPDdoF-56i-vgA6wk1p0f8mUglev/view?usp=sharing 852_DIO_WDT_Single_Bin]
 +
 +
<FTP>
 +
 +
Source file: [ftp://ftp.lex.com.tw/Engineer/SoftSupport/AP_Module/852_DIO_Sample_Windows/852_DIO_WDT_Single_Src.rar 852_DIO_WDT_Single_Src]
 +
 +
Binary file: [ftp://ftp.lex.com.tw/Engineer/SoftSupport/AP_Module/852_DIO_Sample_Windows/852_DIO_WDT_Single_Bin.rar 852_DIO_WDT_Single_Bin]
 +
 +
== How to use this Demo Application ==
 +
 +
=== For Looping test ===
 +
1. Press the "Start" button to test DIO function
 +
 +
2. Press the "Enable" button to test WDT function
 +
 +
3. Press the "Disable" button when WDT enable to disable WDT
 +
 +
[[Image:DIO.jpg]]
 +
 +
=== For Single pin test ===
 +
1. Connected the DI and DO pin
 +
 +
2. Before you press the "Write" button, Check the box what you like to send high data first
 +
 +
3. Press the "Read" button to get data from DO
 +
 +
4. Press the "Enable" button to test WDT function
 +
 +
5. Press the "Disable" button when WDT enable to disable WDT
 +
 +
[[Image:singlePin.jpg]]

Current revision


Contents

Introduction

Define Pin Address

   #define INTEL_WDTE	0x600
   #define INTEL_WDTD	0x604
   #define INTEL_DI	0x608
   #define INTEL_DO	0x60C

Initialize WinIO & Uninitializ WinIO

   InitializeWinIo()
   ShutdownWinIo()

Set DI/DO

   DO: DIO_Write(BYTE dwDataVal)
       {
           SetPortVal(INTEL_DO, dwDataVal, 1);
       }
   DI: DIO_Read()
       {
           DWORD dwPortVal;
           GetPortVal(INTEL_DI, &dwPortVal,1 );
           return (BYTE)(dwPortVal);
       }

Enable/Disable WDT

   Enable : SetPortVal(INTEL_WDTE, m_CountDown, 1);    // m_CountDown is timer of WDT 
   Disable: GetPortVal(INTEL_WDTD,&dwPortVal,1);


The Sample code source you can download from

For Looping test

( This sample code using WinIO.dll )

<Google Drive>

Source file: 852_DIO_WDT_Src

Binary file: 852_DIO_WDT_Bin

<FTP>

Source file: 852_DIO_WDT_Src

Binary file: 852_DIO_WDT_Bin

For Single pin test

<Google Drive>

Source file: 852_DIO_WDT_Single_Src

Binary file: 852_DIO_WDT_Single_Bin

<FTP>

Source file: 852_DIO_WDT_Single_Src

Binary file: 852_DIO_WDT_Single_Bin

How to use this Demo Application

For Looping test

1. Press the "Start" button to test DIO function

2. Press the "Enable" button to test WDT function

3. Press the "Disable" button when WDT enable to disable WDT

Image:DIO.jpg

For Single pin test

1. Connected the DI and DO pin

2. Before you press the "Write" button, Check the box what you like to send high data first

3. Press the "Read" button to get data from DO

4. Press the "Enable" button to test WDT function

5. Press the "Disable" button when WDT enable to disable WDT

Image:singlePin.jpg

Personal tools