This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TSW30SH84EVM: How to convert registers format into FTDI pattern format?

Part Number: TSW30SH84EVM

I am working on a LabVIEW program to download the configuration files to control TSW30SH84EVM. There is an available FTDI LabVIEW program to do this, but the program uses a different format. As there is no document to explain how to convert them, I hope help can be found here. Two documents are attached, one is the configuration txt file and the other is the FTDI example txt file. 

   x00	x049C
   x01	x050E
   x02	x7002
   x03	xA000
   x04	xFFFF
   x05	x3F78
   x06	x2F00
   x07	xFFFF
   x08	x0000
   x09	x8000
   x0A	x0000
   x0B	x0000
   x0C	x05A6
   x0D	x05A6
   x0E	x05A6
   x0F	x05A6
   x10	x0000
   x11	x0000
   x12	x0000
   x13	x0000
   x14	x5555
   x15	x0535
   x16	x5555
   x17	x0535
   x18	x280F
   x19	x0840
   x1A	x0020
   x1B	x0800
   x1C	x0000
   x1D	x0000
   x1E	x1111
   x1F	x8882
   x20	x8801
   x22	x1B1B
   x23	x07FF
   x24	x1000
   x25	x7A78
   x26	xB6B6
   x27	xEAEA
   x28	x4545
   x29	x1A1A
   x2A	x1616
   x2B	xAAAA
   x2C	xC6C6
   x2D	x0004
   x2E	x0000
   x2F	x0000
   x30	x0000
   x7F	x0000
LMK REGISTERS
   x00	x4000000
   x01	x400A0F0
   x02	x0000002
   x03	x0000064
   x04	x0000040
   x05	x4000000
   x06	x2800000
   x07	x042A800
   x08	x0288800
   x0A	x48A0210
   x0B	x1BF8880
   x0C	x098600D
   x0D	x1D81033
   x0E	x0900000
   x0F	x4000400
   x10	x00AA820
   x18	x0000006
   x19	x0080800
   x1A	x47D2400
   x1B	x08000C1
   x1C	x03E8180
   x1D	x0001200
   x1E	x0001200
ATTENUATOR AB
0.00
ATTENUATOR CD
0.00
Write																																																			
0	0	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	0
1	0	0	0	A6	A6	A5	A5	A4	A4	A3	A3	A2	A2	A1	A1	A0	A0	D15	D15	D14	D14	D13	D13	D12	D12	D11	D11	D10	D10	D9	D9	D8	D8	D7	D7	D6	D6	D5	D5	D4	D4	D3	D3	D2	D2	D1	D1	D0	D0	0	0
2	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0
3	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0
4	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0
5	1	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	1
6	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0
7	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0
																																																			
