Chapter 9. Advanced table mode (XRF)
82
Listing 9.6 demonstrates how to linearly ramp the
RF
power in 100
steps using a single instruction instead of 100 individual instructions
REPn
by using the
notation. The result is shown in Figure 9.3.
Listing 9.7 demonstrates an equivalent formulation based on the
TABLE,RAMP
command, which provides the convenience of specifying
the power in real units (dBm) instead of hexadecimal increments.
MODE,1,TPA
TABLE,CLEAR,1
# fast parameter is power
TABLE,XPARAM,1,POW
# set power to OFF
TABLE,APPEND,1,POW,0x0,0x1
# linear ramp up (100 steps)
TABLE,APPEND,1,POW,0x10,0x1,REP100
# linear ramp down (100 steps)
TABLE,APPEND,1,POW,-0x10,0x1,REP100
# reset power to OFF
TABLE,APPEND,1,POW,0x0,0x1
# loop the ramp 2 more times
TABLE,LOOP,1,-1,1,2
# loop the ramp 2 more times
TABLE,APPEND,1,POW,0x0,0x1
Listing 9.6: Creation of a triangle wave envelope in advanced table mode,
using only five table entries.
TABLE,CLEAR,1
TABLE,XPARAM,1,POW
# define a ramp from off (0x0) to 0dBm
TABLE,RAMP,1,POW,0x0,0dBm,16ns,100
# append the reverse of the ramp
TABLE,RAMP,1,POW,0dBm,0x0,16ns,100
# loop back to the beginning twice more
TABLE,LOOP,1,-1,1,2
# last entry cannot be a loop
TABLE,APPEND,1,POW,0x0,16ns
Listing 9.7: Alternate specification of triangle wave using TABLE,RAMP.
Need help?
Do you have a question about the ARF021 and is the answer not in the manual?