VEST-ViOb-QSG-001, REV A ViO Basic Model Quick Start Guide VEST-ViOb-QSG-001 Copyright © 2016 Advanced Products Corporation Pte Ltd. All rights reserved. No part of this document may be photocopied, reproduced, or translated to another language without the prior written permission of Advanced Products Corporation Pte Ltd. Page 1 APC Proprietary Information March 31, 2016 VEST-ViOb-QSG-001, REV A TABLE OF CONTENTS 1 Overview .........................................................................................................................................6 1.1 Introduction ........................................................................................................................................ 6 1.2 Package Content ................................................................................................................................. 6 1.2.1 ViO Main Controller Board ......................................................................................................... 6 1.2.2 Cables for ViO Main Controller Board ........................................................................................ 6 1.2.3 ViO Daughter Boards .................................................................................................................. 7 1.2.4 Cables and Connector for ViO Daughter Board .......................................................................... 7 1.2.5 ViO sample code and ViO library ................................................................................................ 8 1.3 List Of Acronyms ................................................................................................................................. 9 1.4 Reference Documents ........................................................................................................................ 9 2 Hardware ...................................................................................................................................... 10 2.1 2.2 3 Connectors on ViO Main Controller Board....................................................................................... 10 Connectors on ViO Daughter Board ................................................................................................. 12 Software ........................................................................................................................................ 13 3.1 3.2 3.3 IDE installation.................................................................................................................................. 13 MPLAB Project .................................................................................................................................. 13 Sample Code ..................................................................................................................................... 15 4 Getting Started with ViO Sample Code ........................................................................................... 16 5 Revision History ............................................................................................................................. 21 6 Legal Notices ................................................................................................................................. 22 Page 2 APC Proprietary Information March 31, 2016 VEST-ViOb-QSG-001, REV A LIST OF TABLES Table 1-1: ViO sample code and library information ............................................................................................... 8 Table 2-1: Microchip MPLAB REAL ICE Information ............................................................................................... 11 Page 3 APC Proprietary Information March 31, 2016 VEST-ViOb-QSG-001, REV A LIST OF FIGURES/DIAGRAMS Figure 1-1: ViO Main Controller Board ..................................................................................................................... 6 Figure 1-2: Mini USB cable ....................................................................................................................................... 6 Figure 1-3: RS232 Audio Jack debug cable ............................................................................................................... 7 Figure 1-4: ViO Daughter Boards .............................................................................................................................. 7 Figure 1-5: High power cable.................................................................................................................................... 8 Figure 1-6: Low power cable .................................................................................................................................... 8 Figure 1-7: Sensor/signal cable ................................................................................................................................ 8 Figure 1-8 Terminal Connector................................................................................................................................. 8 Figure 2-1: Connectors on ViO Main Controller Board .......................................................................................... 10 Figure 2-2: MPLAB Real ICE Emulator .................................................................................................................... 10 Figure 2-3: ViO Main Controller Board Block Diagram ........................................................................................... 12 Figure 2-4: Connectors on ViO Daughter Board ..................................................................................................... 12 Figure 3-1 Launch sample code from MPLAB V8 ................................................................................................... 14 Figure 3-2 Launch sample code from MPLAB X...................................................................................................... 15 Figure 4-1: Brushed DC Motor Daughter Board connection .................................................................................. 16 Figure 4-2: Stepper Motor Daughter Board connection ........................................................................................ 16 Figure 4-3 Power Control Daughter Board connection .......................................................................................... 17 Figure 4-4: Code programming on MPLABX ........................................................................................................... 19 Figure 4-5: Code programming on MPLAB 8 .......................................................................................................... 20 Page 4 APC Proprietary Information March 31, 2016 VEST-ViOb-QSG-001, REV A LIST OF CODE SNIPPETS Page 5 APC Proprietary Information March 31, 2016 VEST-ViOb-QSG-001, REV A 1 OVERVIEW 1.1 INTRODUCTION This document describes the development environment setup of ViO Basic Model. The hardware and software components of ViO Basic Model will be introduced, and user will be guided on how to kick-start the project development with ViO sample code and ViO library provided in ViO Basic Model package. 1.2 PACKAGE CONTENT 1.2.1 ViO Main Controller Board ViO Main Controller Board part number VI332MB000 Top View Bottom View Figure 1-1: ViO Main Controller Board 1.2.2 1.2.2.1 Cables for ViO Main Controller Board Mini USB cable Figure 1-2: Mini USB cable Page 6 APC Proprietary Information March 31, 2016 VEST-ViOb-QSG-001, REV A 1.2.2.2 RS232 Audio Jack debug cable Figure 1-3: RS232 Audio Jack debug cable 1.2.3 ViO Daughter Boards ViO Basic Model Package can be shipped with none or multiples of the following Daughter Boards. Brushed DC motor Part number: VA332DC210 Stepper motor Part number: VA332ST210 Power control Sensor Part number: VA332PW210 Part number: VA332SS210 Figure 1-4: ViO Daughter Boards 1.2.4 Cables and Connector for ViO Daughter Board Each ViO Daughter board comes with a set of cables and connector as below. Page 7 APC Proprietary Information March 31, 2016 VEST-ViOb-QSG-001, REV A 1.2.4.1 High power cable Figure 1-5: High power cable 1.2.4.2 Low power cable Figure 1-6: Low power cable 1.2.4.3 Sensor/signal cable Figure 1-7: Sensor/signal cable 1.2.4.4 12-pin Terminal Connector Figure 1-8 Terminal Connector 1.2.5 1 2 ViO sample code and ViO library Item Website ViO Basic Model sample code Please see www.apc-vest.com to download ViO Basic Model application library Please see www.apc-vest.com to download Table 1-1: ViO sample code and library information Page 8 APC Proprietary Information March 31, 2016 VEST-ViOb-QSG-001, REV A 1.3 LIST OF ACRONYMS Acronym VEST APC ISO ViO Abbreviation Venture Embedded Solutions Technology Advanced Products Corporation Private Limited International Organization for Standardization Venture IO 1.4 REFERENCE DOCUMENTS VEST-ViOb-USG-001_ViO Basic Model Reference Manual VEST-ViO-USG-001_Main Board External Reference Specification ViO Daughter Board ERS documents: 1. VEST-ViO-USG-002_DC Motor Card External Reference Specification 2. VEST-ViO-USG-003_Stepper Motor Card External Reference Specification 3. VEST-ViO-USG-004_Power Control Card External Reference Specification Page 9 APC Proprietary Information March 31, 2016 VEST-ViOb-QSG-001, REV A 2 HARDWARE 2.1 CONNECTORS ON VIO MAIN CONTROLLER BOARD Daughter Board slot 3 A pair of connectors for each Daughter Board slot (D) RS232 audio jack Power supply connector (B) Mini USB to PC Daughter Board slot 1 and slot 2 (C) DB9 to host COM port (A) RJ11 to MPLAB REAL ICE Figure 2-1: Connectors on ViO Main Controller Board There are seven Daughter Board slots on ViO Main Controller Board, with three slots on top and four slots at the bottom. Each Daughter Board is connected to Main Controller Board via a pair of connectors as shown in Figure 2-1. The cable connections available for ViO Basic Model are labelled on Figure 2-1, with connections highlighted in YELLOW are REQUIRED for ViO Basic Model and other connections are optional. The detail of each connection is as below: (A) RJ11 to MPLAB REAL ICE This connector connects ViO Main Controller Board to the Microchip MAPLB REAL ICE emulator. The RJ11 cable is shipped with the emulator. The Microchip MPLAB REAL ICE emulator is connector to PC via a USB cable. To RJ11 port on ViO Main Controller Board To USB port on PC Figure 2-2: MPLAB Real ICE Emulator Page 10 APC Proprietary Information March 31, 2016 VEST-ViOb-QSG-001, REV A MPLAB REAL ICE Emulator is NOT included in ViO Basic Model package; please contact Microchip sales representative or the following links for more information: Item Microchip MPLAB REAL ICE emulator Hyperlink http://www.microchipdirect.com/ProductDetails.aspx?Catalog=B uyMicrochip&Category=MPLAB%20REAL%20ICE%20Emulator&mi d=1&treeid=6 RJ11 cable http://www.microchipdirect.com/ProductSearch.aspx?Keywords =AC164110 Table 2-1: Microchip MPLAB REAL ICE Information (B) Mini USB to PC This port serves as a power supply for ViO Main Controller Board. If this port is not used, the power supply connector can be used as an alternative power source. Please refer to VEST-ViO-USG-001_Main Board External Reference Specification for the detail on the alternative power supply port. Note: USB function is not included in ViO sample code. Complete USB supports are provided by Microchip Libraries for Applications. Please refer to the following Microchip website for more detail. http://www.microchip.com/mplab/microchip-libraries-for-applications (C) DB9 to host COM port This port connects ViO Main Controller Board to host/PC COM port. It is designed to be a communication port to host/PC. However, it can be used for other purpose if required. (D) RS232 audio jack This is a serial debug port that connects ViO Main Controller Board to host/PC. It can also be used as an alternative communication port to host if required. There are some other connections available on ViO Main Controller Board as shown in the block diagram in Figure 2-3. Please refer to VEST-ViO-USG-001_Main Board External Reference Specification for more details on each hardware connection. Page 11 APC Proprietary Information March 31, 2016 VEST-ViOb-QSG-001, REV A Figure 2-3: ViO Main Controller Board Block Diagram 2.2 CONNECTORS ON VIO DAUGHTER BOARD Low Power connector High Power connector Sensor/signal pins connector ViO Main Controller Board connectors Top View Bottom View Figure 2-4: Connectors on ViO Daughter Board All ViO Daughter Boards have the same connectors as shown on Figure 2-4. The High Power connector is to be connected to motor, heater and external power source. The Low Power connector consists of the 3.3V and ground pins from ViO Main Controller Board, with digital and analogue power separated. The sensor/signal pins connector is for user to connect to digital sensor, analogue sensor, encoder etc. For more details on the pin assignment of each connector, please refer to ViO Daughter Board ERS documents of each Daughter Board. Page 12 APC Proprietary Information March 31, 2016 VEST-ViOb-QSG-001, REV A 3 SOFTWARE 3.1 IDE INSTALLATION ViO Basic Model code development is using MPLAB IDE from Microchip. There are two software IDEs provided by Microchip: MPLAB IDE V8 (older version of MPLAB, EOL after version V8.92) MPLAB IDE X User can choose either MPLAB version, only one version is required. They can be downloaded from http://www.microchip.com/pagehandler/en-us/family/mplabx/home.html. For new user to Microchip IDE, the user manual can be found from above link as well. User is free to use any other software IDE from third party; however, the sample code and ViO library provided by APC is only for MPLAB IDE V8 and MPLAB X. 3.2 MPLAB PROJECT The MPLAB project files are provided in ViO Basic Model. Please refer to section 1.2.5 for details. There are two project files as below: VIOSampleMPLAB.mcp for MPLAB IDE V8 VIOSampleMPLABX for MPLAB IDE X A screen snapshot of both IDE with project opened are shown in Figure 3-1 and Figure 3-2. Page 13 APC Proprietary Information March 31, 2016 VEST-ViOb-QSG-001, REV A Figure 3-1 Launch sample code from MPLAB V8 Page 14 APC Proprietary Information March 31, 2016 VEST-ViOb-QSG-001, REV A Figure 3-2 Launch sample code from MPLAB X 3.3 SAMPLE CODE In each of the project, there are four files in the Project window: main.c vio_lib.h vio_typedefine.h VIOSampleMPLAB_LIB.a – ViO library for MPLAB IDE V8 built with VIOSampleMPLAB_LIBX.X.a – ViO library for MPLAB IDE built with XC16 V1.24. C30 V3.31; Some simple test functions are designed in ViO sample code for various hardware testing. For more detail on the sample code and ViO library, please refer to VEST-ViOb-USG-001_ViO Basic Model Reference Manual. Page 15 APC Proprietary Information March 31, 2016 VEST-ViOb-QSG-001, REV A 4 GETTING STARTED WITH VIO SAMPLE CODE 1. Connect a brushed DC motor and/or a stepper motor to the respective ViO Daughter Board. The motor connections are as shown in Figure 4-1 , Figure 4-2 and Figure 4-3 Power Control Daughter Board Figure 4-3. If you do not have any motor or ViO Daughter Board, please proceed to step 3. Please refer to the respective ViO Daughter Board ERS document for detail pin assignment and electrical rating. To brushed DC motor terminals To High Power connector on Brushed DC Daughter Board GND To external power source Power Figure 4-1: Brushed DC Motor Daughter Board connection To bipolar stepper motor terminals, A+, A-, B+, B-. Please check the motor datasheet for pin assignment. To High Power connector on Stepper motor Daughter Board GND Power To external power source Figure 4-2: Stepper Motor Daughter Board connection Page 16 APC Proprietary Information March 31, 2016 VEST-ViOb-QSG-001, REV A To High Power connector on Power Control Daughter Board DC Motor 2 To brushed DC motor terminals DC Motor 1 Channel 1 GND 2 Power 2 GND 1 To external power source Power 1 Figure 4-3 Power Control Daughter Board connection 2. Plug in the Brushed DC motor Daughter Board, Stepper motor Daughter Board and/or Power Control Daughter Board to any slot on ViO Main Controller Board. 3. Plug in the RJ11 cable to ViO Main Controller Board and MPLAB Real ICE. Plug in the USB cable from MPLAB REAL ICE to PC. Installation of MPLAB REAL ICE may be required for first time use. Follow the MPLAB REAL ICE installation procedure if required. 4. Plug in the mini USB cable to ViO Main Controller Board and PC USB port to power up the ViO Main Controller Board. Check if the Power LED DS200 on the board is on. The ViO Main Controller Board is shipped with preloaded sample code, two LEDs should be toggling one after another. 5. Connect the debug port to PC with the RS232 Audio Jack cable, the output messages will be displayed on HyperTerminal (or any other serial terminal emulator). The serial port setting is as below. Baudrate = 115200 Data Bits = 8 Parity = None Stop Bits = 1 Parity Error Char = ignore With an Enter/Space key pressed on keyboard, below messages will be shown on the HyperTerminal: ===================================================== Welcome to evaluate ViO! V1.0 #1 slot: STEPPER , Model:0 #2 slot: POWER Page 17 , Model:0 APC Proprietary Information March 31, 2016 VEST-ViOb-QSG-001, REV A #3 slot: Brushed DC, Model:0 #4 slot: STEPPER , Model:0 #5 slot: No card #6 slot: Brushed DC, Model:0 #7 slot: SENSOR , Model:0 RS232 display stopped. Press Enter/Space to restart. High voltage output is OFF. Press S/s key to turn on. ===================================================== This mini console allows the user to start/stop the message display while the tests are running. High voltage output to all motors can be turned on/off with an S/s key. For safety consideration, all high power output to motors is turned off by default. When high voltage output is turned on, all motors will run from low speed to high speed, then back to low speed, and repeat the sequence forever. Note: a) The connection on brushed DC motor is quite straight forward. Whereas for stepper motor, if the motor is not running, please check the winding connection on data sheet again. Do monitor the stepper motor temperature if the motor is not running, because high winding temperature may damage the motor. b) Power Control Daughter Board is supposed to be used as a power switcher for close/open loop control, such as pressure, temperature, liquid level etc. Sample code uses brushed DC motor as a load to demonstrate the control behaviour. 6. To re-program the ViO Main Controller Board, proceed to the following steps. 7. Launch MPLAB 8 or MPLABX sample code project. (a) On MPLAB X IDE, go to ‘Run’ Menu and select ‘Run Project(xx)’, where xx is the MPLABX project name. Code compilation will start, and follow by device programming. Page 18 APC Proprietary Information March 31, 2016 VEST-ViOb-QSG-001, REV A Select Run Project Programming complete Figure 4-4: Code programming on MPLABX (b) On MPLAB 8 IDE, go to ‘Programmer’ Menu, choose ‘Select Programmer->REAL ICE’. Then choose ‘Build All’ button from toolbar. Code compilation will start, and follow by device programming. If programming does not start, use the ‘Program’ button. Page 19 APC Proprietary Information March 31, 2016 VEST-ViOb-QSG-001, REV A Select REAL ICE Build All Program Programming complete Figure 4-5: Code programming on MPLAB 8 8. If no changes is made to motor control test function, the motors should start running again upon successful programming. Page 20 APC Proprietary Information March 31, 2016 VEST-ViOb-QSG-001, REV A 5 REVISION HISTORY Version A Page 21 Date Released March 31, 2016 Changes First official release. APC Proprietary Information March 31, 2016 VEST-ViOb-QSG-001, REV A 6 LEGAL NOTICES The signed agreement between Purchaser and APC will govern the sale and purchase of APC’s Venture Embedded Solutions Technology (“VEST”) products (“Products”). In the event that no agreement has been concluded, APC’s terms and conditions of supply will apply. Testing and other quality control techniques are used to the extent that APC deems necessary to support its warranty. Except where required by law, specific testing of all parameters of each Product is not necessarily performed. Purchaser must provide adequate design and operating safeguards to minimize inherent or procedural and technical risks associated with Purchaser products and applications. Purchaser is solely responsible for its selection and use of APC Products. APC assumes no liability for applications assistance, Purchaser product design or any incompatibility of the Product with Purchaser product. Products supplied by APC are not designed, intended or authorized for use in life support, life sustaining, medical systems or devices, aircraft navigation, nuclear, or other applications, including, but not limited to, public transportation operating systems, in which the failure of such Products could reasonably be expected to result in personal injury, loss of life or severe property or environmental damage. Purchaser acknowledges that use of APC’s Products in such product applications is understood to be fully at the risk of Purchaser and that Purchaser is responsible for verification and validation of the suitability of APC’s Products in such applications. Purchaser agrees that APC is not and shall not be liable, in whole or in part, for any claim or damage arising from use in such applications. Purchaser agrees to indemnify, defend and hold APC harmless from and against any and all claims, damages, losses, costs, expenses and liabilities arising out of or in connection with any such use or application. APC retains all rights to all proprietary intellectual property in the Products and associated manufacturing processes and has the right to file for and obtain intellectual property protection for same. Page 22 APC Proprietary Information March 31, 2016
© Copyright 2026 Paperzz