Log In
Featured product -
USB-I2C/SPI/GPIO Adapter U2C-12
Home
Products
My Account
Contacts
USB-SPI/I2C/GPIO Adapter U2C-12
| USB-IO Interface Adapter GPIO-24 |
SPI Bus Host Adapter SPI-10
|
USB PIC Development Board
|
General description
Digital Inputs
Digital Outputs
Analog Inputs (ADC Module)
Pulse Width Modulation
SW Tools & Utilities
Downloads
Features
Support
Buy online
Applications
Warranty
Applications
PWM DC Motor Controller
PWM Digital to Analog Converter
PWM Lamp & LED Dimmer
DC & AC Voltage Measurement
Documentation
USB-IO API 1.0.0
USB-IO API 1.0.0
Online API Documentation
Schematics
Related products
USB-SPI/GPIO Adapter - SPI-10
USB-I2C/SPI/GPIO Adapter - U2C-12
Revision History
USB-I/O Interface Adapter GPIO-24. Programmer's Reference Manual.
Copyright © 2010 Diolan
Table of Contents
Revision History
Introduction
1. Notification
2. API Functions Reference
2.1. Initialization functions
2.1.1. GPIO_Init()
2.1.2. GPIO_Uninit()
2.1.3. GPIO_GetDeviceCount()
2.1.4. GPIO_OpenDevice()
2.1.5. GPIO_CloseDevice()
2.1.6. GPIO_CloseAllDevices()
2.2. Device communication functions
2.2.1. GPIO_SendCommand()
2.2.2. GPIO_GetEvent()
2.2.3. GPIO_Transaction()
3. Monitoring of device connection/disconnection
3.1. GPIO_EV_DEVICE_ADDED (0x80)
3.2. GPIO_EV_DEVICE_REMOVED (0x81)
4. Device Identification and Configuration
4.1. GPIO_GET_FW_VER (0x0B)
4.2. GPIO_GET_SN (0x0C)
4.3. GPIO_SET_DEV_ID (0x0D)
4.4. GPIO_GET_DEV_ID (0x0E)
4.5. GPIO_SET_CFG (0x01)
4.6. GPIO_GET_CFG (0x02)
4.7. GPIO_GET_PIN_CFG (0x2D)
4.8. GPIO_GET_VAL (0x09)
4.9. GPIO_SAVE_CFG_EEPROM (0x1B)
4.10. GPIO_CLR_CFG_EEPROM (0x1C)
4.11. GPIO_GET_VDD (0x27)
5. Digital Outputs
5.1. GPIO_SET_OUT_VAL (0x03)
5.2. GPIO_GET_OUT_VAL (0x04)
6. Digital Inputs
6.1. Digital Input Event
6.2. Phase of Event Generation for Digital Input Pins
6.2.1. GPIO_IN_EV_NONE (0x00) – No events are sent
6.2.2. GPIO_IN_EV_LEV_0 (0x01) – Sending events when pin has logical "0" on its input
6.2.3. GPIO_IN_EV_LEV_1 (0x01) – Sending events when pin has logical "1" on its input
6.2.4. GPIO_IN_EV_RISING (0x03) – Sending events when input value changes from logical "0" to "1"
6.2.5. GPIO_IN_EV_FALLING (0x04) – Sending events when input value changes from logical "1" to "0"
6.2.6. GPIO_IN_EV_CHANGE (0x05) – Sending events when input value of the pin changes
6.3. Electrical Characteristics of Digital Inputs
6.4. GPIO_SET_IN_CFG (0x05)
6.5. GPIO_GET_IN_CFG (0x06)
6.6. GPIO_EV_IN (0x82)
7. Analog Inputs (ADC Module)
7.1. Association between analog input voltage and ADC digital code
7.2. ADC Module SW Interface
7.3. Analog Reference Voltage
7.4. ADC Event
7.5. Default Values of ADC Channels
7.6. GPIO_SET_ADC_MODULE_CFG (0x20)
7.7. GPIO_GET_ADC_MODULE_CFG (0x25)
7.8. GPIO_SET_ADC_CHANNEL_CFG (0x21)
7.9. GPIO_GET_ADC_CHANNEL_CFG (0x26)
7.10. GPIO_GET_ADC_VAL (0x11)
7.11. GPIO_SET_ADC_CFG (0x12)
7.12. GPIO_GET_ADC_CFG (0x13)
7.13. GPIO_EV_ADC (0x83)
8. Comparator Module
8.1. Modes of operation for comparator module
8.1.1. Comparators Off (MODE = 0)
8.1.2. One Independent Comparator with Output (MODE = 1)
8.1.3. Two Independent Comparators (MODE = 2)
8.1.4. Two Independent Comparators with Outputs (MODE = 3)
8.1.5. Two Common Reference Comparators (MODE = 4)
8.1.6. Two Common Reference Comparators with Outputs (MODE = 5)
8.1.7. Four Inputs Multiplexed to Two Comparators (MODE = 6)
8.1.8. Comparators Reset (MODE = 7)
8.2. Comparator voltage reference module
8.3. Comparator module event
8.4. GPIO_SET_CMP_CFG (0x0F)
8.5. GPIO_GET_CMP_CFG (0x10)
8.6. GPIO_GET_CMP_VAL (0x22)
8.7. GPIO_EV_CMP (0x84)
9. Pulse Width Modulation and Pulse Generation Module
9.1. Pulse Width Modulation (PWM)
9.2. High Frequency PWM (HPWM)
9.3. Single Pulses
9.4. GPIO_SET_PWM_CFG (0x07)
9.5. GPIO_GET_PWM_CFG (0x08)
9.6. GPIO_SET_HPWM_CFG (0x14)
9.7. GPIO_GET_HPWM_CFG (0x15)
9.8. GPIO_SET_PULSE_CFG (0x23)
9.9. GPIO_GET_PULSE_CFG (0x24)
9.10. GPIO_MAKE_PULSE (0x0A)
10. Frequency Counter Module
10.1. Frequency Counter Event
10.2. GPIO_SET_FR_CNT_CFG (0x16)
10.3. GPIO_GET_FR_CNT_CFG (0x17)
10.4. GPIO_GET_FR_CNT_VAL (0x18)
10.5. GPIO_EV_FR_CNT (0x85)
11. Pulse Counter Module
11.1. Pulse Counter Modes
11.1.1. Free Run Mode
11.1.2. Time Based Mode
11.1.3. Pulse Based Mode
11.2. Pulse Counter Event
11.3. GPIO_SET_PLS_CNT_CFG (0x1D)
11.4. GPIO_GET_PLS_CNT_CFG (0x1E)
11.5. GPIO_SET_PLS_CNT_LIMIT (0x28)
11.6. GPIO_GET_PLS_CNT_LIMIT (0x29)
11.7. GPIO_GET_PLS_CNT_VAL (0x1F)
11.8. GPIO_SUSPEND_PLS_CNT (0x2B)
11.9. GPIO_RESUME_PLS_CNT (0x2A)
11.10. GPIO_RESET_PLS_CNT (0x2C)
11.11. GPIO_EV_PLS_CNT
12. Weak Pull Up Resistors
12.1. GPIO_SET_PULL_UPS (0x19)
12.2. GPIO_GET_PULL_UPS (0x1A)
13. C/C++ Project Integration
13.1. Overview
13.2. gpio_24.h
13.3. reports.h
14. Scripting languages interfaces
15. Sample Code
15.1. Overview
15.2. tracer.exe
15.3. command.exe
15.4. transaction.exe
16. Electrical Characteristics
16.1. I/O Pinout
List of Figures