Maxim Integrated MAX11131 SPI 12-bit 16-channel ADC with SampleSet
Dependents: MAX11131BOB_Tester MAX11131BOB_12bit_16ch_SampleSet_SPI_ADC MAX11131BOB_Serial_Tester
Revision 11:eaaf13fe381e, committed 2021-06-06
- Comitter:
- whismanoid
- Date:
- Sun Jun 06 03:47:56 2021 -0700
- Parent:
- 10:92aedaa14cce
- Commit message:
- selftest SPIfrequency SPIgetFrequency
Changed in this revision
MAX11131.cpp | Show annotated file Show diff for this revision Revisions of this file |
MAX11131.h | Show annotated file Show diff for this revision Revisions of this file |
diff -r 92aedaa14cce -r eaaf13fe381e MAX11131.cpp --- a/MAX11131.cpp Thu Jun 03 01:38:24 2021 -0700 +++ b/MAX11131.cpp Sun Jun 06 03:47:56 2021 -0700 @@ -160,16 +160,17 @@ // set SPI SCLK frequency for MAX11131 // -void MAX11131::spi_frequency(int spi_sclk_Hz) +void MAX11131::SPIfrequency(int spi_sclk_Hz) { -#warning "unknown interface function spi_frequency" + m_SPI_SCLK_Hz = spi_sclk_Hz; + m_spi.frequency(m_SPI_SCLK_Hz); } // get SPI SCLK frequency for MAX11131 // -int MAX11131::get_spi_frequency() +int MAX11131::SPIgetFrequency() { -#warning "unknown interface function get_spi_frequency" + return m_SPI_SCLK_Hz; } // Assert SPI Chip Select @@ -519,23 +520,43 @@ // // // @test group SPI48_3MSps // support 3MSps parts SCLK<=48MHz (enabled by default) // @test group SPI48_3MSps tinyTester.print("SPI 48MHz") -// @test group SPI48_3MSps spi_frequency(48000000); // support 3MSps parts SCLK<=48MHz -// @test group SPI48_3MSps get_spi_frequency() expect 48000000 +// @test group SPI48_3MSps SPIfrequency(48000000); // support 3MSps parts SCLK<=48MHz +// @test group SPI48_3MSps SPIgetFrequency() expect 48000000 +// @test group SPI48_3MSps tinyTester.settle_time_msec = 250 // default 250 +// @test group SPI48_3MSps tinyTester.Wait_Output_Settling() +// @test group SPI48_3MSps SPIoutputCS(0) +// @test group SPI48_3MSps SPIread16bits() +// @test group SPI48_3MSps SPIoutputCS(1) // // // @test group SPI16MHz_1MSps // support 1MSps parts SCLK<=16MHz (enabled by default) // @test group SPI16MHz_1MSps tinyTester.print("SPI 16MHz") -// @test group SPI16MHz_1MSps spi_frequency(16000000); // support 1MSps parts SCLK<=16MHz -// @test group SPI16MHz_1MSps get_spi_frequency() expect 16000000 +// @test group SPI16MHz_1MSps SPIfrequency(16000000); // support 1MSps parts SCLK<=16MHz +// @test group SPI16MHz_1MSps SPIgetFrequency() expect 16000000 +// @test group SPI16MHz_1MSps tinyTester.settle_time_msec = 250 // default 250 +// @test group SPI16MHz_1MSps tinyTester.Wait_Output_Settling() +// @test group SPI16MHz_1MSps SPIoutputCS(0) +// @test group SPI16MHz_1MSps SPIread16bits() +// @test group SPI16MHz_1MSps SPIoutputCS(1) // // // @test group SPI8MHz_500kSps // support 500kSps parts SCLK<=8MHz (enabled by default) // @test group SPI8MHz_500kSps tinyTester.print("SPI 8MHz") -// @test group SPI8MHz_500kSps spi_frequency(8000000); // support 500kSps parts SCLK<=8MHz -// @test group SPI8MHz_500kSps get_spi_frequency() expect 8000000 +// @test group SPI8MHz_500kSps SPIfrequency(8000000); // support 500kSps parts SCLK<=8MHz +// @test group SPI8MHz_500kSps SPIgetFrequency() expect 8000000 +// @test group SPI8MHz_500kSps tinyTester.settle_time_msec = 250 // default 250 +// @test group SPI8MHz_500kSps tinyTester.Wait_Output_Settling() +// @test group SPI8MHz_500kSps SPIoutputCS(0) +// @test group SPI8MHz_500kSps SPIread16bits() +// @test group SPI8MHz_500kSps SPIoutputCS(1) // // // @test group SPI12MHz_1MSps // support 1MSps parts SCLK<=16MHz (enabled by default) // @test group SPI12MHz_1MSps tinyTester.print("SPI 12MHz") -// @test group SPI12MHz_1MSps spi_frequency(12000000); // support 1MSps parts SCLK<=16MHz -// @test group SPI12MHz_1MSps get_spi_frequency() expect 12000000 +// @test group SPI12MHz_1MSps SPIfrequency(12000000); // support 1MSps parts SCLK<=16MHz +// @test group SPI12MHz_1MSps SPIgetFrequency() expect 12000000 +// @test group SPI12MHz_1MSps tinyTester.settle_time_msec = 250 // default 250 +// @test group SPI12MHz_1MSps tinyTester.Wait_Output_Settling() +// @test group SPI12MHz_1MSps SPIoutputCS(0) +// @test group SPI12MHz_1MSps SPIread16bits() +// @test group SPI12MHz_1MSps SPIoutputCS(1) // // // @test tinyTester.blink_time_msec = 75 // default 75 resume hardware self test // tinyTester.blink_time_msec = 75;
diff -r 92aedaa14cce -r eaaf13fe381e MAX11131.h --- a/MAX11131.h Thu Jun 03 01:38:24 2021 -0700 +++ b/MAX11131.h Sun Jun 06 03:47:56 2021 -0700 @@ -1476,12 +1476,12 @@ //---------------------------------------- // set SPI SCLK frequency for MAX11131 // - void spi_frequency(int spi_sclk_Hz); + void SPIfrequency(int spi_sclk_Hz); //---------------------------------------- // get SPI SCLK frequency for MAX11131 // - int get_spi_frequency(); + int SPIgetFrequency(); //---------------------------------------- // Assert SPI Chip Select @@ -1611,23 +1611,43 @@ /// // /// @test group SPI48_3MSps // support 3MSps parts SCLK<=48MHz (enabled by default) /// @test group SPI48_3MSps tinyTester.print("SPI 48MHz") - /// @test group SPI48_3MSps spi_frequency(48000000); // support 3MSps parts SCLK<=48MHz - /// @test group SPI48_3MSps get_spi_frequency() expect 48000000 + /// @test group SPI48_3MSps SPIfrequency(48000000); // support 3MSps parts SCLK<=48MHz + /// @test group SPI48_3MSps SPIgetFrequency() expect 48000000 + /// @test group SPI48_3MSps tinyTester.settle_time_msec = 250 // default 250 + /// @test group SPI48_3MSps tinyTester.Wait_Output_Settling() + /// @test group SPI48_3MSps SPIoutputCS(0) + /// @test group SPI48_3MSps SPIread16bits() + /// @test group SPI48_3MSps SPIoutputCS(1) /// // /// @test group SPI16MHz_1MSps // support 1MSps parts SCLK<=16MHz (enabled by default) /// @test group SPI16MHz_1MSps tinyTester.print("SPI 16MHz") - /// @test group SPI16MHz_1MSps spi_frequency(16000000); // support 1MSps parts SCLK<=16MHz - /// @test group SPI16MHz_1MSps get_spi_frequency() expect 16000000 + /// @test group SPI16MHz_1MSps SPIfrequency(16000000); // support 1MSps parts SCLK<=16MHz + /// @test group SPI16MHz_1MSps SPIgetFrequency() expect 16000000 + /// @test group SPI16MHz_1MSps tinyTester.settle_time_msec = 250 // default 250 + /// @test group SPI16MHz_1MSps tinyTester.Wait_Output_Settling() + /// @test group SPI16MHz_1MSps SPIoutputCS(0) + /// @test group SPI16MHz_1MSps SPIread16bits() + /// @test group SPI16MHz_1MSps SPIoutputCS(1) /// // /// @test group SPI8MHz_500kSps // support 500kSps parts SCLK<=8MHz (enabled by default) /// @test group SPI8MHz_500kSps tinyTester.print("SPI 8MHz") - /// @test group SPI8MHz_500kSps spi_frequency(8000000); // support 500kSps parts SCLK<=8MHz - /// @test group SPI8MHz_500kSps get_spi_frequency() expect 8000000 + /// @test group SPI8MHz_500kSps SPIfrequency(8000000); // support 500kSps parts SCLK<=8MHz + /// @test group SPI8MHz_500kSps SPIgetFrequency() expect 8000000 + /// @test group SPI8MHz_500kSps tinyTester.settle_time_msec = 250 // default 250 + /// @test group SPI8MHz_500kSps tinyTester.Wait_Output_Settling() + /// @test group SPI8MHz_500kSps SPIoutputCS(0) + /// @test group SPI8MHz_500kSps SPIread16bits() + /// @test group SPI8MHz_500kSps SPIoutputCS(1) /// // /// @test group SPI12MHz_1MSps // support 1MSps parts SCLK<=16MHz (enabled by default) /// @test group SPI12MHz_1MSps tinyTester.print("SPI 12MHz") - /// @test group SPI12MHz_1MSps spi_frequency(12000000); // support 1MSps parts SCLK<=16MHz - /// @test group SPI12MHz_1MSps get_spi_frequency() expect 12000000 + /// @test group SPI12MHz_1MSps SPIfrequency(12000000); // support 1MSps parts SCLK<=16MHz + /// @test group SPI12MHz_1MSps SPIgetFrequency() expect 12000000 + /// @test group SPI12MHz_1MSps tinyTester.settle_time_msec = 250 // default 250 + /// @test group SPI12MHz_1MSps tinyTester.Wait_Output_Settling() + /// @test group SPI12MHz_1MSps SPIoutputCS(0) + /// @test group SPI12MHz_1MSps SPIread16bits() + /// @test group SPI12MHz_1MSps SPIoutputCS(1) /// // /// @test tinyTester.blink_time_msec = 75 // default 75 resume hardware self test /// tinyTester.blink_time_msec = 75;