Read																																																			
0	0	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	0
1	0	1	1	A6	A6	A5	A5	A4	A4	A3	A3	A2	A2	A1	A1	A0	A0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0
2	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0
3	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0
4	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1
5	1	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	1
6	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	D15	D15	D14	D14	D13	D13	D12	D12	D11	D11	D10	D10	D9	D9	D8	D8	D7	D7	D6	D6	D5	D5	D4	D4	D3	D3	D2	D2	D1	D1	D0	D0	0	0
7	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0

  • Hello Fuquan,

    I believe you had posted on a separate post regarding the FTDI DLL Labview program. The scope of the program is to allow users to read and write to each EVM individual registers. If you want to load the entire text file of configuration, the best way is to create a wrapper program that can strip out spaces and tabs and insert the proper programming text into the DLL. This is really the intention of the original DLL development (and also the scope/funding of the software project). The user will need to do additional work on the wrapper program.

    The original post for this Labview based DLL is in the following:
    e2e.ti.com/.../1629194

    many users have used the DLL and imported into their end applications along with various wrappers to work with the SPI register interface. You can do some research on various programming languages on how to do so.

    I do not believe we are expanding this program further since the basic functionalities are being met already.

    There is still the unanswered question regarding 64-bit compatibility in your original post. i will leave that one open for now and am waiting for software team's feedback. I will close this post for now.

    -kang
  • Hi Kang,

    Thanks for your patient explanation. I understand your concern and tried to follow your instruction. There are two issues for me:

    1) what is the function of the FTDI pattern text file? I assume the pattern file is predefined and provided by TI for different parts, so I don't need to make changes on the files. I have attached two text files that I downloaded from an earlier post for the TSW30SH84EVM. 

    Write																																																		
    0	0	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0
    1	0	0	0	A6	A6	A5	A5	A4	A4	A3	A3	A2	A2	A1	A1	A0	A0	D15	D15	D14	D14	D13	D13	D12	D12	D11	D11	D10	D10	D9	D9	D8	D8	D7	D7	D6	D6	D5	D5	D4	D4	D3	D3	D2	D2	D1	D1	D0	D0	0
    2	1	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	1
    3	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1
    4	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0
    5	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0
    6	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0
    7	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0
    
    Read																																																		
    0	0	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0
    1	0	1	1	A6	A6	A5	A5	A4	A4	A3	A3	A2	A2	A1	A1	A0	A0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0
    2	1	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	1
    3	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1
    4	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1
    5	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1
    6	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1
    7	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	D15	D15	D14	D14	D13	D13	D12	D12	D11	D11	D10	D10	D9	D9	D8	D8	D7	D7	D6	D6	D5	D5	D4	D4	D3	D3	D2	D2	D1	D1	D0	D0	1
    

    Write																																																		
    0	0	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0	1	0
    1	0	0	0	A6	A6	A5	A5	A4	A4	A3	A3	A2	A2	A1	A1	A0	A0	D15	D15	D14	D14	D13	D13	D12	D12	D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    3	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1
    4	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1
    5	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1
    6	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1
    7	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	D15	D15	D14	D14	D13	D13	D12	D12	D11	D11	D10	D10	D9	D9	D8	D8	D7	D7	D6	D6	D5	D5	D4	D4	D3	D3	D2	D2	D1	D1	D0	D0	1
    

    2) How can write data to the device? Here are the steps that I follow:

    a. check the device with FT_Prog.exe to make sure the name of the FTDI port. I can see 'TSW308xEVM' and 'TSW1400'. I choose 'TSW308xEVM' which has LMK04800 and DAC34x84 integrated.

    b.I run the GUIs and generated the desired waveform shown below using internal VCO.

    c. To prove that I can talk to the device. I turned off the GUIs and load the LabVIEW program provided by TI. I want to change the current Clock8/9 divider from 64 to 128 (which can change the sampling rate), and I know the required LMK registers is 'x04 x0000080', so I put the write address to 'x4', and data to be written as 'x80', the FTDI pattern file is the text file shown in 1, the device Description is 'TSW308xEVM'.

    d. However, the result is negative. The desired waveform is disappeared, as shown below.  I am not sure what I did wrong, or am I messing something here.

  • Hello Fuquan

    Fuquan Wang said:

    1) what is the function of the FTDI pattern text file? I assume the pattern file is predefined and provided by TI for different parts, so I don't need to make changes on the files. I have attached two text files that I downloaded from an earlier post for the TSW30SH84EVM

    (Please visit the site to view this file)

    (Please visit the site to view this file)

    It is to map out the SCLK, SDOUT, SDATA, and SDENB bits in read and write sequence. The mapping is based on FTDI bit-banging sequence and also the pin out of the FTDI GPIO output with respect to the SPI lines. Usually the user have no need to change it.

    Fuquan Wang said:
    2) How can write data to the device? Here are the steps that I follow:

    I am not sure what you mean. The purpose of the Labview DLL is to write the SPI data to the DAC or the LMK. The FTDI FT_PROG is to program the USB ID for different FTDI chip identification.

    Fuquan Wang said:
    c. To prove that I can talk to the device. I turned off the GUIs and load the LabVIEW program provided by TI. I want to change the current Clock8/9 divider from 64 to 128 (which can change the sampling rate), and I know the required LMK registers is 'x04 x0000080', so I put the write address to 'x4', and data to be written as 'x80', the FTDI pattern file is the text file shown in 1, the device Description is 'TSW308xEVM'.

    The TSW1400 that you are using has a reference clock that needed to run the firmware fabric. You will need to set the correct clock frequency for the correct operation based on the data rate and interpolation. 

  • Hi Kang,

    The very basic question is how to send a DAC register or LMK register using the Labview DLL, for example 'x04 x00000080' to LMK04800, s shown in the figure below. It looks right but it does not work.

  • Fuquan,

    You have the right idea. For the LMK04808, you can find some default registers to read back to confirm correct values and change it and re-verify. we do not support LMK04808 products here in this forum.

    Here is an example snapshot of the DAC348xEVM with 0x7F register read back.

  • I realized that there are some differences.

    1) The model used in my setup is TSW30SH84 EVM, which has DAC34x84 and LMK04800 integrated, but the one shown in your screenshot is DAC348xEVM.

    2) The FTDI pattern file I am using is for DAC34x84, so is there a special version for TSW30SH84 EVM.

    Here is another example that I am trying to control the DAC gain, the corresponding DAC registers is 'x03 x5000', which set the gain to 5 dB. However, the output is turned off if the LabView DLL is used, as the picture showed below. I would guess the FDTI pattern file is not correct.

  • Hello Fuquan,

    I will have to check on the TSW30H84 EVM and get back to you. I do not have one in the lab, so need to order one and test it out. There is a CPLD in between the FTDI chip for SPI bit-bang and the actual DAC34H84. I suspect there could be a firmware issue or something.

    I recommend that you probe out the SPI lines of DAC34H84 (refer to the TSW30H84 schematic and check for SPI timing and the proper return of data, especially known registers with valid bit output)
    -Kang
  • Fuquan,

    The EVMs have not been delivered yet. If you really need to have a single software to talk to multiple TSWs, I can send you the source code of the TSW GUI. You will have to modify the software yourself to talk to two different TSW EVMs. Please note the software is given as is and we cannot support you further. Contact me offline if you are interested.

    -Kang