Interfacing LM1971 Attenuator with Teensy 4.1 SPI

RichardL

Member
Hi,

Before I start bashing my head against the wall ... has anyone any experience with using the LM1971 with a Teensy 4.1 SPI bus that they are willing to share?

Best Regards
RichardL
 
Hi Folks,

Hi,
<<bashing my head against the wall...>>
RichardL

OK, no replies so head and wall were employed.

I managed to make the '1971 respond by using SPI mode 3 :

Code:
SPISettings settingsA(2000000, MSBFIRST, SPI_MODE3);

I'm not sure how this complies precisely with the /LOAD to CLOCK timing requirements in the '1971 manual but it appears to work fine so maybe I don't understand the datasheet, the chip is more tolerant of timing or the price of cheese has topped out.:)


LM1971 Side topics:
============
RFI: I'm wary of extending the SPI lines from the Teensy too far if it is running fast / has fast edges. The 2 MHz rate I'm using is not extreme by any stretch but I did drive the MOSI and CLK lines via buffers with tri-state outputs with the buffers being close to the Teensy. I set the buffers tri-state when not talking to the synthesizer and attenuator chips (mounted on the front panel) down a few inches of ribbon cable. I ensure the rest state of MOSI and CLK lines at the front panel end are OK with pull down resistors. (MISO not needed.) I'm also hoping the RFI from the very busy SPI bus will be reduced by not having the bus driving the cables from the Teensy to the front panel when not in use. I will find out when the whole project gets into it's metal box.

Square wave output: The '1971 can provide SINE and TRIANGLE outputs at c.600mV pk-pk output and a square wave on the same pin at full Vcc output... nice to have but it would have been so much better if the square wave were at the same amplitude. I've worked around this by adding 18dB to the attenuator value when in square wave mode... although this is a cost to the user in that the 60dB attenuator range in SINE and TRIANGLE modes is reduced to 42dB in SQUARE; tough but workable.


RichardL
 
Back
Top