Isomet Modular Synthesiser (iMS) API
v1.4.2
iMS API
|
Create a register write to send to the DDS IC. More...
#include <include\Auxiliary.h>
Public Types | |
enum | Name : std::uint8_t { Name::CSR = 0, Name::FR1 = 1, Name::FR2 = 2, Name::CFR = 3, Name::CFTW0 = 4, Name::CPOW0 = 5, Name::ACR = 6, Name::LSRR = 7, Name::RDW = 8, Name::FDW = 9, Name::CW1 = 10, Name::CW2 = 11, Name::CW3 = 12, Name::CW4 = 13, Name::CW5 = 14, Name::CW6 = 15, Name::CW7 = 16, Name::CW8 = 17, Name::CW9 = 18, Name::CW10 = 19, Name::CW11 = 20, Name::CW12 = 21, Name::CW13 = 22, Name::CW14 = 23, Name::CW15 = 24, Name::UPDATE = 64 } |
the abbreviated register name for each register accessible in the DDS IC More... | |
Public Member Functions | |
int | append (const std::uint8_t &) |
Add an additional byte to the end of the data array. More... | |
std::vector< std::uint8_t > | bytes () const |
Get the full byte array for programming to the FileSystem Shouldn't be called in user code. | |
Constructor & Destructor | |
DDSScriptRegister (Name name) | |
Constructor for DDSScriptRegister Object. More... | |
DDSScriptRegister (Name name, const std::initializer_list< std::uint8_t > &data) | |
DDSScriptRegister (const DDSScriptRegister &) | |
Copy Constructor. | |
DDSScriptRegister & | operator= (const DDSScriptRegister &) |
Assignment Constructor. | |
~DDSScriptRegister () | |
Destructor. | |
Create a register write to send to the DDS IC.
The DDS IC that generates RF signals on the Synthesiser can be manually programmed to access advanced features that wouldn't normally be available through the iMS API. To do this requires a knowledge and understanding of the Analog Devices AD9959 Frequency Synthesiser IC and its register map.
If it is decided that it is necessary to manually program the AD9959, a sequence of register writes can be generated (called a DDS Script) and stored in the Synthesiser Filesystem. The application software may then recall the script from the filesystem and execute it to commit the register writes to the AD9959.
Each individual register write is an invocation of the DDSScriptRegister class. The class object consists of a key-value pair where the key is the name of the register to access (corresponding to the register abbreviation in the datasheet) and the value is a list of bytes to transfer to the AD9959 following the register command.
There must be the exact number of data bytes sent after the register command as specified in the datasheet. The class knows internally what this number is and enforces it, so that any extra bytes are truncated and any missing are zero-filled.
Note that the bottom four bits of data sent to the CSR register cannot be overwritten since they define the hardware interface to the register access port.
Some of the register writes do not take effect until a signal line called Update Clock is asserted to the AD9959. This can be triggered by creating a DDSScriptRegister object with the Name property set to UPDATE. It takes no byte data as input.
|
strong |
the abbreviated register name for each register accessible in the DDS IC
Enumerator | |
---|---|
CSR |
Channel Select Register. |
FR1 |
Function Register 1. |
FR2 |
Function Register 2. |
CFR |
Channel Function Register. |
CFTW0 |
Channel Frequency Tuning Word. |
CPOW0 |
Channel Phase Offset Word. |
ACR |
Amplitude Control Register. |
LSRR |
Linear Sweep Ramp Rate. |
RDW |
LSR Rising Delta Word. |
FDW |
LSR Falling Delta Word. |
CW1 |
Channel Word 1. |
CW2 |
Channel Word 2. |
CW3 |
Channel Word 3. |
CW4 |
Channel Word 4. |
CW5 |
Channel Word 5. |
CW6 |
Channel Word 6. |
CW7 |
Channel Word 7. |
CW8 |
Channel Word 8. |
CW9 |
Channel Word 9. |
CW10 |
Channel Word 10. |
CW11 |
Channel Word 11. |
CW12 |
Channel Word 12. |
CW13 |
Channel Word 13. |
CW14 |
Channel Word 14. |
CW15 |
Channel Word 15. |
UPDATE |
Issue Update Clock (pseudo register write) |
iMS::DDSScriptRegister::DDSScriptRegister | ( | Name | name | ) |
Constructor for DDSScriptRegister Object.
Example:
[in] | name | Create the register object accessing the specified Register |
iMS::DDSScriptRegister::DDSScriptRegister | ( | Name | name, |
const std::initializer_list< std::uint8_t > & | data | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Example:
[in] | name | Create the register object accessing the specified Register |
[in] | data | initialise the data byte array from this input field |
int iMS::DDSScriptRegister::append | ( | const std::uint8_t & | ) |
Add an additional byte to the end of the data array.