Datasheet

to the Data entry field and push the Update button. Once all the data is updated to the wanted addresses, it can be written to the
SRAM memory by pushing the Write Page, which writes two lines in code memory table (first two lines refer to page 0, next two
lines to page 1, etc. Pages can be changed with the page selector) or by pushing Write All, which updates the whole memory. Once
the data is written to SRAM, operation mode can be set to Run and Execution mode for example to Free Run. Note that Program
Counter(s) must be set accordingly. This is not done automatically like loading program by clicking the Download-button. Note also
that the program code does not show up in the program view (in Program tab).
RUNNING THE PROGRAM
The program is run by checking the Run from the Master control and clicking on Free run-button. This way all the engines will start
at the same time. If you have less than three engines in use, extra engines must be disabled by checking off the box in each engine
section. As seen in Figure 10, the program has only two engines in use, and the engine three is checked off. If this is not done the
programs may not work correctly. Engines can also be run from individual engine control. One convenient way of debugging the
programs is by running the individual engines step by step. Individual engine control can be used also with multiple engines, but
then they wont start at the same time.
30187017
FIGURE 10. Master Control of the Program Tab
For operating, the program's following four modes exist (see Figure 10). Operation mode is selected by clicking the desired check
box.
Operation modes
Disable — Engine operation is disabled and they can not be run
Load — In this mode writing to program memory is allowed. All the three engines are in hold while one or more engines are in
load program mode. PWM values are also frozen. Program execution continues when all the engines are out of load program
mode. Load program mode resets the program counter of the respective engine. Load program mode can be entered from the
disabled mode only. Entering load program mode from the run program mode is not allowed. Note that load mode does not
automatically load the program opened with Open Source File button Figure 8. When using this operation mode, one must write
the program through the Code memory tab .
Run — This mode executes the instructions stored in the program memory. Execution register (ENG1_EXEC etc.) bits define
how the program is executed (hold, step, free run or execute once). Program start address can be programmed to Program
Counter (PC) register. The Program Counter is reset to zero when the PC’s upper limit value is reached.
Halt — In this mode instruction execution aborts immediately and engine operation halts. Execution can be continued if operation
mode is set to Run again.
For executing the programs following four modes exist. Execution mode is selected with the four push buttons. Functions of the
buttons from left to right are:
AN-2227 - LP5523 Evaluation Kit
Copyright © 1999-2012, Texas Instruments Incorporated 11