Part Number Hot Search : 
CD4735A N4403 VTD34 4N24U ON2872 MAX1894 4027B MBR304
Product Description
Full Text Search
 

To Download USAB10SM78K0S Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  sm78k series ver. 2.30 or later system simulator external part user open interface specifications user?s manual target devices 78k/0 series 78k/0s series 78k/iv series printed in japan document no. u15802ej1v0um00 (1st edition) date published february 2002 n cp(k) ? 2002
user?s manual u15802ej1v0um 2 [memo]
user?s manual u15802ej1v0um 3 pentium is a trademark of intel corporation. windows, windows nt, and ms-dos are either registered trademarks or trademarks of microsoft corporation in the united states and/or other countries. pc/at is a trademark of international business machines corporation.
user?s manual u15802ej1v0um 4 m8e 00. 4 the information in this document is current as of october, 2001. the information is subject to change without notice. for actual design-in, refer to the latest publications of nec's data sheets or data books, etc., for the most up-to-date specifications of nec semiconductor products. not all products and/or types are available in every country. please check with an nec sales representative for availability and additional information. no part of this document may be copied or reproduced in any form or by any means without prior written consent of nec. nec assumes no responsibility for any errors that may appear in this document. nec does not assume any liability for infringement of patents, copyrights or other intellectual property rights of third parties by or arising from the use of nec semiconductor products listed in this document or any other liability arising from the use of such products. no license, express, implied or otherwise, is granted under any patents, copyrights or other intellectual property rights of nec or others. descriptions of circuits, software and other related information in this document are provided for illustrative purposes in semiconductor product operation and application examples. the incorporation of these circuits, software and information in the design of customer's equipment shall be done under the full responsibility of customer. nec assumes no responsibility for any losses incurred by customers or third parties arising from the use of these circuits, software and information. while nec endeavours to enhance the quality, reliability and safety of nec semiconductor products, customers agree and acknowledge that the possibility of defects thereof cannot be eliminated entirely. to minimize risks of damage to property or injury (including death) to persons arising from defects in nec semiconductor products, customers must incorporate sufficient safety measures in their design, such as redundancy, fire-containment, and anti-failure features. nec semiconductor products are classified into the following three quality grades: "standard", "special" and "specific". the "specific" quality grade applies only to semiconductor products developed based on a customer-designated "quality assurance program" for a specific application. the recommended applications of a semiconductor product depend on its quality grade, as indicated below. customers must check the quality grade of each semiconductor product before using it in a particular application. "standard": com puters, office equipment, communications equipment, test and measurement equipment, audio and visual equipment, home electronic appliances, machine tools, personal electronic equipment and industrial robots "special": transportation equipment (automobiles, trains, ships, etc.), traffic control systems, anti-disaster systems, anti-crime systems, safety equipment and medical equipment (not specifically designed for life support) "specific": aircraft, aerospace equipment, submersible repeaters, nuclear reactor control systems, life support systems and medical equipment for life support, etc. the quality grade of nec semiconductor products is "standard" unless otherwise expressly specified in nec's data sheets or data books, etc. if customers wish to use nec semiconductor products in applications not intended by nec, they must contact an nec sales representative in advance to determine nec's willingness to support a given application. (note) (1) "nec" as used in this statement means nec corporation and also includes its majority-owned subsidiaries. (2) "nec semiconductor products" means any semiconductor product developed or manufactured by or for nec (as defined above). ? ? ? ? ? ?
user ? s manual u15802ej1v0um 5 regional information some information contained in this document may vary from country to country. before using any nec product in your application, piease contact the nec office in your country to obtain a list of authorized representatives and distributors. they will verify: ? device availability ? ordering information ? product release schedule ? availability of related technical literature ? development environment specifications (for example, specifications for third-party tools and components, host computers, power plugs, ac supply voltages, and so forth) ? network requirements in addition, trademarks, registered trademarks, export restrictions, and other legal issues may also vary from country to country. nec electronics inc. (u.s.) santa clara, california tel: 408-588-6000 800-366-9782 fax: 408-588-6130 800-729-9288 nec electronics hong kong ltd. hong kong tel: 2886-9318 fax: 2886-9022/9044 nec electronics hong kong ltd. seoul branch seoul, korea tel: 02-528-0303 fax: 02-528-4411 nec electronics singapore pte. ltd. novena square, singapore tel: 253-8311 fax: 250-3583 nec electronics taiwan ltd. taipei, taiwan tel: 02-2719-2377 fax: 02-2719-5951 nec do brasil s.a. electron devices division guarulhos-sp, brasil tel: 11-6462-6810 fax: 11-6462-6829 j01.12 nec electronics (europe) gmbh duesseldorf, germany tel: 0211-65 03 01 fax: 0211-65 03 327 ? branch the netherlands eindhoven, the netherlands tel: 040-244 58 45 fax: 040-244 45 80 ? branch sweden taeby, sweden tel: 08-63 80 820 fax: 08-63 80 388 nec electronics (uk) ltd. milton keynes, uk tel: 01908-691-133 fax: 01908-670-290 nec electronics italiana s.r.l. milano, italy tel: 02-66 75 41 fax: 02-66 75 42 99 nec electronics (france) s.a. v lizy-villacoublay, france tel: 01-3067-58-00 fax: 01-3067-58-99 nec electronics (france) s.a. representaci n en espa ? a madrid, spain tel: 091-504-27-87 fax: 091-504-28-60
user?s manual u15802ej1v0um 6 introduction target readers the contents described in this manual use the windows? 95/windows 98/windows 2000/windows nt? 32-bit application program format and this manual is therefore intended for users who have experience creating windows 95/windows 98/windows 2000/windows nt 32-bit application programs. purpose the purpose of this manual is to describe the interface specifications to enable users to create custom settings for standard external parts that cannot otherwise be used for the sm78k system simulator. the functions, programming rules, and programming steps that users need to create programs for customized parts are described in this manual. organization this manual is broadly divided into the following sections. ? general ? download ? programming ? function reference ? operations during cpu reset ? programming examples ? error messages how to use this manual it is assumed that readers of this manual have general knowledge of microcomputers and the c programming language. readers will need to have a basic knowledge of how to create windows 95/windows 98/windows 2000/windows nt 32-bit application programs. to find details of functions that can be used to create programs for customized parts: see chapter 4 function reference . to understand the meanings and causes of messages: see appendix a error messages . target products the ?sm78k? described in this manual represents the following products. product name supporting series sm78k0 8-bit single-ship microcontroller 78k/0 series (except for small-scale general-purpose products) sm78k0s 8-bit single-chip microcontroller 78k/0s series (small-scale general-purpose products) sm78k4 16-bit single-chip microcontroller 78k/iv series also, the description ?78kx? in this manual should be replaced as follows according to the system simulator used.
user?s manual u15802ej1v0um 7 system simulator used description in this manual actual name sm78k0 78kx 78k0 sm78k0s 78kx 78k0s sm78k4 78kx 78k4 example replace ?su78kx.dll? as follows. for 78k0: su78k0.dll for 78k0s: su78k0s.dll for 78k4: su78k4.dll conventions data significance: higher digits on the left and lower digits on the right note : footnote for item marked with note in the text caution : information requiring particular attention remark : supplementary information numerical representation: binary ? xxxx or xxxxb decimal ... xxxx hexadecimal ? 0xxxxx prefix indicating the power of 2 (address space, memory capacity): k (kilo): 2 10 = 1024 m (mega): 2 20 = 1024 2
user?s manual u15802ej1v0um 8 related documents refer to the documents listed below when using this manual. the related documents indicated in this publication may include preliminary versions. however, preliminary versions are not marked as such. documents related to 78k series development tools (user?s manuals) document name document no. operation u14871e cc78k0s c compiler ver. 2.30 or later language u14872e operation u14297e cc78k0 c compiler ver. 3.30 or later language u14298e operation u15557e cc78k4 c compiler ver. 2.20 or later language u15556e operation u14876e language u14877e ra78k0s assembler package structured assembly language u11623e operation u14445e language u14446e ra78k0 assembler package structured assembly language u11789e operation u15254e language u15255e ra78k4 assembler package structured assembler preprocessor u11743e sm78k series system simulator ver. 2.30 or later operation (windows based) u15373e sm78k series system simulator ver. 2.30 or later external part user open interface specifications this manual id78k series integrated debugger ver. 2.30 or later operation (windows based) u15185e fundamental u11537e rx78k0 real-time os installation u11536e fundamental u10603e rx78k4 real-time os installation u10604e project manager ver. 3.12 or later (windows based) u14610e
user?s manual u15802ej1v0um 9 contents chapter 1 general ........................................................................................................... ..............13 1.1 general description of external part user open interface specifications .........................13 1.2 general description of user custom parts............................................................................13 1.2.1 types of customization .................................................................................................... ............13 1.2.2 user-created files........................................................................................................ .................13 1.2.3 positioning of user-customized parts ...................................................................................... .....14 1.3 environment ................................................................................................................. .............15 1.3.1 development environment ................................................................................................... ........15 1.3.2 operating environment ..................................................................................................... ...........15 1.4 cautions when transferring external parts created by sm78k series ver. 1.42 or earlier to ver. 2.30 or later .................................................................................................. ....15 1.4.1 change of sources ........................................................................................................ ....................15 1.4.2 change of make environment ............................................................................................... ............15 chapter 2 download .......................................................................................................... ...........16 2.1 download .................................................................................................................... ...............17 2.2 unload ...................................................................................................................... ..................17 chapter 3 programming....................................................................................................... ........18 3.1 programming configuration and processing flow...............................................................18 3.1.1 customization via parts window ............................................................................................ ......18 3.1.2 customization via user window............................................................................................. .......19 3.2 steps in creation of customized parts...................................................................................21 3.2.1 customization via parts window ............................................................................................ ......21 3.2.2 customization via user window............................................................................................. .......21 3.3 basic rules................................................................................................................. ...............23 3.3.1 user functions ............................................................................................................ ..................23 3.3.2 external variables ........................................................................................................ ................23 3.3.3 function names ............................................................................................................ ...............23 3.3.4 active high/low ........................................................................................................... ..................23 3.3.5 pin names ................................................................................................................. ...................24 3.3.6 include file, source file................................................................................................. ................24 3.4 module definition (def) file ................................................................................................ ....24 3.4.1 exports declaration ....................................................................................................... ..........24 chapter 4 function reference ............................................................................................... .25 4.1 customization via parts window .............................................................................................2 5 4.2 customization via user window .............................................................................................51 chapter 5 operations during cpu reset ...........................................................................81 5.1 parts customized via parts window.......................................................................................81
user?s manual u15802ej1v0um 10 5.2 parts customized via user window ........................................................................................81 chapter 6 programming examples .........................................................................................82 6.1 example of parts customized via parts window...................................................................83 6.1.1 description of samples .................................................................................................... .............83 6.1.2 source examples ........................................................................................................... ..............84 <1> target program .............................................................................................................. .....84 <2> custom part source file upsw00.c....................................................................................85 <3> definition file upsw00.def................................................................................................ .87 <4> make file upsw00.mak .....................................................................................................8 8 6.2 example of parts customized via user window....................................................................92 6.2.1 description of samples .................................................................................................... .............92 6.2.2 source examples ........................................................................................................... ..............93 <1> target program .............................................................................................................. .....93 <2> custom part source file uoport.c......................................................................................94 <3> definition file uoport.def................................................................................................ .101 <4> make file uoport.mak .....................................................................................................1 02 appendix a error messages .................................................................................................. ..106 a.1 error processing ............................................................................................................ .........106 a.2 error and warning messages.................................................................................................1 06
user?s manual u15802ej1v0um 11 list of figures figure no. title page 1-1 configuration diagram of 78kx series simulator ............................................................................ ......14 2-1 sm78kx simulator parts window ..........................................................................................................16 2-2 open dialog box ............................................................................................................................... .....17 3-1 programming configuration and processing flow for customization via parts window .......................18 3-2 programming configuration and processing flow for customization via user window ........................20 3-3 creation flow ............................................................................................................. ............................22 4-1 push buttons .............................................................................................................. ............................26 4-2 toggle buttons ............................................................................................................................... ........27 4-3 group select buttons .............................................................................................................................29 4-4 bitmap images for inactive led (left) and active led (right) ..............................................................32 4-5 pictures for inactive led (left) and active led (right) .........................................................................32 4-6 led function set per port ................................................................................................. ....................34 4-7 matrix led function....................................................................................................... ........................36 4-8 active led (left) and inactive led (right) ............................................................................................37 4-9 stepper motor ............................................................................................................................... ..........39 4-10 vertical scroll bar analog input ..............................................................................................................41 6-1 example of parts customized via parts window ...................................................................................83 6-2 example of parts customized via user window ....................................................................................92
user?s manual u15802ej1v0um 12 list of tables table no. title page 4-1 customization functions used in parts window ........................................................................................ 25 4-2 customization functions used in user window ......................................................................................... 51 5-1 parts customized via parts window during cpu reset ............................................................................ 81 a-1 error messages ............................................................................................................ ............................ 107 a-2 warning messages.......................................................................................................... ......................... 108
user?s manual u15802ej1v0um 13 chapter 1 general 1.1 general description of external part user open interface specifications in addition to simulating the operations of the actual target system, the sm78kx can simulate the operations of a dummy target system. standard external parts are provided with the sm78kx for building a dummy target system. setup dialog boxes are also provided for each external part to enable easier implementation of standard external parts. in addition, parts that cannot be set up using a setup dialog box for standard external parts still can be implemented via user programming as user-specified external parts. the external part user open interface specifications include the function specifications for the sm78kx's interface, which the user needs to create programs for customized parts. 1.2 general description of user-customized parts 1.2.1 types of customization parts can be customized by the user's programming in the following two ways. (1) customization via parts window parts can be customized using the customization function that facilitates the creation of parts by simply giving the relevant pins and action information as parameters. based on information that is called within a user's function, the corresponding part is pasted into the parts window and all of the related simulation processing is executed. (2) customization via user window users can customize parts with functions that can be used to create parts and windows. the handle notification function for a user window can be used to enable processing of windows and input from user parts, and the simulation call function can be used to perform output display processing to user parts. 1.2.2 user-created files user-customized parts are implemented by user-created programs based on the specifications described in this manual. these user-created programs end up as dll files. the dll files for user-customized parts are loaded into the external parts gui block before simulation processing is executed.
chapter 1 general user?s manual u15802ej1v0um 14 1.2.3 positioning of user-customized parts figure 1-1. configuration diagram of 78kx series simulator debugger block user-customized external parts block (dll file) external parts block external parts user open interface block external parts gui block instruction simulation block, peripheral simulation block, peripheral gui block simulator block input from user debugger block any directive from the user that causes any function to be executed by the simulator is called a command. the debugger block provides an environment in which the user can enter such commands via the keyboard or the mouse. peripheral gui block this block provides a setup environment that enables the user to easily set the desired input information to a port via a window. dll dll stands for "dynamic link library." dlls are windows modules that contain executable code and data that can be accessed by functions within windows applications or other dlls. external parts gui block this block enables external part operations to be performed via a window. external parts block this is part of the external parts gui block, and is used to control standard external parts. user-customized external parts block this is part of the external parts gui block, and is used for user-created external parts. external parts user open interface block this is part of the external parts gui block, and is used as an interface between the external parts block and the user-customized external parts block.
chapter 1 general user ? s manual u15802ej1v0um 15 1.3 environment 1.3.1 development environment the following describes the development environment under which users write programs according to this manual's specifications in order to create dll files. hardware environment: nec pc-9821/pc98-nx series, ibm pc/at ? compatible (cpu: pentium ? 120 mhz or above is recommended) software environment: windows 95/windows 98/windows 2000/windows nt 4.0 microsoft visual c++ v5.00 or later 1.3.2 operating environment the operating environment of the simulator that loads and operates user-created files is described below. hardware environment: nec pc-9821/pc98-nx series, ibm pc/at compatible (cpu: pentium 120 mhz or above is recommended) software environment: windows 95/windows 98/windows 2000/windows nt 4.0 1.4 cautions when transferring external parts created for sm78k series ver. 1.42 or earlier to ver. 2.30 or later to use the external parts created for the ver. 1.42 or earlier versions of the sm78k series in the ver. 2.30 or later, part of the external part source needs to be modified and the external part recreated. here, the modified parts are described. 1.4.1 change of source c source is modified as follows. ? change the file to be included from uparts.h to uparts32.h. uparts32.h is in .\smp78kx\sm78kx under the sm78k installation directory (e.g. c:\nectools32). ? use diimain() instead of the libmain() or wep() functions. 1.4.2 change of make environment a new win32 make environment needs to be created. when creating a make environment in vc++, note the following two points. (1) add the uparts32.cpp file to the project. uparts32.cpp is in .\smp78kx\sm78kx under the sm78k installation directory (e.g. c:\nectools32). (2) set the single-byte alignment of structure members.
user?s manual u15802ej1v0um 16 chapter 2 download this chapter describes the steps for downloading to the simulator user-customized parts that are created as described in chapters 3 and 4. before user-customized external parts (dll files) can be actually used, they must be loaded into the simulator. to remove loaded user-customized external parts (dll files), unload them from the simulator. use the parts window to load and unload user-customized external parts (dll files). figure 2-1. sm78kx simulator parts window
chapter 2 download user?s manual u15802ej1v0um 17 2.1 download operation steps (1) in the parts window, select [customize] [l oad] from the menu bar to open the open dialog box. figure 2-2. open dialog box (2) in the open dialog box, select a customized external part dll file, then click the button. the specified dll file is then loaded into the simulator. once this has been done, the part created by the customization function in the parts window is pasted in the parts window. if the part was customized via a user window, it is displayed in a user window. (a) up to six user-customized external part dlls can be loaded into the simulator. (b) a user-customized external part dll file that is downloaded to the simulator remains valid even after the parts window is closed. the next time the parts window is opened, the same dll file will be automatically downloaded. (c) the name of the loaded user-customized external part dll file is added to the pull-down menu under the [customize] menu of the parts window. (d) the user-customized external part that is displayed in the parts window can be relocated. however, the information about the relocation cannot be saved. after relocation, if either of the following sets of operations have been performed, the location of each part is neither saved nor completed. therefore, be sure to locate each part again. y if the status is saved to a project file (xxxx.prj) or to a file to which display information for the parts window is to be saved (xxxx.pnl), and then these files are read y if the parts window is closed while customized external part dll information remains loaded, and then the parts window is opened again 2.2 unload operation steps (1) select [customize] [u nload] from the menu bar in the parts window. (2) this unloads (removes) all of the customized external part dlls that are currently loaded in the simulator. parts that have been created by the parts window's customization function are deleted from the parts window. also, if there are any programs that have been customized via a user window, the user window is closed.
user?s manual u15802ej1v0um 18 chapter 3 programming 3.1 programming configuration and processing flow this chapter describes the basic programming used for customization via the parts window and customization via a user window. 3.1.1 customization via parts window configuration the configuration includes user functions that are called only once after the dllmain function (required to create dll files) and the dll files have been loaded. function references described in chapter 4 must be included either in user functions or in functions subordinate to user functions. processing flow the simulator's external parts block is used to create parts based on the specified function's part information and performs all simulation related to parts associated with the simulator's external parts block. figure 3-1 shows the relationship between user-created dll files and external parts in the simulator, as well as the configuration of functions. figure 3-1. programming configuration and processing flow for customization via parts window called once after upusr.dll is loaded external parts block external parts user open i/f block #include #include"uparts32.h" dllmain(.....){ : } uparts_usr(){ uppushbtm(...); upmtxled(....); : } upusr.c user-customized file
chapter 3 programming user ? s manual u15802ej1v0um 19 3.1.2 customization via user window configuration the configuration includes the dllmain function (required to create dll files), the created window's callback functions, user functions, and simulation call functions that are called at a set interval during simulations. user functions and their subordinate functions are used to report simulation call functions and the motor pin names. the creation of parts and programming of i/o actions are done using the user-created window's callback functions and simulation call functions. processing flow simulation of customized parts is performed as the simulator works with the external parts block using functions that capture and set i/o information on pins and ports. the pin output information also can be redrawn (or otherwise processed) by calling simulation call functions from the external parts block. figure 3-2 shows the relationship between dll files customized via a user-created window and external parts in the simulator, as well as the configuration of functions.
chapter 3 programming user ? s manual u15802ej1v0um 20 figure 3-2. programming configuration and processing flow for customization via user window external part user open i/f is called called by external part user window's callback function called once after uousrwin.dll is loaded called once each time a simulation is executed external parts block external parts user open i/f block #include #include "uparts32.h" unsigned long psw_reg; dllmain(.....){ registerclass(); } windproc(hwnd hwnd,.....){ switch(msg){ case wm_common: switch(wparam){ case idm_btm1: upsetpin("p21",1,50); : } case wm_destroy: upcloseuserwnd(hwnd); : } } uparts_usrwin(){ int i; hwnd=createwindow(.......); upsetuserwnd(hwnd); upcallfuncname("update_usrwin"); upresetfuncname("upsur_reset"); upsaveprojname("upsave_usrproj"); uploadprojname("upload_usrproj"); i=uplnitpin("p21",high); : } update_usrwin(unsigned long simtime){ val=upgetpin("p32"); : } upusr_reset(){ : } upsave_usrproj(char far *filename ){ writeprivateprofilestring("user window",.....,filename); : } upload_usrproj(char far *filename ){ getprivateprofilestring("user dll window",.....,"filename); : } uousrwin.c user-customized file called when cpu reset occurs called when reading from project file called when saving to project file
chapter 3 programming user ? s manual u15802ej1v0um 21 3.2 steps in creation of customized parts 3.2.1 customization via parts window 1. program the external parts to be customized when creating a dll file using windows programming methods. be sure to include the file "uparts32.h" in this programming and add ? uparts32.cpp ? to the project. 2. use windows programming methods to create a module definition (def) file note , a make file, and, if necessary, a resource file, then compile to create a user-created dll file. y when compiling, specify the option (/zp1) for single-byte alignment of structure members. y specify "up" as the first two characters in the name of the created dll file. y to operate the dll file in an environment in which microsoft visual c++ is not installed, create the dll file using the released version. 3. enter the user-created dll file name in the place for specifying the simulator's external parts customization files (see 2.1 download ). 4. in addition to the standard parts that are already displayed in the parts window, the user-created customized parts are displayed. 5. set the parts window to location mode and locate the parts. 6. select [save as...] from the [f ile] menu of the parts window and save the current status so that there will not be any need to load the user-created dll files when performing the next simulation. 3.2.2 customization via user window 1. program the external parts to be customized when creating a dll file using windows programming methods. be sure to include the file "uparts32.h" in this programming and add ? uparts32.cpp ? to the project. 2. use windows programming methods to create a module definition (def) file note , a make file, and, if necessary, a resource file, then compile to create a user-created dll file. y when compiling, specify the option (/zp1) for single-byte alignment of structure members. y specify "uo" as the first two characters in the name of the created dll file. y to operate the dll file in an environment in which microsoft visual c++ is not installed, create the dll file using the released version. 3. enter the user-created dll file name in the place for specifying the simulator's external parts customization files (see 2.1 download ). 4. the window created by the user and the corresponding customized parts are displayed. note see 3.4 module definition (def) file .
chapter 3 programming user ? s manual u15802ej1v0um 22 figure 3-3. creation flow load usr.def uparts32.h usr.c upusr.dll uousr.dll external parts block compile uparts32.cpp
chapter 3 programming user ? s manual u15802ej1v0um 23 3.3 basic rules the basic rules for user programming of customized parts are described below. 3.3.1 user functions user functions are main functions that are described by users. (1) when a user-created dll file is loaded to the simulator, it becomes a function that is called by the simulator. (2) the function references described in chapter 4 must be contained in user functions or functions that are subordinate to user functions. (3) user function names are function names in which the name of the user-created dll file minus the first two characters is added to "uparts_". (4) the first two characters of the user-created dll file name are fixed. (a) customization via parts window always use "up" as the first two characters of the user-created dll file name. example : upusr.dll uparts_usr() (b) customization via user window always use "uo" as the first two characters of the user-created dll file name. example : uousr.dll uparts_usr() (5) use void type with no parameters for user functions. (6) enter an exports declaration note in the module definition file for user functions. note see 3.4.1 exports declaration . 3.3.2 external variables when using external variables, always add "up" to the start. example : int upglobal 3.3.3 function names function names are the names that are given to user-created external parts. if a function name need not be specified as the part name, enter a null string as the parameter of the function used to create the part. 3.3.4 active high/low the "active high/low" designation specifies the relation between a pin's value and its active state (when a part connected to a pin is operating). if the function used to create a part includes a parameter for specifying "active high/low," specify one of the following macros (the macros "high" and "low" are defined in uparts32.h). operation using 1 (high): high operation using 0 (low): low
chapter 3 programming user ? s manual u15802ej1v0um 24 3.3.5 pin names some of the parameters in functions used to create parts are for specifying pin names or port names. in such cases, each pin name or port name is specified as a character string, and its name should be as described in the target device's user's manual. specifications are not case sensitive. 3.3.6 include file, source file the include file ? uparts32.h ? and source file ? uparts32.cpp ? that are used for user customization are bundled in the sm78k product package. include uparts32.h and link uparts32.cpp. uparts32.h and uparts32.cpp are in . \smp78kx\sm78kx under the sm78k installation directory (e.g. c:\nectools32). y uparts32.h contains descriptions of macro definitions for active high/low status, and imports declarations for functions described in chapter 4 function reference . y when compiling, be sure to set the include path in the directory where the file "uparts32.h" is located. 3.4 module definition (def) file a module definition (def) file must be created to include the exports declaration, as described in the module definition file for windows programming. the imports declaration is already included in the file "uparts32.h" and therefore does not need to be considered. 3.4.1 exports declaration be sure to enter an exports declaration for user functions and simulation call functions. exports declarations must be entered for functions used to read or save project files, for reset functions, and some other functions. example : exports uparts_usrwin updata_usrwin
user?s manual u15802ej1v0um 25 chapter 4 function reference 4.1 customization via parts window the functions that can be pasted into the parts window to perform all simulation processing by simply calling within the user functions are listed below. these functions can be used to easily create parts simply by specifying pins and action information as parameters. note, however, that even if the user has created a window, all parts that are created by this function are still pasted in the parts window. table 4-1. customization functions used in parts window function name prototype page push-button function uppushbtm( pname, actype, btmname )26 toggle button function uptglbtm( pname, actype, btmname )27 group select button (exclusive push-button) function upselectbtm( gname, pnames, pnum, actype, btmnames )28 hold time setup function upsetpbtmtime( time )30 led function upled( pname, actype, ledname, pictype )31 led function set per port upportled( portname, actype, ledname, pictype )33 matrix led function upmtxled( pnames1, pnames2, pnum1, pnum2, actype1, actype2 )35 dc motor function updcmtr( pname, actype, mtrname )37 stepper motor function upstpingmtr( pnames, num, actype, reiji, step )38 vertical scroll bar analog input function upscaleinterad( pname, adname )40 reference voltage value setup function upsetavref( avref )42 bitmap setup function for button upsetbtmbmp( actbmp, nactbmp )43 bitmap setup function for led upsetledbmp( actbmp, nactbmp )44 bitmap setup function for dc motor upsetmtrbmp( actbmp, nactbmp )45 led picture setup function upsetledpic( type, color )46 serial pin data input function upserial_data( serpname, data, count, first , bitnum )47 window title function uppaneltitlename( title )48 bitmap display function upsetusrbmp( bmpname )49 character string display function upwritestring( string )50
chapter 4 function reference user?s manual u15802ej1v0um 26 push button function void uppushbtm( pname, actype, btmname ) char * pname ; /* pin name */ int actype ; /* active high/low */ char * btmname ; /* function name */ [function] this function creates one push button. a push button is a button icon that sets and holds the input status for a specified hold time only after the button has been clicked. the hold time is set using the hold time setup function upsetpbtmtime(). the time set in upsetpbtmtime described before this function is assumed as the hold time. if a hold time is not set, the default value of 0.5 ms is used. [parameters] pname specifies the pin name as a character string. actype specifies a value to be input using a push button. specify high to enter a "1" (high value) or low to enter a "0" (low value). btmname specifies the name of the push button function. since this function name is displayed on the button, the character string is limited to 16 single-byte characters. [return value] none [example] upsetpbtmtime(50); uppushbtm("p20",high,"start"); uppushbtm("p20",low,"stop"); figure 4-1. push buttons
chapter 4 function reference user?s manual u15802ej1v0um 27 toggle button function void uptglbtm( pname, actype, btmname ) char * pname ; /* pin name */ int actype ; /* active high/low */ char * btmname ; /* function name */ [function] this function creates one toggle button. when clicked, a toggle button sets and holds the input status until the same button is clicked again. this button's initial mode is inactive. the first time this button is clicked, the value specified by the parameter actype is input. [parameters] pname specifies the pin name as a character string. actype specifies a value to be input using the toggle button. specify high to enter a "1" (high value) or low to enter a "0" (low value). btmname specifies the name of the toggle button function. since this function name is displayed on the button, the character string is limited to 16 single-byte characters. [return value] none [example] uptglbtm("p22",high,"start"); uptglbtm("p23",low,"stop"); figure 4-2. toggle buttons
chapter 4 function reference user?s manual u15802ej1v0um 28 group select button (exclusive push button) function void upselectbtm( gname, pnames, pnum, actype, btmnames ) char * gname ; /* group name */ char ** pnames ; /* pin name */ int pnum ; /* number of buttons */ int actype ; /* active high/low */ char ** btmnames ; /* function name */ [function] several buttons can be grouped together as exclusive buttons. clicking one of the group of buttons enclosed in a frame enters an active value for the clicked button only. the entered value remains in effect until another button is clicked. in other words, there can be only one active button at a time within the button group. [parameters] gname specifies the name assigned to the group. this group name is shown at the top of the group select buttons. pnames specifies pin names (character strings) for each button. pnum specifies the number of buttons. actype specifies the value entered by clicking a group select button. specify high to enter a "1" (high value) or low to enter a "0" (low value). the active status for all group buttons is the same. btmnames specifies the names assigned to individual buttons. since this function name is displayed on the button, the character string is limited to 10 single-byte characters. [return value] none
chapter 4 function reference user?s manual u15802ej1v0um 29 [example] static char *sizepin[4] = {"p30","p31","p32","p33"}; static char *sizename[4] = {"b5","a4","b4","a3"}; upselectbtm("size", sizepin, 4, high, sizename); figure 4-3. group select buttons
chapter 4 function reference user?s manual u15802ej1v0um 30 hold time setup function void upsetpbtmtime( time ) char * time ; /* hold time */ [function] this function specifies the hold time for a push button. [parameter] time sets a hold time character string. the unit for this setting is ms (milliseconds). the range of settings is 0.001 to 999 ms. [return value] none [example] upsetpbtmtime("0.2");
chapter 4 function reference user?s manual u15802ej1v0um 31 led function void upled( pname, actype, ledname, pictype ) char * pname ; /* pin name */ int actype ; /* active high/low */ char * ledname ; /* function name */ char pictype ; /* picture type */ [function] this function creates one led. when the specified pin's status is active, an active bitmap (or color picture) is displayed. when the pin's status is inactive, an inactive bitmap (or colorless picture) is displayed. [parameters] pname specifies the pin name as a character string. actype specifies the value to be displayed on the led. specify high for active high or low for active low. ledname specifies the led's function name. this function name is shown on the led. there is no limit on the number of characters. pictype specifies the type of picture (or bitmap image) used in the led display. if 1: the default bitmap type is a light bulb-type bitmap image. however, any bitmap specified by the upsetledbmp() function is displayed instead of the default bitmap. if 0: the default picture type is a rectangular picture. any picture specified by the upsetledpic() function is displayed instead of the default picture. [return value] none
chapter 4 function reference user?s manual u15802ej1v0um 32 [example] upled("p40",low,"reserved",1); upled("p21",high,"power",1); figure 4-4. bitmap images for inactive led (left) and active led (right) upled("p41",low,"l",0); upled("p22",high,"h",0); figure 4-5. pictures for inactive led (left) and active led (right)
chapter 4 function reference user?s manual u15802ej1v0um 33 led function set per port void upportled( portname, actype, ledname, pictype ) char * portname ; /* port name */ unsigned char actype ; /* active high/low */ char * ledname ; /* function name */ char pictype ; /* picture type */ [function] this function creates a set of leds corresponding to pins assigned to a particular port (eight leds make one set). an active bitmap (or color picture) is displayed for each pin that is active and an inactive bitmap (or colorless picture) is displayed for each pin that is inactive. [parameters] portname specifies the port name as a character string. actype specifies the value for displaying an active bitmap. specify "1" if a value of "1" (high) is active or specify "0" if a value of "0" (low) is active. the 8-bit data that sets the status of eight leds is specified bitwise. values are specified bitwise for 8 bits, starting from the port's lowest pin as the lsb. example when p30 and p31 are active low for port 3's led and all other pins are active high set the lower 2 bits of actype to 0: upportled("p3", 0xfc, "number", 1); ledname specifies a name to be assigned to an led. this function name is shown below the bitmap. there is no limit on the number of characters. pictype specifies the picture type used in the led display. "1" specifies bitmap and "0" specifies a rectangular picture. [return value] none
chapter 4 function reference user?s manual u15802ej1v0um 34 [example] upportled("p3",0xfc,"number",1); figure 4-6. led function set per port left pin name is not shown.
chapter 4 function reference user ? s manual u15802ej1v0um 35 matrix led function void upmtxled( pnames1, pnames2, pnum1, pnum2, actype1, actype2 ) char ** pnames1 ; /* output 1 pin names */ char ** pnames2 ; /* output 2 pin names */ int pnum1 ; /* output 1 pin number */ int pnum2 ; /* output 2 pin number */ int actype1 ; /* active high/low for output 1*/ int actype2 ; /* active high/low for output 2*/ [function] this function creates an led on a matrix. when any intersection is active on the matrix of the output 1 and output 2 pins, a matrix led showing the active bitmap is created (the active bitmap is fixed and cannot be specified). [parameters] pnames1 specifies the output 1 pin names (character strings) for all output 1 pins only. pnames2 specifies the output 2 pin names (character strings) for all output 2 pins only. pnum1 specifies the number of output 1 pins. pnum2 specifies the number of output 2 pins. actype1 specifies the value for displaying output 1. specify high for active high status or low for active low status. the active status for output 1 is the same for all output 1 pins. actype2 specifies the value for displaying output 2. specify "high" for active high status or "low" for active low status. the active status for output 2 is the same for all output 2 pins. [return value] none
chapter 4 function reference user ? s manual u15802ej1v0um 36 [example] static char *out1[4] = {"p30","p31","p32","p33"}; static char *out2[4] = {"p24","p25","p26","p27"}; upmtxled(out1, out2, 4, 4, high, high); figure 4-7. matrix led function pin names are not shown
chapter 4 function reference user ? s manual u15802ej1v0um 37 dc motor function void updcmtr( pname, actype, mtrname ) char * pname ; /* pin name */ int actype ; /* active high/low */ char * mtrname ; /* function name */ [function] this function creates a dc motor icon. an active bitmap is displayed when the specified pin becomes active, and an inactive bitmap is displayed when the specified pin is inactive. this function also displays the total active time that has elapsed since the start of a simulation. the displayed time is based on the main system clock. when a reset occurs or when the elapsed time value exceeds a 10-digit decimal value, the displayed time is cleared to zero. [parameters] pname specifies the pin name as a character string. actype specifies the status when the motor is displayed as active. specify high for active high status or low for active low status. mtrname specifies the dc motor function's name. this function name is shown under the motor icon. there is no limit on the number of characters. [return value] none [example] updcmtr("p41",high,"motor"); figure 4-8. active led (left) and inactive led (right)
chapter 4 function reference user ? s manual u15802ej1v0um 38 stepper motor function void upstpingmtr( pnames,num,actype,,reiji,step ) char ** pnames ; /* pin names */ int num ; /* number of pins per channel */ int actype ; /* active high/low */ char reiji ; /* excitation method */ short step ; /* minimum step angle */ [function] this function creates a stepper motor that is operated via several pins. the motor is displayed according to its direction of rotation, with the rotation speed and step angles. [parameters] pname specifies pin names (character strings) for all pins. num specifies the number of pins per channel (4 or 8). actype specifies the status when the motor is displayed as active. specify high for active high status or low for active low status. the active status is the same for all pins. reiji specifies the excitation method. set "0" for single phase or "1" for single/dual phase. step specifies an integer fraction of 360 as the minimum step angle. [return value] none [remarks] once operation of this function is started, the first value other than zero that is output to a connected pin is taken as the initial value. at that point, the stepper motor is shown as stopped (not rotating).
chapter 4 function reference user ? s manual u15802ej1v0um 39 [example] char *mtrpin[4] = {"p00","p01","p02","p03"}; upstpingmtr(mtrpin, 4,high,1,10); figure 4-9. stepper motor mark and red motor means positive rotation green motor means stopped mark and yellow motor means negative rotation number of positive revolutions number of negative revolutions rotation angle
chapter 4 function reference user ? s manual u15802ej1v0um 40 vertical scroll bar analog input function void upscaleinterad( pname, adname ) char * pname ; /* pin name */ char * adname ; /* function name */ [function] this function creates an analog input part for a vertical scroll bar. move the scroll box and right-click the mouse over the scroll bar to enable input of analog data. input values are used to create a part that is shown in red. [parameters] pname specifies the name of an analog input pin as a character string. adname specifies the function name of the scroll-bar-type input part. this function name is displayed above the scroll-bar-type input part and there is no limit on the number of characters. [return value] none [remarks] the scroll bar's operating range is determined either by settings made via the reference voltage value setup function upsetavref() or by the reference voltage value settings made via the standard level gauge pin setting dialog box note . if neither of these settings have been made, the default value of 5.0 v is used. note see chapter 6 window reference in the sm78k series system simulator ver.2.30 or later operation (windows based) (u15373e) .
chapter 4 function reference user ? s manual u15802ej1v0um 41 [example] upscaleinterad("ani1","voltage"); figure 4-10. vertical scroll bar analog input
chapter 4 function reference user ? s manual u15802ej1v0um 42 reference voltage value setup function void upsetavref( avref ) char * avref ; /* reference voltage value */ [function] this function sets the reference voltage value for the a/d converter. this reference voltage value is used to determine the operating range for an analog input part. any setting that is within the range for the operating power supply voltage (see the user's manual of each device) can be set. values can be set to the first decimal place, with subsequent decimal places rounded off. [parameter] avref specifies the reference voltage value as a character string. [return value] none [remarks] if this function or the standard setting is not set, the analog input part will operate using the default voltage value of 5.0 v. [example] upsetavref("3.5");
chapter 4 function reference user ? s manual u15802ej1v0um 43 bitmap setup function for button void upsetbtmbmp( actbmp,nactbmp ) char * actbmp ; /* active bitmap name character string */ char * nactbmp ; /* inactive bitmap name character string */ [function] this function sets the bitmap for a button. the button display can be changed by entering this function immediately before the target button's function. the same bitmap will be displayed until it is set again by this function. the bitmap file should be stored in the same directory as the simulator or its name should be specified with the full path. [parameters] actbmp specifies a character string for the bitmap file name displayed when active. nactbmp specifies a character string for the bitmap file name displayed when inactive. [return value] none [remarks] if a button function is described without describing this function first, the standard button's bitmap is displayed (see the image shown in figure 4-1 ). the button name is not shown when setting this function. [example] upsetbtmbmp("on.bmp","off.bmp"); uppushbtm("p21",low,"start");
chapter 4 function reference user ? s manual u15802ej1v0um 44 bitmap setup function for led void upsetledbmp( actbmp,nactbmp ) char * actbmp ; /* active bitmap name character string */ char * nactbmp ; /* inactive bitmap name character string */ [function] this function sets the bitmap for an led. the led display can be changed by entering this function immediately before the target led's function. this function is valid only if the bitmap has been specified by an led function. the same bitmap will be displayed until it is set again by this function. the bitmap file should be stored in the same directory as the simulator or its name should be specified with the full path. [parameters] actbmp specifies a character string for the bitmap file name displayed when active. nactbmp specifies a character string for the bitmap file name displayed when inactive. [return value] none [remarks] if an led function is described without describing this function first, the standard led's bitmap is displayed (see the image shown in figure 4-4 ). [example] upsetledbmp("lighton.bmp","lightoff.bmp"); upled("p31",high,"power",1);
chapter 4 function reference user ? s manual u15802ej1v0um 45 bitmap setup function for dc motor void upsetmtrbmp( actbmp,nactbmp ) char * actbmp ; /* active bitmap name character string */ char * nactbmp ; /* inactive bitmap name character string */ [function] this function sets the bitmap for a dc motor. the dc motor display can be changed by entering this function immediately before the target dc motor's function. the same bitmap will be displayed until it is set again by this function. the bitmap file should be stored in the same directory as the simulator or its name should be specified with the full path. [parameters] actbmp specifies a character string for the bitmap file name displayed when active. nactbmp specifies a character string for the bitmap file name displayed when inactive. [return value] none [remarks] if a dc motor function is described without describing this function first, the standard dc motor's bitmap is displayed (see the image shown in figure 4-8 ). [example] upsetmtrbmp("trun.bmp","stop.bmp"); updcmtr("p32",high,"motor");
chapter 4 function reference user ? s manual u15802ej1v0um 46 led picture setup function void upsetledpic( type,color ) char type ; /* picture type */ char color ; /* picture fill color when active */ [function] this function sets the type of picture and fill color (when active) to be used in an led display. the led display can be changed by entering this function immediately before the target led's function. this function is valid only if a picture has been specified by an led function. the same picture will be displayed until it is set again by this function. [parameters] type specifies the type of picture (macro is defined in uparts32.h). macro pic_rect: rectangle macro pic_ell: ellipse color specifies fill color when active (macro is defined in uparts32.h). macro pic_red: red macro pic_yellow: yellow macro pic_green: green [return value] none [example] upsetledpic(pic_rect,pic_green); upled("p32",high,"test",0);
chapter 4 function reference user ? s manual u15802ej1v0um 47 serial pin data input function void upserial_data( serpname,data,count,first,bitnum ) char *serpname ; /* serial pin name character string */ unsigned short * data ; /* pointer to data array */ unsigned short count ; /* number of data arrays */ char first ; /* first bit (msb or lsb)*/ char bitnum ; /* number of bits in transfer data */ [function] this function sets values in order starting from the specified first data bit, using the number of bits in the data transferred to the serial pin as one unit. [parameters] serpname specifies the character string for the name of the serial data input pin. data specifies a pointer to an array in which the value set to the serial data input pin has been stored in units consisting of the number of transfer data bits. count specifies the number of arrays in which values set to the serial data input pin have been stored in units consisting of the number of transfer data bits. first specifies whether data equivalent to the number of bits in the transfer data will be set sequentially with the msb first or the lsb first. specify "1" to set sequentially with the msb first and specify "0" to set sequentially with the lsb first. bitnum specifies the number of bits in the transfer data. when using uart (universal asynchronous receiver/transmitter), the start bit, parity bit, and stop bit are included in the data and data bit count. [return value] none [example] to set 8-bit data sequentially from lsb first to serial pin ser1: unsigned short data[3] = {0xff, 0xa0, 0x3b}; upserial_data("ser1",data,3,0,8); the data is input to ser1 as shown below. 111111110000010111011100
chapter 4 function reference user ? s manual u15802ej1v0um 48 window title function void uppaneltitlename( title ) char * title ; /* title name */ [function] this function displays a name in the title bar of the parts window. [parameter] title specifies the character string for the name to be displayed in the title bar of the parts window. [return value] none [example] uppaneltitlename("system for printer");
chapter 4 function reference user ? s manual u15802ej1v0um 49 bitmap display function void upsetusrbmp( bmpname ) char * bmpname ; /* bitmap file name */ [function] this function displays a bitmap that is always displayed, unrelated to simulations. the bitmap is displayed to the right of the part that is at the bottom right in the set of currently displayed parts. if there is not enough room in the window to display the bitmap to the right of the bottom right part, it is displayed below the bottom right part. [parameter] bmpname specifies a character string as the bitmap file name. bitmap file names should be specified using the file names in the same directory as the simulator or with the full path. [return value] none [ example ] upsetusrbmp("printer.bmp");
chapter 4 function reference user ? s manual u15802ej1v0um 50 character string display function void upwritestring( string ) char * string ; /* character string to be displayed */ [funct i on] this function displays a character string. the character string is displayed to the right of the part that is at the bottom right in the set of currently displayed parts. if there is not enough room in the window to display the character string to the right of the bottom right part, it is displayed below the bottom right part. [parameter] string specifies the character string to be displayed. there is no limit on the number of characters. [return value] none [example] upwritestring("power");
chapter 4 function reference user?s manual u15802ej1v0um 51 4.2 customization via user window the following functions are provided to enable the user to freely customize user-created windows and parts. the handle notification function for user windows can be used to enable processing of windows and input from user parts, and the simulation call function can be used to perform output display processing to user parts. table 4-2. customization functions used in user window function name prototype page window handle notification function upsetuserwnd( huwnd )52 window close function upcloseuserwnd( hwnd )53 simulation call function upcallfuncname( fname )54 motor pin notification function upinitmtrpin( pname,actype )55 stepper motor notification function upinitstpingmtr( pname, num, actype, reiji, step )56 pin active value notification function upinitpin( pname, actype )57 port active value notification function upinitport( portname, actype )58 ad input pin notification function upinitad( pname )59 project file read function name notification function uploadprojname( funcname )60 project file save function name notification function upsaveprojname( funcname )61 reset function name notification function upresetfuncname( funcname )62 pin value capture function upgetpin( pname, val )63 port data capture function upgetport( portname, data )64 da output pin value capture function upgetda( pname, val )65 memory area data capture function upgetmem( addr, data )66 dc motor active time clear function upclrmtracclk( pname )67 stepper motor information capture function upgetstpingmtr( pnames, num, posrev, negrev, angle )68 control register data capture function upgetreg ( type )69 value setting function for pins upsetpin( pname, val, time )70 data setting function for ports upsetport( portname, data, time )71 value setting function for ad input pin upsetad( pname, val )72 data setting function for memory area upsetmem( addr, data )73 active time notification function for motor upgetmtracclk( pname, val, actime )74 data setting function for control register upsetreg ( type, data )75 time conversion notification for one main system clock pulse upsimtimesec( void )76 function for transmitting packets from host using usb function upsetusbpack( total, total_bit, data )77 function for receiving packets from function using usb function upgetusbpack( total, data )78 function for transmitting signals from host using usb function upsetusbsig( sig )79 function for receiving signals from function using usb function upgetusbsig( sig )80
chapter 4 function reference user?s manual u15802ej1v0um 52 window handle notification function void upsetuserwnd(huwnd) handle huwnd ; /* handle of user window */ [function] this function notifies the simulator of a user-created window handle. the user should describe this function immediately after creating a window. [parameter] huwnd handle of a user-created window [return value] none [example] hwnd hwnd; hwnd = createwindow(........); upsetuserwnd(hwnd);
chapter 4 function reference user?s manual u15802ej1v0um 53 window close function void upcloseuserwnd( hwnd ) hwnd hwnd ; /* handle of window to be closed */ [function] this function notifies the simulator that a user-created window is being closed. this function is described with the user-created window callback function's message wm_destroy. [parameter] hwnd handle of user-created window to be closed [return value] none [example] wm_destroy: : : upcloseuserwnd(hwnd);
chapter 4 function reference user?s manual u15802ej1v0um 54 simulation call function void upcallfuncname( fname ) char * fname ; /* simulation call function name */ [function] this function reports the name of the function that is called from the simulator at a specified interval note during simulation. this function must be described within the user function uparts_xxx(). note this function is called once per command execution. [parameter] fname specifies the name of the function called from the simulator. [return value] none [remarks] the simulation call function should be specified as follows in the function specifications. the simulation's execution time is received via an unsigned long type parameter. the simulation's execution time is time that has elapsed since the previous function call, and its measurement unit is the main system clock. be sure to enter an exports declaration (see 3.4.1 exports declaration ) in a module definition file for the simulation call function. void far pascal update_usrwin(unsigned long simtime) [example] upcallfuncname("update_usrwin");
chapter 4 function reference user?s manual u15802ej1v0um 55 motor pin notification function void upinitmtrpin( pname,actype ) char * pname ; /* pin name */ int actype ; /* active high/low */ [function] this function reports the pin name specified for the motor to capture the motor value and active time via the active time notification function for motor. when using the motor pin, this function must be described within the user function uparts_xxx(). when not using the motor pin, there is no need to describe this function. [parameters] pname specifies a character string as the pin name connected to the motor. actype specifies that the motor is in active mode. specify high for active high status or low for active low status. [return value] none [remarks] unless notification is already included in the user function, even if the information is captured by the active time notification function for motor upgetmtracclk() during a simulation, the captured value is not guaranteed. [example] upinitmtrpin("p41",high)
chapter 4 function reference user?s manual u15802ej1v0um 56 stepper motor notification function int upinitstpingmtr( pnames,num,actype,reiji,step ) char ** pnames ; /* pin name */ int num ; /* number of pins per channel */ int actype ; /* active high/low */ char reiji ; /* excitation method */ short step ; /* minimum step angle */ [function] this function connects a stepper motor that is operated via several pins to the specified pin. when using the stepper motor, this function must be described within the user function uparts_xxx(). when not using the stepper motor, there is no need to describe this function. [parameters] pnames specifies pin names (character strings) for all pins. num specifies the number of pins per channel (4 or 8). actype specifies the status when the motor is displayed as active. specify high for active high status or low for active low status. the active status is the same for all pins. reiji specifies the excitation method. set "0" for single phase or "1" for single/dual phase. step specifies an integer fraction of 360 as the minimum step angle. [return value] if set correctly: 1 if not set correctly: 0 [example] char *mtrpin[4] = {"p00","p01","p02","p03"}; upinitstpingmtr(mtrpin, 4,high,1,10);
chapter 4 function reference user?s manual u15802ej1v0um 57 pin active value notification function int upinitpin( pname,actype ) char * pname ; /* pin name */ int actype ; /* active value of pin */ [function] this function sets the active mode value for one pin. when there is a value to be input for a pin, this function must be described within the user function uparts_xxx(). when there is no value to be input for a pin, there is no need to describe this function. [parameters] pname specifies the pin name as a character string. actype specifies the active value of a pin. specify high for active high status or low for active low status. [return value] if pin's active value was set correctly: 1 if pin's active value was not set correctly: 0 [example] when set to operate when the pin p46 is active high (when the input value = 1): int ret; ret=upinitpin(?p46?,high);
chapter 4 function reference user?s manual u15802ej1v0um 58 port active value notification function int upinitport( portname,actype ) char * portname ; /* port name */ unsigned char actype ; /* active value of port */ [function] this function sets the active mode value for one port. when there is a value to be input for a port, this function must be described within the user function uparts_xxx(). when there is no value to be input for a port, there is no need to describe this function. [parameters] portname specifies the port name as a character string. actype specifies the active value for each pin of a port. specify "1" for port pins that have active high status or "0" for port pins that have active low status. values are specified bitwise for 8 bits, starting from the port's lowest pin as the lsb. [return value] if port's active value was set correctly: 1 if port's active value was not set correctly: 0 [example] when port 4's pins p40 and p41 are set as active high and pins p42 to p47 are set as active low: int ret; ret=upinitport(?p4?,0x03); when port 2's pin p27 only is set as active high and pins p20 to p26 are set as active low: int ret; ret=upinitport(?p2?,0x80);
chapter 4 function reference user?s manual u15802ej1v0um 59 ad input pin notification function int upinitad( pname ) char * pname ; /* ad input pin name */ [function] this function notifies the simulator of the ad input pin used to input a value from the user open interface function. if upsetad() includes a value to be input to the ad input pin, this function must be described within the user function uparts_xxx(). when the user open interface function does not include a value to be input to the ad input pin, there is no need to describe this function. [parameter] pname specifies the ad input pin name as a character string. [return value] normal end: 1 abnormal end: 0 (if the ad input pin does not exist in a device used in the current simulation) [example] upinitad(?ani0");
chapter 4 function reference user?s manual u15802ej1v0um 60 project file read function name notification function void uploadprojname( funcname ) char * funcname ; /* project file read function name */ [function] when the simulator's project file is being read, this function reports the name of the function that simultaneously reads the information in the user window from the project file. this function must be described within the user function uparts_xxx(). [parameter] funcname specifies the name of the function that reads the project file that has been called from the simulator. [return value] none [remarks] the project file read function's specifications are as follows. y the project file name character string is received via the char far* type parameter. y user window information is also read from the file named by the project file name that was received via the parameter. at that time, select either the getprivateprofilestring or getprivateprofileint function for the library used in the read operation. y the section name used by the user is "user dll window". y an exports declaration is required in a module definition file for the project file read function. void far pascal upload_usrproj(char far *filename) [example] uploadprojname(?upload_usrproj?);
chapter 4 function reference user?s manual u15802ej1v0um 61 project file save function name notification function void upsaveprojname( funcname ) char * funcname ; /* project file save function name */ [function] when the simulator's project file is being saved, this function reports the name of the function that simultaneously saves the information in the user window to the project file. this function must be described within the user function uparts_xxx(). [parameter] funcname specifies the name of the function that saves the project file that has been called from the simulator. [return value] none [remarks] the project file save function's specifications are as follows. y the project file name character string is received via the char far* type parameter. y user window information is also written to the file named by the project file name that was received via the parameter. at that time, select the writeprivateprofilestring function for the library used in the write operation. y the section name used by the user is "user dll window". y an exports declaration is required in a module definition file for the project file save function. void far pascal upsave_usrproj(char far *filename) [example] upsaveprojname(?upsave_usrproj?);
chapter 4 function reference user?s manual u15802ej1v0um 62 reset function name notification function void upresetfuncname( funcname ) char * funcname ; /* reset function name */ [function] when a cpu reset is called by the simulator, this function reports the function name that is used for the user window's reset processing. this function must be described within the user function uparts_xxx(). [parameter] funcname specifies the name of the reset function called by the simulator. [return value] none [remarks] the reset function's specifications are as follows. y it is a void type function since it has no parameters. y an exports declaration is required in a module definition file for the reset function. void far pascal upreset_usrwin(void) [example] upresetfunname(?upreset_usrwin?);
chapter 4 function reference user?s manual u15802ej1v0um 63 pin value capture function int upgetpin( pname,val ) char * pname ; /* pin name */ char * val ; /* pointer to area where pin value is stored */ [function] this function captures the value for one pin. [parameters] pname specifies the pin name as a character string. val specifies a pointer to the area where the pin value is stored. [return value] if pin value was successfully captured: 1 if pin value was not successfully captured note :0 note "0" is also returned if the pin value is undefined. [example] char val; int ret; ret = upgetpin(?p46",&val);
chapter 4 function reference user?s manual u15802ej1v0um 64 port data capture function int upgetport( portname, data ) char * portname ; /* port name */ unsigned char * data ; /* pointer to area where port data is stored */ [function] this function captures port data. [parameters] portname specifies the port name as a character string. data specifies a pointer to the area where the port data is stored. [return value] if port data was successfully captured: 1 if port data was not successfully captured note : 0 note "0" is also returned if the port values include any undefined values. [example] unsigned char data; int ret; ret = upgetport(?p4",&data);
chapter 4 function reference user?s manual u15802ej1v0um 65 da output pin value capture function int upgetda( pname,val ) char * pname ; /* da output pin name */ unsigned short * val ; /* da output value */ [function] this function sets the value of the da output pin. [parameters] pname specifies the da output pin name as a character string. val specifies a pointer to the area where the value of the da output pin is stored. [return value] normal end: 1 abnormal end note : 0 note "0" is also returned if the value of the da output pin is undefined. [example] unsigned short daval; upgetda(?ano0",&daval);
chapter 4 function reference user?s manual u15802ej1v0um 66 memory area data capture function int upgetmem( addr,data ) unsigned long addr ; /* address */ unsigned char * data ; /* data storage area */ [function] this function captures the data in the memory area. [parameters] addr specifies an address in the memory area to be captured. data specifies the data storage area. [return value] if data was successfully captured: 1 if data was not successfully captured: 0 [example] unsigned char data; int ret; ret = upgetmem(0xffe000,&data);
chapter 4 function reference user?s manual u15802ej1v0um 67 dc motor active time clear function void upclrmtracclk( pname ) char * pname ; /* pin name */ [function] this function zero-clears the active time of the specified motor-connected pin. [parameter] pname specifies the motor-connected pin name as a character string. [return value] none [remarks] when using this function, call the motor pin notification function upinitmtrpin() from within a user function so that the pin name is reported in advance. [example] upclrmtracclk(?p41");
chapter 4 function reference user?s manual u15802ej1v0um 68 stepper motor information capture function int upgetstpingmtr( pnames,num,posrev,negrev,angle ) char ** pnames ; /* pin names */ int num ; /* number of pins per channel (specify 4 or 8)*/ unsigned long * posrev ; /* area for storing the number of positive revolutions */ unsigned long * negrev ; /* area for storing the number of negative revolutions */ unsigned long * angle ; /* area for storing angle */ [function] this function captures the number of positive/negative revolutions and current angle of the stepper motor that is connected to the pin names previously reported by the stepper motor notification function upinitstpingmtr. [parameters] pnames specifies pin names (character strings) for all pins. num specifies the number of pins per channel (4 or 8). posrev specifies the area where the number of positive revolutions is stored. negrev specifies the area where the number of negative revolutions is stored. angle specifies the area where the angle is stored. [return value] if successfully captured: 1 if not successfully captured: 0 [example] char *mtrpin[4] = {"p00","p01","p02","p03"}; unsigned long posrev; unsigned long negrev; unsigned long angle; upinitstpingmtr(mtrpin, 4,high,1,10); : upgetstpingmtr(mtrpin,4,&posrev,&negrev,&angle);
chapter 4 function reference user?s manual u15802ej1v0um 69 control register data capture function unsigned long upgetreg ( type ) unsigned char type; /* value to identify control register */ [function] this function captures data of the control register (psw, pc, or sp). [parameter] type specifies the identification value of the control register to which data need to be set. specify using a macro. psw macro reg_psw pc macro reg_pc sp macro reg_sp [return value] values of the specified control register. when the pc is specified, the return value is the address of the next instruction executed. when the psw or sp is specified, it is the result of the current instruction execution. [example] unsigned long psw-val; psw-val = upgetreg (reg_psw);
chapter 4 function reference user?s manual u15802ej1v0um 70 value setting function for pins void upsetpin( pname,val,time ) char * pname ; /* pin name */ char val ; /* active value */ unsigned long time ; /* hold time */ [function] this function sets a pin value. [parameters] pname specifies the pin name as a character string. val sets value when pin is active. time sets a time for holding data. the time measurement unit is the main system clock. [return value] none [remarks] when using this function, call the pin active value notification function upinitpin() from within a user function so that the pin name is reported in advance. if the pin active value that is reported by upinitpin was set as macro high, setting "1" as the active value for this upsetpin function sets the pin to active mode. similarly, if the pin active value that is reported by upinitpin was set as macro low, setting "0" as the active value for this upsetpin function sets the pin to active mode. if "0" is set for the hold time, the active value is held. [example] if upinitpin("p31",high) is described and the pin p31 is reported as active high, the description shown below sets the active high input to be held for 50 pulses of the main system clock. char val; val = 1; upsetpin(?p31?,val,50l);
chapter 4 function reference user?s manual u15802ej1v0um 71 data setting function for ports void upsetport( portname,data,time ) char * portname ; /* port name */ unsigned char data ; /* data */ unsigned long time ; /* hold time */ [function] this function sets the data in port units. [parameters] portname specifies the port name as a character string. data specifies values set to the port. time sets a time for holding data. the time measurement unit is the main system clock. [return value] none [remarks] when using this function, call the port active value notification function upinitport() from within a user function so that the pin names are reported in advance. if the active value of the port's pins reported by upinitport was set as active high, "1" is set bitwise, and if it was set as active low, "0" is set bitwise. if pins belonging to this port are set to active mode by this upsetport function, the data's bit values for the corresponding pins should be the same as the bit values corresponding to the pins whose active values were set by upsetport. if "0" is set for the hold time, the active value is held. [example] if upinitport("p4",0x03) is described and port p4's pins p40 and p41 are reported as active high while pins p42 to p47 are reported as active low, the description shown below sets port p4's pins p40, p42, and p43 to active mode and holds the active mode for 50 pulses of the main system clock. unsigned char data; data = 0xf1; upsetport(?p4",data,50l);
chapter 4 function reference user?s manual u15802ej1v0um 72 value setting function for ad input pin int upsetad( pname,val ) char * pname ; /* ad input pin name */ unsigned short val ; /* ad input value */ [function] this function sets the value of the ad input pin. [parameters] pname specifies ad input pin name as a character string. val sets value to be input to ad input pin. [return value] normal end: 1 abnormal end note :0 note "0" is returned if the ad input pin does not exist in a device used in the current simulation. [remarks] when using this function, the ad input pin connection notification function upinitad() must be called from within a user function so that the ad input pin name is reported in advance. [example] unsigned short adval; adval = 10; upsetad(?ani0",adval);
chapter 4 function reference user?s manual u15802ej1v0um 73 data setting function for memory area int upsetmem( addr,data ) unsigned long addr ; /* address */ unsigned char data ; /* data */ [function] this function sets data in a memory area. [parameters] addr specifies an address in the target memory area. data specifies data. [return value] if value is set correctly: 1 if value is not set correctly: 0 [example] int ret; ret = upsetmem(0xffe300, 0x72);
chapter 4 function reference user?s manual u15802ej1v0um 74 active time notification function for motor int upgetmtracclk( pname, val, actime ) char * pname ; /* pin name */ char * val ; /* value */ unsigned long * actime ; /* active time */ [function] this function captures the active time of the pin specified for a motor. this function is valid only for pins connected to a motor part that has already been created using the motor pin notification function upinitmtrpin(). the active time is the total time that has elapsed since the start of a simulation. when a reset occurs or when the elapsed time value exceeds a 10-digit decimal value, the active time is cleared to zero. the active time is measured in pulses of the main system clock. [parameters] pname specifies the motor-connected pin name as a character string. val sets the value of the pin. actime uses a two-dimensional array to represent the active time as the total time that has elapsed since the start of a simulation. actime[1] 0x100000000+actime[0] example : actime[1] = 0x390; actime[0] = 0x10052688; total time = 0x39010052688 main system clock [return value] if set pin was a pin set by dc motor function: 0 if set pin was not a pin set by dc motor function: ? 1 [remarks] when using this function, call the motor pin notification function upinitmtrpin() from within a user function so that the pin name is reported in advance. [example] char val; unsigned long actime[2]; upgetmtracclk("p41",&val,actime); wsprintf(timebuf,"rotation time = #%lx%08lx \n",actime[1],actime[0]); textout(hdc,240,320,timebuf,sizeof(timebuf));
chapter 4 function reference user?s manual u15802ej1v0um 75 data setting function for control register void upgetreg ( type, data ) unsigned char type ; /* value to identify control register */ unsigned long data ; /* data */ [function] this function sets data to the control register (psw, pc, or sp). [parameters] type specifies the identification value of the control register to which data needs to be set. specify using a macro. psw macro reg_psw pc macro reg_pc sp macro reg_sp data specifies the data to be set to the specified control register. note that parts that exceed the register size are omitted. [return value] none [remarks] the control register data set by this function is set at the end of the first simulation. therefore, if the control register value is rewritten during the simulation of the first instruction (when simulation is performed several times by the instruction) using this function, the control register value may change depending on the rest of the simulation results. to set data per instruction simulation, data of the control register needs to be rewritten at the timing when the pc value obtained by the user using the upgetreg function is changed. [example] upsetreg(reg_psw, 0x2);
chapter 4 function reference user?s manual u15802ej1v0um 76 time conversion notification for one main system clock pulse unsigned long upsimtimesec(void) [function] this function converts one pulse of the main system clock to a nanosecond value. [parameter] none [return value] the nanosecond value converted from one pulse of the main system clock is returned. [example] unsigned long simtime; simtime = upsimtimesec( );
chapter 4 function reference user?s manual u15802ej1v0um 77 function for transmitting packets from host using usb function bool upsetusbpack( total,total_bit,data ) unsigned char total ; /* number of data arrays */ unsigned char total_bit ; /* number of bits in transmit data */ unsigned char * data ; /* pointer to packet data array */ [function] this function uses the usb function to set packet transmission information from the host. [parameters] total specifies the number of packet data arrays. total _ bit specifies the total number of bits in the data to be transmitted. data specifies a pointer to the packet data array to be transmitted. [return value] normal end: 1 abnormal end: 0 [remarks] this function is supported only for devices that include a usb function.
chapter 4 function reference user?s manual u15802ej1v0um 78 function for receiving packets from function using usb function void upgetusbpack( total,data ) unsigned char total ; /* number of data arrays */ unsigned char ** data ; /* pointer to packet data array */ [function] this function uses the usb function to receive packet data from function. [parameters] total specifies the number of packet data arrays. data specifies a pointer to the packet data array to be transmitted. [return value] none [remarks] this function is supported only for devices that include a usb function.
chapter 4 function reference user?s manual u15802ej1v0um 79 function for transmitting signals from host using usb function void upsetusbsig( sig ) unsigned char sig ; /* transmit signal id */ [function] this function uses the usb function to transmit a signal from the host. [parameter] sig specifies the transmit signal id. 0: usbreset 1: resume [return value] none [remarks] this function is supported only for devices that include a usb function.
chapter 4 function reference user?s manual u15802ej1v0um 80 function for receiving signals from function using usb function void upgetusbsig( sig ) unsigned char * sig ; /* receive signal id */ [function] this function uses the usb function to receive a signal from function. [parameter] sig specifies the receive signal id. 0: usbreset 1: resume [return value] none [remarks] this function is supported only for devices that include a usb function.
user?s manual u15802ej1v0um 81 chapter 5 operations during cpu reset this chapter describes the operations of customized parts when a cpu reset is triggered by the simulator debugger. 5.1 parts customized via parts window the parts for functions that are specified for customization via the parts window are listed below. table 5-1. parts customized via parts window during cpu reset part name status push button all are set to inactive mode. toggle button all are set to inactive mode. group select button all are set to non-pressed mode. led all are set to inactive mode. led set per port all are set to inactive mode. matrix led all are set to off mode. dc motor all are set to inactive mode and total active time is set to 0. stepping motor all are set to inactive mode and the number of positive revolutions, the number of negative revolutions, and rotation angle are all set to 0. vertical scroll bar analog input input value is set to 0 and scroll bar's scroll button is set to the bottom edge. serial pin data input returns to start of data. 5.2 parts customized via user window when a cpu reset has been triggered by the simulator debugger, if the function name has already been reported by the reset function name notification function upresetfuncname(), the user window's reset processing function is performed.
user?s manual u15802ej1v0um 82 chapter 6 programming examples this chapter presents some examples of customized parts. among the sources cited below: <1> refers to the target program. programs are compiled and linked using the cc78k series to create load module files (xxxx.lmf). <2> and subsequent sources refer to files that are required when creating customized parts. this manual specifies that visual c++ is used to create dynamic link libraries (xxxx.dll). when compiling, be sure to specify the /zp1 option. (/zp1 option: sets single-byte alignment of structure members) select [c/c++] from [setting] on the [project] menu bar and set ?1 byte? for the ?structure alignment? in ?category? ?code generation?. remark if using the sm78k series v2.30 or a later version, be sure to create 32-bit dynamic link libraries.
chapter 6 programming examples user?s manual u15802ej1v0um 83 6.1 example of parts customized via parts window 6.1.1 description of samples the items displayed in the parts window include eight leds and eight switches, of which two (p50 and p51) are push buttons, two (p52 and p53) are toggle buttons, and four (p54, p55, p56, and p57) are select buttons. when a switch is set on or off, its corresponding led is also set on or off. an example is shown below. figure 6-1. example of parts customized via parts window port 5: input mode (switch) pd703002 p60 to p67 p6 p50 to p57 p5 processing of sample1.c parts window p5: bit0 p6: bit0 p5: bit3 p6: bit3 p5: bit1 p6: bit1 p5: bit2 p6: bit2 p5: bit6 p6: bit6 p5: bit7 p6: bit7 p5: bit4 p6: bit4 p5: bit5 p6: bit5 port 6: output mode (led)
chapter 6 programming examples user ? s manual u15802ej1v0um 84 6.1.2 source examples <1> target program (1/1) sample1.c #pragma sfr void main() { mm = 0xb0; pm5 = 0xff; pm6 = 0; p6 = 0; while(1) { p6 = p5; } }
chapter 6 programming examples user ? s manual u15802ej1v0um 85 <2> custom part source file upsw00.c (1/2) upsw00.c /* * user open i/f sample program (upsw00.c) * * p50 (i) : switch 0 p60 (o) : led 0 * p51 (i) : switch 1 p61 (o) : led 1 * p52 (i) : switch 2 p62 (o) : led 2 * p53 (i) : switch 3 p63 (o) : led 3 * p54 (i) : switch 4 p64 (o) : led 4 * p55 (i) : switch 5 p65 (o) : led 5 * p56 (i) : switch 6 p66 (o) : led 6 * p57 (i) : switch 7 p67 (o) : led 7 */ #include #include typedef unsigned char uchar; typedef unsigned short ushort; typedef unsigned long ulong; #include "uparts32.h" bool apientry dllmain(handle, dword, lpvoid); void far pascal uparts_sw00(void); /************************************************************************/ /* dll main */ /************************************************************************/ bool apientry dllmain(handle hmodele, dword ul_reason_for_call, lpvoid lpreserved) { return(true); }
chapter 6 programming examples user ? s manual u15802ej1v0um 86 (2/2) upsw00.c /************************************************************************/ /* uparts_sw00(void) */ /************************************************************************/ void far pascal uparts_sw00(void) { static char *pin[4] = { "p54", "p55", "p56", "p57" }; static char *name[4] = { "s bit4", "s bit5", "s bit6", "s bit7" }; upsetpbtmtime("3.0"); upled("p60", high, "bit0", 1); upled("p61", high, "bit1", 1); upled("p62", high, "bit2", 1); upled("p63", high, "bit3", 1); upled("p64", high, "bit4", 1); upled("p65", high, "bit5", 1); upled("p66", high, "bit6", 1); upled("p67", high, "bit7", 1); uppushbtm("p50", high, "p bit0"); uppushbtm("p51", high, "p bit1"); uptglbtm("p52", high, "t bit2"); uptglbtm("p53", high, "t bit3"); upselectbtm("select", pin, 4, high, name); } /* upsw00.c */
chapter 6 programming examples user ? s manual u15802ej1v0um 87 <3> definition file upsw00.def (1/1) upsw00.def library upsw00 description 'user open i/f panel sw00' code preload moveable discardable data preload single heapsize 3072 exports uparts_sw00 @2
chapter 6 programming examples user ? s manual u15802ej1v0um 88 <4> make file upsw00.mak (1/4) upsw00.mak # microsoft developer studio generated nmake file, based on uoport.dsp !if "$(cfg)" == "" cfg=uoport - win32 release !message configuration not specified. set default upsw00 - win32 debug. !endif !if "$(cfg)" != "uoport - win32 release" && "$(cfg)" != "upsw00 - win32 debug" !message specified build mode ?$ (cfg)? is not correct. !message configuration can be specified during execution of nmake. !message defines command-line macro setting. example: !message !message nmake /f "upsw00.mak" cfg="upsw00 - win32 debug" !message !message selectable build modes: !message !message ?upsw00 - win32 release? (for ?win32 (x86) dynamic-link library?) !message ?upsw00 - win32 debug? (for ?win32 (x86) dynamic-link library?) !message !error invalid configuration was specified. !endif !if "$(os)" == "windows_nt" null= !else null=nul !endif cpp=cl.exe mtl=midl.exe rsc=rc.exe !if "$(cfg)" == "upsw00 - win32 release" outdir=.\release intdir=.\release # begin custom macros outdir=.\release # end custom macros all : "$(outdir)\upsw00.dll"
chapter 6 programming examples user ? s manual u15802ej1v0um 89 (2/4) upsw00.mak clean : -@erase "$(intdir)\upsw00.obj" -@erase "$(intdir)\vc60.idb" -@erase "$(outdir)\upsw00.dll" -@erase "$(outdir)\upsw00.exp" -@erase "$(outdir)\upsw00.lib" "$(outdir)" : if not exist "$(outdir)/$(null)" mkdir "$(outdir)" cpp_proj=/nologo /zp1 /mt /w3 /gx /o2 /d "win32" /d "ndebug" /d "_windows" /d "_mbcs" /d "_usrdll" /d "upsw00_exports" /fp"$(intdir)\upsw00.pch" /yx /fo"$(intdir)\\" /fd"$(intdir)\\" /fd /c mtl_proj=/nologo /d "ndebug" /mktyplib203 /win32 bsc32=bscmake.exe bsc32_flags=/nologo /o"$(outdir)\upsw00.bsc" bsc32_sbrs= \ link32=link.exe link32_flags=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:no /pdb:"$(outdir)\upsw00.pdb" /machine:i386 /def:".\upsw00.def" /out:"$(outdir)\upsw00.dll" /implib:"$(outdir)\upsw00.lib" def_file= \ ".\upsw00.def" link32_objs= \ "$(intdir)\upsw00.obj" \ ".\sik032.lib" "$(outdir)\upsw00.dll" : "$(outdir)" $(def_file) $(link32_objs) $(link32) @<< $(link32_flags) $(link32_objs) << !elseif "$(cfg)" == "upsw00 - win32 debug" outdir=.\debug intdir=.\debug # begin custom macros outdir=.\debug # end custom macros all : "$(outdir)\upsw00.dll"
chapter 6 programming examples user ? s manual u15802ej1v0um 90 (3/4) upsw00.mak clean : -@erase "$(intdir)\upsw00.obj" -@erase "$(intdir)\vc60.idb" -@erase "$(intdir)\vc60.pdb" -@erase "$(outdir)\upsw00.dll" -@erase "$(outdir)\upsw00.exp" -@erase "$(outdir)\upsw00.ilk" -@erase "$(outdir)\upsw00.lib" -@erase "$(outdir)\upsw00.pdb" "$(outdir)" : if not exist "$(outdir)/$(null)" mkdir "$(outdir)" cpp_proj=/nologo /gz /zp1 /mtd /w3 /gm /gx /zi /od /d "win32" /d "_debug" /d "_windows" /d "_mbcs" /d "_usrdll" /d "upsw00_exports" /fp"$(intdir)\upsw00.pch" /yx /fo"$(intdir)\\" /fd"$(intdir)\\" /fd /c mtl_proj=/nologo /d "_debug" /mktyplib203 /win32 bsc32=bscmake.exe bsc32_flags=/nologo /o"$(outdir)\upsw00.bsc" bsc32_sbrs= \ link32=link.exe link32_flags=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:yes /pdb:"$(outdir)\upsw00.pdb" /debug /machine:i386 /def:".\upsw00.def" /out:"$(outdir)\upsw00.dll" /implib:"$(outdir)\upsw00.lib" /pdbtype:sept def_file= \ ".\upsw00.def" link32_objs= \ "$(intdir)\upsw00.obj" \ ".\sik032.lib" "$(outdir)\upsw00.dll" : "$(outdir)" $(def_file) $(link32_objs) $(link32) @<< $(link32_flags) $(link32_objs) << !endif .c{$(intdir)}.obj:: $(cpp) @<< $(cpp_proj) $< <<
chapter 6 programming examples user ? s manual u15802ej1v0um 91 (4/4) upsw00.mak .cpp{$(intdir)}.obj:: $(cpp) @<< $(cpp_proj) $< << .cxx{$(intdir)}.obj:: $(cpp) @<< $(cpp_proj) $< << .c{$(intdir)}.sbr:: $(cpp) @<< $(cpp_proj) $< << .cpp{$(intdir)}.sbr:: $(cpp) @<< $(cpp_proj) $< << .cxx{$(intdir)}.sbr:: $(cpp) @<< $(cpp_proj) $< << !if "$(no_external_deps)" != "1" !if exists("upsw00.dep") !include "upsw00.dep" !else !message warning: cannot find "upsw00.dep" !endif !endif !if "$(cfg)" == "upsw00 - win32 release" || "$(cfg)" == "upsw00 - win32 debug" source=.\upsw00.c "$(intdir)\upsw00.obj" : $(source) "$(intdir)" !endif
chapter 6 programming examples user ? s manual u15802ej1v0um 92 6.2 example of parts customized via user window 6.2.1 description of samples the items displayed in the user custom window include a part that sets a value to port 5 and a part that captures values from port 6. pressing the port 5 button in the user custom window causes the value input to port 5 to be incremented by 1. when "port 5 value = 0x7f", the value is cleared to 0. this input value from port 5 is output to port 6. the display of "port 6 value = xxxx" is updated to the current value when the port 6 button in the user custom window is clicked. an example is shown below. figure 6-2. example of parts customized via user window value input value incremented by 1 is input when port 5 button is pressed output value is displayed when port 6 button is pressed pd78054 port 5 port 6 port 5 value = xxx port 6 value = xxx port 5 port 6 processing using uoport.c user-created window value output
chapter 6 programming examples user ? s manual u15802ej1v0um 93 6.2.2 source examples <1> target program (1/1) sample2.c #pragma sfr void main() { mm = 0xb0; pm5 = 0xff; pm6 = 0; p6 = 0; while(1) { p6 = p5; } }
chapter 6 programming examples user ? s manual u15802ej1v0um 94 <2> custom part source file uoport.c (1/7) uoport.c /* * user open i/f sample program (uoport.c) */ #include #include #include typedef unsigned char uchar; typedef unsigned short ushort; typedef unsigned long ulong; #include #include "uparts32.h" #define idm_past 0x1111 #define idm_newwin 0x1112 #define btn_width 70 #define btn_hight 25 #define idd_pin_button 0x10 void far pascal uparts_port(void); long far pascal uparts_portwndproc(hwnd, unsigned, wparam, lparam); void far pascal uparts_portcall(ulong); void far pascal uparts_portreset(void); void far pascal uparts_portloadproj(char far *); void far pascal uparts_portsaveproj(char far *); /* window point */ #define uparts_portwidth 300 #define uparts_portheight 100 /* title strings */ #define str_up_title "user open i/f panel port" /* window class name */ const byte cnuparts_port[] = "uparts_portwin";
chapter 6 programming examples user ? s manual u15802ej1v0um 95 (2/7) uoport.c handle hinst; hwnd huparts_portwnd; hwnd btm_hwnd[2]; char *strbuf[2] = {"port5","port6"}; char port5val = 0; char port6val = 0; char uparts_veiw_str[7]; char uparts_rect_str[23]; /************************************************************************/ /* dll main */ /************************************************************************/ bool apientry dllmain(handle hmodele, dword ul_reason_for_call, lpvoid lpreserved) { wndclass wndclass; switch(ul_reason_for_call){ case dll_process_attach: hinst = hmodele; wndclass.lpszclassname = (lpstr)cnuparts_port; wndclass.hinstance = hinst; wndclass.lpfnwndproc = (wndproc)uparts_portwndproc; wndclass.hcursor = null; wndclass.hicon = null; wndclass.lpszmenuname = null; wndclass.hbrbackground = (hbrush)(color_window + 1); wndclass.style = cs_hredraw | cs_vredraw; wndclass.cbclsextra = 0; wndclass.cbwndextra = dlgwindowextra; registerclass(&wndclass); break; case dll_thread_attach: break; case dll_thread_detach: break; case dll_process_detach: break;
chapter 6 programming examples user ? s manual u15802ej1v0um 96 (3/7) uoport.c } return(true); } /************************************************************************/ /* uparts_port(void) */ /************************************************************************/ void far pascal uparts_port(void) { if(!huparts_portwnd){ huparts_portwnd = createwindow((lpstr)cnuparts_port,/* class name */ str_up_title, /* title. */ ws_overlappedwindow | ws_border | ws_visible, /* style bits. */ cw_usedefault, /* x - default. */ cw_usedefault, /* y - default. */ uparts_portwidth, /* cx - default.*/ uparts_portheight, /* cy - default.*/ null, /* no parent. */ null, /* class memu. */ hinst, /* creator */ null); /* params. */ } if(huparts_portwnd){ upsetuserwnd(huparts_portwnd); showwindow(huparts_portwnd, sw_show); upcallfuncname("uparts_portcall"); upresetfuncname("uparts_portreset"); uploadprojname("uparts_portloadproj"); upsaveprojname("uparts_portsaveproj"); upinitport("p5", 0xff); } return; }
chapter 6 programming examples user ? s manual u15802ej1v0um 97 (4/7) uoport.c /************************************************************************/ /* uparts_portwndproc(hwnd, unsigned wparam, lparam) */ /************************************************************************/ long pascal far uparts_portwndproc(hwnd hwnd, unsigned imessage, wparam wparam, lparam lparam) { hdc hdc; paintstruct ps; rect wrect; int i; char strval[20]; long wx,wy; switch(imessage){ case wm_create: for(i = 0; i < 2; i++){ btm_hwnd[i] = createwindow((lpstr)"button",strbuf[i], ws_child|bs_pushbutton|ws_visible|ws_tabstop, 10,10+30*i, btn_width,btn_hight, hwnd,(hmenu)(idd_pin_button+i),hinst,null); } return(false); case wm_command: switch(wparam){ case idd_pin_button: if(port5val < 0x7f) port5val++; else port5val = 0; upsetport("p5", port5val, 0); invalidaterect(hwnd, null, true); updatewindow(hwnd); break; case idd_pin_button + 1: upgetport("p6", &port6val); invalidaterect(hwnd, null, true); updatewindow(hwnd); break; }
chapter 6 programming examples user ? s manual u15802ej1v0um 98 (5/7) uoport.c return(false); case wm_paint: hdc = beginpaint(hwnd, &ps); wsprintf(strval, "port5 value=%#2x\0", port5val); textout(hdc, btn_width + 40, 15, strval, lstrlen(strval)); wsprintf(strval, "port6 value=%#2x\0", port6val); textout(hdc, btn_width + 40, 45, strval, lstrlen(strval)); endpaint(hwnd, &ps); return(false); case wm_syscolorchange: invalidaterect(hwnd, null, true); break; case wm_move: getwindowrect(hwnd, &wrect); wx = wrect.right - wrect.left; wy = wrect.bottom - wrect.top; if((wx != 36) && (wy != 36)) { wsprintf(uparts_rect_str, "%d, %d, %d, %d", wrect.left, wrect.top, wx, wy); } invalidaterect(hwnd, null, true); break; case wm_size: if(wparam == sizeiconic) { lstrcpy(uparts_veiw_str, "icon"); } else { getwindowrect(hwnd, &wrect); lstrcpy(uparts_veiw_str, "normal"); wsprintf(uparts_rect_str, "%d, %d, %d, %d", wrect.left, wrect.top, wrect.right - wrect.left, wrect.bottom - wrect.top); } break; case wm_destroy: upcloseuserwnd(hwnd); default: return defwindowproc(hwnd, imessage, wparam, lparam); }
chapter 6 programming examples user ? s manual u15802ej1v0um 99 (6/7) uoport.c return 0l; } /************************************************************************/ /* uparts_portcall(ulong) */ /************************************************************************/ void far pascal uparts_portcall(ulong time) { return; } /************************************************************************/ /* uparts_portreset(void) */ /************************************************************************/ void far pascal uparts_portreset(void) { port5val = 0; port6val = 0; invalidaterect(huparts_portwnd, null, true); } /************************************************************************/ /* uparts_portloadproj(char far *) */ /************************************************************************/ void far pascal uparts_portloadproj(char far *fname) { char *next; word x, y, wx, wy; getprivateprofilestring("uoport", "window", "hide", uparts_veiw_str, 7, fname); if(!lstrcmp(uparts_veiw_str, "icon")) { /* "icon" mode */ showwindow(huparts_portwnd, sw_showminnoactive); } else { /* "normal" mode */ getprivateprofilestring("uoport", "geometry", "0, 0, 0, 0", uparts_rect_str, 23, fname); if(lstrcmp(uparts_rect_str, "0, 0, 0, 0")) { next = strtok(uparts_rect_str, ","); x = (word)strtoul(next, null, 10); next = strtok(null, ","); y = (word)strtoul(next, null, 10); next = strtok(null, ",");
chapter 6 programming examples user ? s manual u15802ej1v0um 100 (7/7) uoport.c wx = (word)strtoul(next, null, 10); next = strtok(null, ""); wy = (word)strtoul(next, null, 10); movewindow(huparts_portwnd, x, y, wx, wy, true); } showwindow(huparts_portwnd, sw_shownormal); } } /************************************************************************/ /* uparts_portsaveproj(char far *) */ /************************************************************************/ void far pascal uparts_portsaveproj(char far *fname) { writeprivateprofilestring("uoport", "window", uparts_veiw_str, fname); writeprivateprofilestring("uoport", "geometry", uparts_rect_str, fname); } /* uoport.c */
chapter 6 programming examples user ? s manual u15802ej1v0um 101 <3> definition file uoport.def (1/1) uoport.def library uoport description 'user open i/f panel port' heapsize 4096 exports uparts_port uparts_portwndproc uparts_portcall uparts_portreset uparts_portloadproj uparts_portsaveproj
chapter 6 programming examples user ? s manual u15802ej1v0um 102 <4> make file uoport.mak (1/4) uoport.mak # microsoft developer studio generated nmake file, based on uoadda00.dsp !if "$(cfg)" == "" cfg=uoadda00 - win32 debug !message configuration not specified. set default uoadda00 ? win32 debug . !endif !if "$(cfg)" != "uoadda00 - win32 release" && "$(cfg)" != "uoadda00 - win32 debug" !message specified build mode "$(cfg )" is not correct. !message configuration can be specified during execution of nmake. !message defines command-line macro setting. example: !message !message nmake /f "uoadda00.mak" cfg="uoadda00 - win32 debug" !message !message selectable build modes: !message !message "uoadda00 ? win32 release" (for "win32 (x86) dynamic-link library") !message "uoadda00 ? win32 debug" (for "win32 (x86) dynamic-link library") !message !error invalid configuration was specified. !endif !if "$(os)" == "windows_nt" null= !else null=nul !endif cpp=cl.exe mtl=midl.exe rsc=rc.exe !if "$(cfg)" == "uoadda00 - win32 release" outdir=.\release intdir=.\release # begin custom macros outdir=.\release # end custom macros all : "$(outdir)\uoport.dll"
chapter 6 programming examples user ? s manual u15802ej1v0um 103 (2/4) uoport.mak clean : -@erase "$(intdir)\uoport.obj" -@erase "$(intdir)\vc60.idb" -@erase "$(outdir)\uoport.dll" -@erase "$(outdir)\uoport.exp" -@erase "$(outdir)\uoport.lib" "$(outdir)" : if not exist "$(outdir)/$(null)" mkdir "$(outdir)" cpp_proj=/nologo /zp1 /mt /w3 /gx /o2 /d "win32" /d "ndebug" /d "_windows" /d "_mbcs" /d "_usrdll" /d "uoport_exports" /fp"$(intdir)\uoport.pch" /yx /fo"$(intdir)\\" /fd"$(intdir)\\" /fd /c mtl_proj=/nologo /d "ndebug" /mktyplib203 /win32 bsc32=bscmake.exe bsc32_flags=/nologo /o"$(outdir)\uoport.bsc" bsc32_sbrs= \ link32=link.exe link32_flags=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:no /pdb:"$(outdir)\uoport.pdb" /machine:i386 /def:".\uoport.def" /out:"$(outdir)\uoport.dll" /implib:"$(outdir)\uoport.lib" def_file= \ ".\uoport.def" link32_objs= \ "$(intdir)\uoport.obj" \ ".\sik032.lib" "$(outdir)\uoport.dll" : "$(outdir)" $(def_file) $(link32_objs) $(link32) @<< $(link32_flags) $(link32_objs) << !elseif "$(cfg)" == "uoport - win32 debug" outdir=.\debug intdir=.\debug # begin custom macros outdir=.\debug # end custom macros all : "$(outdir)\uoport.dll"
chapter 6 programming examples user ? s manual u15802ej1v0um 104 (3/4) uoport.mak clean : -@erase "$(intdir)\uoport.obj" -@erase "$(intdir)\vc60.idb" -@erase "$(intdir)\vc60.pdb" -@erase "$(outdir)\uoport.dll" -@erase "$(outdir)\uoport.exp" -@erase "$(outdir)\uoport.ilk" -@erase "$(outdir)\uoport.lib" -@erase "$(outdir)\uoport.pdb" "$(outdir)" : if not exist "$(outdir)/$(null)" mkdir "$(outdir)" cpp_proj=/nologo /zp1 /mtd /w3 /gm /gx /zi /od /d "win32" /d "_debug" /d "_windows" /d "_mbcs" /d "_usrdll" /d "uoport_exports" /fp"$(intdir)\uoport.pch" /yx /fo"$(intdir)\\" /fd"$(intdir)\\" /fd /gz /c mtl_proj=/nologo /d "_debug" /mktyplib203 /win32 bsc32=bscmake.exe bsc32_flags=/nologo /o"$(outdir)\uoport.bsc" bsc32_sbrs= \ link32=link.exe link32_flags=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:yes /pdb:"$(outdir)\uoport.pdb" /debug /machine:i386 /def:".\uoport.def" /out:"$(outdir)\uoport.dll" /implib:"$(outdir)\uoport.lib" /pdbtype:sept def_file= \ ".\uoport.def" link32_objs= \ "$(intdir)\uoport.obj" \ ".\sik032.lib" "$(outdir)\uoport.dll" : "$(outdir)" $(def_file) $(link32_objs) $(link32) @<< $(link32_flags) $(link32_objs) << !endif .c{$(intdir)}.obj:: $(cpp) @<< $(cpp_proj) $< <<
chapter 6 programming examples user ? s manual u15802ej1v0um 105 (4/4) uoport.mak .cpp{$(intdir)}.obj:: $(cpp) @<< $(cpp_proj) $< << .cxx{$(intdir)}.obj:: $(cpp) @<< $(cpp_proj) $< << .c{$(intdir)}.sbr:: $(cpp) @<< $(cpp_proj) $< << .cpp{$(intdir)}.sbr:: $(cpp) @<< $(cpp_proj) $< << .cxx{$(intdir)}.sbr:: $(cpp) @<< $(cpp_proj) $< << !if "$(no_external_deps)" != "1" !if exists("uoport.dep") !include "uoport.dep" !else !message warning: cannot find "uoport.dep" !endif !endif !if "$(cfg)" == "uoport - win32 release" || "$(cfg)" == "uoport - win32 debug" source=.\uoport.c "$(intdir)\uoport.obj" : $(source) "$(intdir)" !endif
user?s manual u15802ej1v0um 106 appendix a error messages a.1 error processing (a) if the specified pin name is not among the products that can be simulated, the error message dialog box appears to report an error message. (b) if the read dll file is a combination of user panel custom functions and parts custom functions, a dialog box appears with a warning message when the first function to be read does not belong to the dll file in accordance with the dll file name. (c) if an error occurs when a user-created custom dll is read, the part that caused the error is not created. (d) if an error or warning occurs even once for the user panel custom functions upgetpin(), upgetport(), upgetmem(), upclrmtracclk(), or upgetstpingmtr(), error values may be returned or the function may not operate correctly when subsequently used. therefore, if an error or warning occurs, revise the source code, create the dll file again, and reload to avoid such problems. a.2 error and warning messages error messages and warning messages that may occur during execution of a function are listed below. the abbreviated function names listed below are used to refer to the function names for which the error occurred. stepper motor functions upstpingmtr(), upsetstpingmtr(), upgetstpingmtr() led picture setup function upsetledpic() led functions upled(), upportled() matrix led function upmtxled() serial pin data input function upserial_data() port value setup/capture functions upportled(), upgetport(), upsetport() hold time setup function upsetpbtmtime() vertical scroll bar analog input function upscaleinterad() reference voltage value setup function upsetavref() function name notification functions upcallfuncname(), uploadprojname(), upsaveprojname(), upresetfuncname() bitmap setup functions upsetbtmbmp(), upsetledbmp(), upsetmtrbmp() button functions uppushbtm(), uptglbmp(), upselectbtm() register-related functions upgetreg(), upsetreg ()
appendix a error messages user?s manual u15802ej1v0um 107 table a-1. error messages (1/2) no. window name message cause user action e1 all functions that include a pin name parameter specified pin does not exist. specified pin does not exist. specify a pin name that exists in the target device. e2 all functions that include a pin name parameter pin name was specified using double-byte characters. specified pin name is entered using double-byte characters. use only single-byte characters to specify pin names. e3 all functions that include an active high/low parameter active high/low setting is neither high nor low. specified active high/low setting is neither high nor low. specify either high or low for the active high/low setting. e4 stepper motor functions that include a number-of- channels parameter the number of channels is neither 4 nor 8. specified number of channels is neither 4 nor 8. specify either 4 or 8 as the number of channels (according to the number of pins). e5 stepper motor functions that include an excitation parameter excitation value is neither 0 nor 1. specified excitation value is neither 0 nor 1. specify either 0 or 1 as the excitation value (according to the excitation method). e6 stepper motor functions that include a minimum step angle parameter minimum step angle is not a fraction of 360. specified minimum step angle is not a fraction of 360. specify an integer that is a fraction of 360 as the minimum step angle. e7 led picture setup function picture type is neither pic_rect nor pic_ell. specified picture type parameter is neither pic_rect nor pic_ell. specify either pic_rect or pic_ell as the picture type. e8 led picture setup function color type is neither pic_red nor pic_yellow nor pic_green. specified color type parameter is neither pic_red nor pic_yellow nor pic_green. specify pic_red, pic_yellow, or pic_green as the color type. e9 led functions that include a picture type parameter displayed picture type specification is neither 0 nor 1. specified picture type value is neither 0 nor 1. specify either 0 or 1 as the picture type parameter. e10 serial pin data input function the first bit specification for serial input is neither msb (1) nor lsb (0). value specified as the first bit parameter is neither 0 nor 1. specify either 0 or 1 as the first bit parameter. e11 matrix led function output 1 active high/low setting is neither high nor low. specified value for output 1 active high/low parameter is neither high nor low. specify either high or low as the output 1 active high/low parameter. e12 matrix led function output 2 active high/low setting is neither high nor low. specified value for output 2 active high/low parameter is neither high nor low. specify either high or low as the output 2 active high/low parameter. e13 port value setup/capture functions port name was specified using double-byte characters. specified port name parameter was entered using double-byte characters. use only single-byte characters to specify port name parameter. e14 port value setup/capture functions specified port does not exist. specified parameter for port name does not exist. specify a port name that exists in the target device.
appendix a error messages user?s manual u15802ej1v0um 108 table a-1. error messages (2/2) no. window name message cause user action e15 hold time setup function hold time is invalid. specified hold time is out of range or is not a number. specify a hold time within the range of 0.001 to 999 ms. e16 vertical scroll bar analog input function specified pin is not an analog input pin. non-analog pin name was specified. specify an analog pin. e17 reference voltage value setup function av ref is not within the operating power supply voltage range. av ref is not within the operating power supply voltage range. set a value that is within the operating power supply voltage range. e18 all functions that include a pointer type parameter parameter is a null pointer. an invalid parameter was specified for the function. specify the correct pointer. e19 all functions described in section 4.1 function xxxx cannot be specified in uoxxx.dll. this function was specified in uoxxx.dll. use upxxx.dll. e20 all functions described in section 4.2 function xxxx cannot be specified in upxxx.dll. this function was specified in upxxx.dll. use uoxxx.dll. e21 functions requiring advance notification function no advance notification of function xxxx required notification function was not called. call the required notification function in advance. e22 register-related functions type of control register is neither reg_pc, nor reg- psw, nor reg-sp. register other than a control register is specified. do not specify register other than control register e23 bitmap setup functions specified bitmap file is invalid. access to specified file or area allocation failed. specify a correct file, or remove other applications to allocate memory. e24 button functions specified pin has already been specified. attempted to specify previously specified pin. do not specify a previously specified pin. e25 all functions area cannot be allocated. memory cannot be allocated. remove other applications to allocate memory. table a-2. warning messages no. window name message cause user action w1 reference voltage value setup function no av ref setting. is 5.0 v (default setting) ok? " " was specified as the reference voltage value character string. specify a character string as the values to be set to the reference voltage value character string. w2 hold time setup function no hold time setting. is 0.5 ms (default setting) ok? " " was specified as the hold time character string. specify a character string as the values to be set to the hold time character string.
although nec has taken all possible steps to ensure that the documentation supplied to our customers is complete, bug free and up-to-date, we readily accept that errors may occur. despite all the care and precautions we've taken, you may encounter problems in the documentation. please complete this form whenever you'd like to report errors or suggest improvements to us. hong kong, philippines, oceania nec electronics hong kong ltd. fax: +852-2886-9022/9044 korea nec electronics hong kong ltd. seoul branch fax: +82-2-528-4411 taiwan nec electronics taiwan ltd. fax: +886-2-2719-5951 address north america nec electronics inc. corporate communications dept. fax: +1-800-729-9288 +1-408-588-6130 europe nec electronics (europe) gmbh market communication dept. fax: +49-211-6503-274 south america nec do brasil s.a. fax: +55-11-6462-6829 asian nations except philippines nec electronics singapore pte. ltd. fax: +65-250-3583 japan nec semiconductor technical hotline fax: +81- 44-435-9608 i would like to report the following error/make the following suggestion: document title: document number: page number: thank you for your kind support. if possible, please fax the referenced page or drawing. excellent good acceptable poor document rating clarity technical accuracy organization cs 01.11 name company from: tel. fax facsimile message


▲Up To Search▲   

 
Price & Availability of USAB10SM78K0S

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X