Maxim Integrated
│
13
Evaluates: MAX21000
Gyroscope
MAX21000 Maxim Inertial Demo (MInD)
Evaluation Kit
www.maximintegrated.com
Macro
A macro is a set of commands that can be executed
through the selection of its identifier. The macro feature
provided by the software permits the user to run an exist-
ing macro, record a new one, and save the current con-
figuration as a macro.
Each macro is composed of two functions: play and
pause. The play button on the Macro management sec-
tion of the toolbar (see the Toolbar section) triggers the
execution of the play function; the Pause button triggers
the execution of the pause function. The macro to be
executed can be selected using the drop-down list in the
Macro management section.
Toplayamacro:
● SelectthedesiredmacrofromtheSelect the macro
drop-down list in the Macro management section of
the toolbar.
● ClickthePlay button in the Macro management sec-
tion of the toolbar to execute the play function of the
macro.
● Click the Pause button in the Macro management
section of the toolbar to execute the pause function of
the macro.
Recording a macro means that every write operation
executed using the Tabs frame is saved in a macro. Note
that the write operation executed using the Direct com-
mands tool are not recorded.
Torecordamacro:
● OpentheMacro menu.
● ClickontheRecord a macro menu entry.
● Insertthenameofthenewmacrointhedialogwindow
and click OK.
If a valid name is set, the recording starts.
If the name is not valid, an error message appears
and the name is requested again.
● Executeallthewriteoperationsyouwanttostore.
● OpentheMacro menu.
● ClickontheRecord a macro menu entry to stop the
recording.
Whentherecordingisterminated,allthewriteoperations
are stored in the play function of the created macro. To
recall the recorded macro, select it from the Select the
macro drop-down and click the Play button.
The macro feature also permits the user to save the cur-
rent status of the registers in a macro.
Tosavethecurrentregister’sstatusasamacro:
● OpentheMacro menu.
● ClickontheSave as macro… menu entry.
● Insertthenameofthenewmacrointhedialogwindow
and click OK.
If a valid name is set, the register status is saved in
a new macro.
If the name is not valid, an error message appears
and the name is requested again.
The Macro management tool also provides an interface
to manage the macros. The Advanced macro man-
ager interface permits the user to manually create a new
macro, edit, modify, or delete an existing macro, and to
check the syntax of a macro.
A macro in the MInD software is a set of instructions
written in a Javascript-like language. Almost all the basic
instructions of Javascript are provided, so refer to a
Javascript reference guide for a list of available instruc-
tions. To add the software functionalities, a new object
called mind hasbeenintegrated.Thisobjectprovidesthe
followingfunctions:
● ReadRegister(<device name>, <bank address>, <reg-
ister address>):returnsaregistervalue;
● WriteRegister(<device name>, <bank address>, <reg-
ister address>, <data to write>) :write a value on a
register;
● print(<string to print>) :printsthespecifiedstringinthe
Output text area.
Some other external functions could be released together
with the software; you can find their definition in the util-
func.js file on the root installation folder. Currently, only
the sleep(time) function is provided; it introduced a delay
oftimemsintheexecution.Foranexampleofcode,see
Figure26.
To open the Advanced macro manager:
● OpentheMacro menu.
● ClickontheAdvanced macro manager menu entry.
Figure26 shows the Advanced macro manager interface.
The interface is composed by a toolbar on the top that
provides all the functionalities of the Advanced macro
manager, the list of available macros on the left, a text
editor to show the macro content on the right, and a
debugging output text area on the bottom.