Argox PT-20B Mode d'emploi

Preface
To satisfy the user’s customized needs, the PT-20 provide users to generate programs for their
actual demands. This allows users to collect data, execute function expression and store the
processed data with the application programs designed by their own.
Developers can use ARM Assembly or C code to create the program flow. And developers can
also link standard ANSI C function library to meet the demands through executing the
functions of input, output, expression and storage using the functions provided by PT-20.
Later in this manual, you’ll learn how to write, compile and link program, and also how to
download renewed codes and test functions via simulation. Finally, this manual will also
conclude the function illustration of PT-20 for your reference.

Table of Contents
Program Developing......................................................................................................3
Development Environment....................................................................................3
1.1 SDK Directory...............................................................................3
1.2 Development Tool Kit....................................................................5
Function Library ....................................................................................................7
Standard Function Library.....................................................................................8
How to Build Your Program ................................................................................10
1.3 Edit Program:...............................................................................10
1.4 Under RealView:..........................................................................10
1.5 Update Firmware: ........................................................................11
1.6 Development Notice:...................................................................11
Upgrade Application............................................................................................12
1.7 System Requirement:...................................................................12
1.8 Upgrade Procedure: .....................................................................12
1.9 Execute User Program:................................................................13
Utility & Others ...................................................................................................14
1.10 AID MAKER...............................................................................14
1.11 Scanner FW Upgrade...................................................................14
1.12 Font..............................................................................................14
1.13 ScanSetting ..................................................................................14
SDK Library.................................................................................................................15
SDK Functions list...............................................................................................15
Reader..................................................................................................................22
Buzzer..................................................................................................................26
Calender...............................................................................................................28
Bluetooth(Only for PT-20B)................................................................................30
File Manipulation.................................................................................................35
DBMS..................................................................................................................52
LED......................................................................................................................61
Keypad.................................................................................................................62
LCD......................................................................................................................71
UserFont...............................................................................................................78
TextBlock.............................................................................................................79
Communication Ports...........................................................................................83
PT-20 Programming Guide 1

Remote.................................................................................................................88
System..................................................................................................................91
Memory................................................................................................................94
Vibrate..................................................................................................................96
Other ....................................................................................................................97
Simulator (Only for PC Simulator)......................................................................98
Data Conversion...................................................................................................99
APPENDIX 1:.........................................................................................................101
Scan Command Table ........................................................................................101
PT-20 Programming Guide 2

Program Developing
Development Environment
1.1 SDK Directory
Folder Structure:
When open the SDK folder in the CD provided with the PT-20, it will show the structure
as the following:
Functions in SDK folder description:
PT20-SDK.mcp is a RealView Developer Suite project file, developer need to set
PT20-SDK.mcp as RealViews’ project file.
AP.bin is the user application binary file, download it here.
Source folder is used to store application files and the PT-20 function library used in
the programs.
Library folder is used to store PT20Library.a, Startup.s, and other *.inc files for
compiler, don’t delete this folder.
Others folder is for later use. Don’t care this folder.
PT20-SDK_Data folder is used to store object files.
Release folder is used to store compiler information.
PT-20 Programming Guide 3

Adding Source File:
All user application program source files has to be placed under Source folder, and
register needed files’ name in the project file of PT20-SDK.mcp before proceeding
with compiling and linking process.
PT-20 Programming Guide 4

1.2 Development Tool Kit
The Development Tool Kit is available from the manufacturer or the suppliers. After
installing the Development Tool Kit, run the CodeWarrior for RVDS as figure:
In RealView CodeWarrior, you can open the RealView project “PT20-SDK.mcp” as figure:
After finish application code development, you can compile and link application code as
figure:
PT-20 Programming Guide 5

PT-20 Programming Guide 6

Function Library
PT-20 Function Library supports user application program to perform the data
collection jobs. PT-20 Function Library provides variety of services, and
accomplishes special functions according to specific demands.
When using the PT-20 Function Library, please add the import command (#include
‘SDK.h’) into the user program file (*.c) and the function will be imported. In this case,
the PT-20 Function Library file PT20Library.a is needed.
The PT-20 Function Library file PT20Library.a is updated occasionally. For most
update version, please ask helps from your vendor or the manufacturer.
PT-20 Function Library file PT20Library.a is needed during compiling and linking for
generating AP.bin.
The update library release is SDK.h. Please refer SDK Library section.
PT-20 Programming Guide 7

Standard Function Library
The user application program in the data collector can perform the tasks to combine
standard C language function library. The function library is enclosed in the
developing environment (RealView Developer Suite). After set up the developing
environment, you can find the include head file of standard C language function
library in the directory \\ARM\RVCT\Data\2.2\349\include\windows. The following
are the available include head file list in standard C language function library:
<assert.h>
__assert ;
<ctype.h>
isalnum; isalpha; iscntrl; isdigit; isgraph; islower; ispr; ispunct;
isspace; isupper; isxdigit; tolower; toupper;
<locale.h>
setlocale; localeconv;
<math.h>
acos; asin; atan; atan2; cos; sin; tan; cosh;
sinh; tanh; exp; frexp; ldexp; log; log10; modf;
pow; sqrt; ceil; fabs;__d_abs; floor; fmod;
<setjmp.h>
setjmp; longjmp;
<signal.h>
signal; raise;
<stdio.h>
sprintf; sscanf;
<stdlib.h>
atof; atoi; long atol; strtod; long strtol; strtoul; rand; srand;
_ANSI_rand; _ANSI_srand; abort; atexit; exit; getenv; system; bsearch;
qsort; abs; long labs;
<string.h>
strcpy; strncpy; strcat; strncat; memcmp; strcmp; strncmp; strcoll; strxfrm; strstr;
memset; strlen;
If you need to use standard C language functions in the user program, please add
#include <header file name> in the top of the file to import the correlated include
head files. See following example:
#include <stdio.h>
PT-20 Programming Guide 8
Ce manuel convient aux modèles suivants
1
Table des matières
Autres manuels Argox Téléphone IP





















