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.
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...
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.
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.
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)...
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.
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.
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.
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.
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.
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.
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...
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]...
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...
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.
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.
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...
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...
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.
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.
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.
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.
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...
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.
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.
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.
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.
Need help?
Do you have a question about the HLSB-36PCI2 and is the answer not in the manual?
Questions and answers