
PulseBlaster
•
The first is the hexadecimal 0xFFFFFF which corresponds to setting the 24 output bits to a
logical high since it translates to a binary string of 24 1's.
•
The second parameter is CONTINUE which means to proceed on to the next instruction after
this one completes. Other examples for what this parameter could be are BRANCH or
LOOP.
•
The third parameter is the instruction data field which, for a CONTINUE instruction, is ignored
because it is unnecessary for that particular instruction. In the event of another instruction,
such as BRANCH, this parameter would correspond to the target of the BRANCH instruction.
•
The fourth parameter is 200.0*ms which means that this instruction will last for 200 ms.
A simple program to generate a square wave signal on all 24 output bits will have two intervals (as
in the GUI Interpreter described earlier), as shown below:
start= pb_inst(0xFFFFFF, CONTINUE, 0, 200.0*ms);
pb_inst(0x000000, BRANCH, start, 200.0*ms);
The first line of the code above corresponds to the logical "one” on all output bits. The second line
corresponds to the logical "zero," after which the program branches (jumps) back to the beginning,
thus resulting in a continuous generation of a square wave on all outputs.
A complete C program will have, in addition to the two lines above, the initialization section, the
closing section and, optionally, the (software) trigger to start the execution immediately upon launch
of the program. For more detailed information on programming the board using C/C++, see the
2021/03/22
17