StepTechnica HLSB-36PCI2 User Manual

Hls pci board

Advertisement

Quick Links

STD_HLSB36PCI2_V1.0E
HLS(MKY36)PCI Board
HLSB-36PCI2
User's Manual

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the HLSB-36PCI2 and is the answer not in the manual?

Questions and answers

Summary of Contents for StepTechnica HLSB-36PCI2

  • Page 1 STD_HLSB36PCI2_V1.0E HLS(MKY36)PCI Board HLSB-36PCI2 User's Manual...
  • Page 2 5. This product is not designed for use in critical applications, such as life support systems. Contact us when considering such applications. 6. No part of this document may be copied or reproduced in any form or by any means without prior written permission from StepTechnica Co., Ltd.
  • Page 3: Revision History

    HLSB-36PCI2 User's Manual Revision history Date Version Content Note AUG 2018 1.0E Issued the first edition...
  • Page 4 HLSB-36PCI2 User's Manual Preface This manual describes HLSB-36PCI2, PCI board with MKY36 which is a kind of HLS family IC. Be sure to read "HLS Introduction Guide" in advance to use HLSB-36PCI2 and understand this manual. ● Target readers ・Those who first build an HLS ・Those who first use StepTechnica's HLSB-36PCI2 to build an HLS...
  • Page 5: Table Of Contents

    1.3 Connector specifications .................................... 1-2 1.4 DIP switches ........................................1-3 1.5 Memory map ........................................1-4  1.5.1 MKY36 ........................................1-4  1.5.2 Unique register of HLSB-36PCI2 ..............................1-5 1.6 The access without driver software ............................... 1-6 Chapter 2 Software 2.1 Outline ..........................................2-1 2.2 Copyright and disclaimer ................................... 2-1 2.3 File structure ........................................
  • Page 6 HLSB-36PCI2 User's Manual Figures Fig.1-1 Panel view ......................................1-2 Fig.1-2 Connector peripheral circuits ................................. 1-2 Fig.1-3 Settings of HLSB-36PCI2 board ..............................1-3 Tables Table 1-1 Board specifications ..................................1-1 Table 1-2 Memory map ....................................1-4 Table 2-1 API functions ....................................2-4 Table 2-2 Version numbering ..................................2-5 Table 2-3 Error code list ....................................
  • Page 7: Chapter 1 Hardware

    This chapter describes hardware of HLSB-36PCI2. 1.1 Features HLSB-36PCI2 is a PCI expansion bus supported HLS communication board with MKY36 chip. This product is designed to help easy operation of MKY36 functions with StepTechnica's Library for Windows. HLSB-36PCI2 is for evaluating and learning MKY36.
  • Page 8: Connector Specifications

    HLSB-36PCI2 User's Manual 1.3 Connector specifications The panel view of HLSB-36PCI2 and its details are shown in Fig.1-1. Function CHK1, 2 (Yellow+Red) SCAN (Green) Pin# Full-duplex Half-duplex CHK1, 2 (Yellow+Red) SCAN (Green) Panel TRX- TRX+ Shield Shield 1,2,7 Unused Unused SCAN LED is connected to #SCANL pin of MKY36, lit green when MKY36 is scanning.
  • Page 9: Dip Switches

    The settings of DIP switches of HLSB-36PCI2 are shown in Fig.1-3. If two or more HLSB-36PCI2 devices are connected to one PC, set SW9 board IDs to individual number of each boards so that you can distinguish the boards using software. (Factory setting board ID : 0)...
  • Page 10: Memory Map

    Table 1-2 describes memory map of HLSB-36PCI2. Two MKY36 ICs are mounted on this product. An address in memory map is a relative value from starting address of HLSB-36PCI2, and actual address is the value which is added the starting address of the board.
  • Page 11: Unique Register Of Hlsb-36Pci2

    Chapter 1 Hardware 1.5.2 Unique register of HLSB-36PCI2 F00H and F02H registers shown in Table 1-2 Memory map are unique registers of HLSB-36PCI2. The details of these registers are described in the following. Chip Reset Register  Address:F00H Function CRST1 CRST0 By writing "1" to CRST0 (Chip ReSet 0), reset signal can be applied to RST pin of MKY36#1.
  • Page 12: The Access Without Driver Software

    1.6 The access without driver software When you directly access to HLSB-36PCI2 without StepTechnica's driver software, note the following point. Always use 32bit access to access to HLSB-36PCI2. At that time, lower 16 bit data will be used and upper 16 bit will be unused.
  • Page 13: Chapter 2 Software

    Due to the specifications of Windows, any accesses to HLSB-36PCI2 from user application are executed via API in the attached HLSB36PCI2.DLL. When using Microsoft Windows 7 / 8 as a host OS, these attached software optimizes the control to HLSB-36PCI2 by utilizing many programing tools such as Microsoft Visual Studio.
  • Page 14: File Structure

    Use this within Windows system folder or user program directory using this DLL. 【hlsb36pci2.lib】 Import library for Microsoft Visual C/C++, which is created using VisualStudio2013 【hlsb36pci2.h】 Header file for HLSB-36PCI2. Include this after than Windows.h when using. 2.4 Restrictions This chapter describes the restrictions at building an application using this API.
  • Page 15: Interrupt Handling

    Chapter 2 Software 2.4.2 Interrupt handling INT0R and INT1R registers enable MKY36 to set enable/disable of interrupt and to check the status of interrupt occurrence. The internal driver has registers called interrupt factor register which retains the information in lower 8 bit of INT0R and INT1R at interrupt occurrence and interrupt count register which retains the interrupt occurrence count of each INT0R and INT1R.
  • Page 16: Api Functions

    Function Description HlsbGetVersion Obtains liblary version number HlsbGetLastError Obtains the termination status of API functions Obtains the number of HLSB-36PCI2 board connected to PC and HlsbSearchBoard its board ID HlsbOpenHandle Opens the handle of HLSB-36PCI2 HlsbCloseHandle Closes the handle of HLSB-36PCI2...
  • Page 17: Hlsbgetversion

    Chapter 2 Software 2.5.1 HlsbGetVersion Format UINT HlsbGetVersion(void); Function Returns API version number Parameter None Return value Unsigned integer value which describes the version number of API Error code The error code and error factor returned by HlsbGetLastError after executing this function is as follows. HLSB_SUCCESS Terminated normally [Note]...
  • Page 18: Hlsbgetlasterror

    HLSB-36PCI2 User's Manual 2.5.2 HlsbGetLastError Format UINT HlsbGetLastError(void); Function Obtains the termination state of the API called last time Parameter None Return value The error codes supported by this API is shown in Table 2-3, which are defined in hlsb36pci2.h. Table 2-3 Error code list...
  • Page 19: Hlsbsearchboard

    BYTE board_id_list[4]; HlsbSearchBoard(&board_num, &board_id_list[0]); As an example, three HLSB-36PCI2 units are connected to a PC, and each board IDs are set in sequence ; 1st board ID = 0, 2nd board ID = 1, 3rd board ID = 2. If the units have been identified by the PC in sequence with first, third, and second, and run HlsbSearchBoard, board number and its IDs are returned as follows.
  • Page 20: Hlsbopenhandle

    When two or more HLSB-36PCI2 are connected to a PC, execute "HlsbSearchBoard" in advance to check which HLSB-36PCI2 to manipuate. As an example, three HLSB-36PCI2 units are connected to a PC, and each board IDs are set in sequence ; 1st board ID = 0, 2nd board ID = 1, 3rd board ID = 2.
  • Page 21: Hlsbclosehandle

    BOOL HlsbCloseHandle(HANDLE hlsbHandle); Function Closes handle obtained by HlsbOpenHandle Parameter hlsbHandle Handle value of HLSB-36PCI2 Return value Succeeded : TRUE is returned. Failed : FALSE is returned. You can check the details of error factor by executing HlsbGetLastError. Error code...
  • Page 22: Hlsbreadword

    HLSB-36PCI2 User's Manual 2.5.6 HlsbReadWord Format BOOL HlsbReadWord(HANDLE hlsbHandle、const ULONG addr、WORD *data) Function Reads word data from the specified address in memory map of HLSB-36PCI2. Parameter hlsbHandle Handle value of HLSB-36PCI2 addr Offset address from the starting address Input conditions are the following ・Specify an address value which is multiples of 2...
  • Page 23: Hlsbwriteword

    Chapter 2 Software 2.5.7 HlsbWriteWord Format BOOL HlsbWriteWord(HANDLE hlsbHandle、const ULONG addr、const WORD data) Function Writes word data to the specified address in memory map of HLSB-36PCI2 Parameter hlsbHandle Handle value of HLSB-36PCI2 addr Offset address from the starting address of the board Input conditions are the following.
  • Page 24: Hlsbreaddata

    HLSB-36PCI2 User's Manual 2.5.8 HlsbReadData Format BOOL HlsbReadData(HANDLE hlsbHandle, const ULONG addr, const ULONG wordLen, void *data); Function Reads specified word length data to the specified address of HLSB-36PCI2 Parameter hlsbHandle Handle value of HLSB-36PCI2 addr Offset address from the starting address of the board Input conditions are the following.
  • Page 25: Hlsbwritedata

    Chapter 2 Software 2.5.9 HlsbWriteData Format BOOL HlsbWriteData(HANDLE hlsbHandle, const ULONG addr, const ULONG wordLen, void *data); Function Writes specified word length data from the specified address of HLSB-36PCI2 Parameter hlsbHandle Handle value of HLSB-36PCI2 addr Offset address from the starting address of the board Input conditions are the following.
  • Page 26: Hlsbresetboard

    Format BOOL HlsbResetBoard(HANDLE hlsbHandle, BYTE mkyNo); Function Resets MKY36. Parameter hlsbHandle Handle value of HLSB-36PCI2 mkyNo Specify MKY36 to reset. Input condition is the following. ・1 : MKY36#1, 2:MKY36#2 Return value Succeeded : TRUE is returned. Failed : FALSE is returned You can check the details of error factor by executing HlsbGetLastError.
  • Page 27: Hlsbgetint0Counter, Hlsbgetint1Counter

    Obtains the information of INT0, 1 interrupt count register retained in internal driver. Interrupt count is incremented from 0 to 255 (0xFF)and returns to 0. Parameter hlsbHandle Handle value of HLSB-36PCI2 mkyNo Select MKY36 whose data to obtain. Input condition is the following. ・1 : MKY36#1, 2:MKY36#2...
  • Page 28: Hlsbclearint0Counter, Hlsbclearint1Counter

    BOOL HlsbClearInt1Counter(HANDLE hlsbHandle, int mkyNo) Function Clears INT0, INT1 interrupt counter register retained in the internal driver Parameter hlsbHandle Handle value of HLSB-36PCI2 mkyNo Select MKY36 whose data to obtain. Input condition is the following. ・1 : MKY36#1, 2:MKY36#2 Return value Succeeded : TRUE is returned.
  • Page 29: Hlsbgetint0Statusinfo, Hlsbgetint1Statusinfo

    BOOL HlsbGetInt1StatusInfo(HANDLE hlsbHandle, int mkyNo, BYTE *int1Info) Function Obtains the information of INT0, INT1 interrupt factor retained in th internal driver Parameter hlsbHandle Handle of HLSB-36PCI2 mkyNo Select MKY36 whose data to obtain. Input condition is the following. ・1 : MKY36#1, 2:MKY36#2 *int0Info、*int1Info Pointer to the storage byte area of obtained interrupt factor Information of interrupt factors which has been occurred are accumulated.
  • Page 30: Hlsbclearint0Statusinfo, Hlsbclearint1Statusinfo

    BOOL HlsbClearInt1StatusInfo(HANDLE hlsbHandle, int mkyNo) Function Obtains the information of INT0, INT1 interrupt factor retained in th internal driver Parameter hlsbHandle Handle value of HLSB-36PCI2 Select MKY36 whose data to obtain. mkyNo Input condition is the following. ・1: MKY36 #1, 2:MKY36#2 Return value Succeeded : TRUE is returned.
  • Page 31: Sample Program

    Di using this API. int main(int argc, char *argv[]) HANDLE hlsbHandle; WORD sa1_di, sa63_di; /* Generating handle for HLSB-36PCI2 */ hlsbHandle = HlsbOpenHandle(0); /* Checking the generated handle */ if (hlsbHandle == INVALID_HANDLE_VALUE) { exit(1); /* FALSE : end of program*/ /* Initializing MKY36#1 */ // (1) Write 0x00 to 0x000 - 0x57F in memory map of MKY36.
  • Page 32 Di using this API. int main(int argc, char *argv[]) HANDLE hlsbHandle; WORD sa1_di; WORD sa63_di; /* Generating handle for HLSB-36PCI2 */ hlsbHandle = HlsbOpenHandle(0); /* Checking the generated handle */ if (hlsbHandle == INVALID_HANDLE_VALUE) { exit(1); /* FALSE : end of program*/ /* Initializing MKY36#2 */ // (1) Write 0x00 to 0x800 - 0xD7F in memory map of MKY36.
  • Page 33: Sample Of Interrupt Handling

    BYTE int0_lastTime_numOfOccurr; // Previous INT0 interrupt count BYTE int0_factor;     // INT0 interrupt factor /* Generating handle for HLSB-36PCI2 */ hlsbHandle = HlsbOpenHandle(0); /* Checking the generated handle */ if (hlsbHandle == INVALID_HANDLE_VALUE) { exit(1); /* FALSE : end of program*/ /* Write FS(Final Satelite) to SCR */ HlsbWriteWord(hlsbHandle, 0x580, 0x003F);...
  • Page 34 ■ Developed and manufactured by StepTechnica Co., Ltd. 757-3, Shimofujisawa, Iruma, Saitama http://www.steptechnica.com/en/index.html info@steptechnica.com HLS(MKY36)PCI Board HLSB-36PCI2 User's Manual Document No.:STD_HLSB36PCI2_V1.0E Issued:August 2018...

Table of Contents