User manual
MEX ASPERA-3
Ref.:
ME-ASP-MA-0002
Issue:
Issue 1 Rev. 4
Date:
15/2/2002
Page:
Page 36 of 58
ASPERA-3 EGSE User Manual
IFSI
CNR
3.1.3.5.2 Program
A program is a sequence of low level commands (3.1.3.1) transmitted from SCOE to MEXILT, stored
and executed on MEXILT. MEXILT store the programs in a 512 16 bit word circular buffer so that
more programs can be stored, each one numbered in sequence.
The following table shows the “pseudo instructions” available for programs.
Instruction Parameters Description
HALT Terminate application
RUNP
# prog Run prog. N. [1 .. x]
ENDP
Terminate current program
SETRX
+-RX Increment decrement RX. Inc[bit4=0], dec[bit4=1].
RX[bit 0..3]
RX, N Store N in RX. RX[bit 0..3]
MOVRX
RXn,RXm Copy RXn to RXm.
READRX
RXn,nRX Transmit nRX. Starting from RXn
JUMP
RX+-N Jmp +-N w16. If RX==0 jump unconditioned.
Rx[bit 15..12], num[bit 9..0] (-num [bit 10=1]). If
bit 11=1 decrement Rx (after jump).
If Rx!=0 => jump until Rx!=0.
Es: jump 2c08(Hex) => jump -8 tlc until Rx[2]>0
and decrement Rx[2]
NOTE that each command is formed by:
Acronym, Nw16, and [parameters]. So to skip back
the only JUMP instruction you have to skip back 3
w16
WAIT
Nsec Sleep for N seconds
WAITRX
RX Sleep for RX milliseconds
WAITMS
Nmsec Sleep for N msec milliseconds
In order to transmit a program to MEXILT the command sequence must be preceded by the PROG
low-level command. At the end of the program transmission use the IMME or NORM low-level
command
Example:
Prog ; Set program mode
tlc 0xaa55 ; send telecommand aa55 hex
wait 3 ; wait 3 seconds
tlc 0x5aa5 ; send telecommand 5aa5 hex
wait 3 ; wait 3 seconds
jump 0x40f ; jump –15 to “tlc 0xaa55”
endp ; end of program (useless in this example)
imme ; Set immediate mode
runp 1 ; execute the first stored program.
; To terminate send ENDP as IMME command