Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: MAX5171
Revision 5:965408a612dd, committed 2020-05-15
- Comitter:
- whismanoid
- Date:
- Fri May 15 08:25:05 2020 +0000
- Parent:
- 4:c6e15fe3ea9d
- Commit message:
- Step through several test points in sequence
Changed in this revision
Hello_MAX5171.cpp | Show annotated file Show diff for this revision Revisions of this file |
MAX5171.lib | Show annotated file Show diff for this revision Revisions of this file |
--- a/Hello_MAX5171.cpp Fri Apr 03 06:44:33 2020 +0000 +++ b/Hello_MAX5171.cpp Fri May 15 08:25:05 2020 +0000 @@ -1,4 +1,4 @@ -// /******************************************************************************* +// /******************************************************************************* // * Copyright (C) 2020 Maxim Integrated Products, Inc., All Rights Reserved. // * // * Permission is hereby granted, free of charge, to any person obtaining a @@ -137,31 +137,115 @@ uint16_t code; // // example #1 - code = 0x3332; // 80.0% of full scale REF(2.50V) = 2.00V (FORCE_BIP/SENSE_BIP: 1.50V) + code = 0x3fff; // 100.0% of full scale REF(2.50V) = 2.50V (FB=1-2:FORCE_BIP/SENSE_BIP: 2.50V) (FB=2-3:FORCE_UNI/SENSE_UNI: 5.00V) g_MAX5171_device.CODE_LOAD(code); wait_ms(3000); // wait_ms(unsigned long interval_msec) // // example #2 - code = 0x1fff; // 50.0% of full scale REF(2.50V) = 1.25V (FORCE_BIP/SENSE_BIP: 0.00V) + code = 0x3998; // 90.0% of full scale REF(2.50V) = 2.25V (FB=1-2:FORCE_BIP/SENSE_BIP: 2.00V) (FB=2-3:FORCE_UNI/SENSE_UNI: 4.50V) g_MAX5171_device.CODE_LOAD(code); wait_ms(3000); // wait_ms(unsigned long interval_msec) // // example #3 - code = 0x1999; // 40.0% of full scale REF(2.50V) = 1.00V (FORCE_BIP/SENSE_BIP: -0.50V) + code = 0x3332; // 80.0% of full scale REF(2.50V) = 2.00V (FB=1-2:FORCE_BIP/SENSE_BIP: 1.50V) (FB=2-3:FORCE_UNI/SENSE_UNI: 4.00V) g_MAX5171_device.CODE_LOAD(code); wait_ms(3000); // wait_ms(unsigned long interval_msec) // // example #4 - code = 0x0000; // 0.0% of full scale REF(2.50V) = 0.00V (FORCE_BIP/SENSE_BIP: -2.50V) + code = 0x2ccc; // 70.0% of full scale REF(2.50V) = 1.75V (FB=1-2:FORCE_BIP/SENSE_BIP: 1.00V) (FB=2-3:FORCE_UNI/SENSE_UNI: 3.50V) g_MAX5171_device.CODE_LOAD(code); wait_ms(3000); // wait_ms(unsigned long interval_msec) // // example #5 - code = 0x3fff; // 100.0% of full scale REF(2.50V) = 2.50V (FORCE_BIP/SENSE_BIP: 2.50V) + code = 0x2665; // 60.0% of full scale REF(2.50V) = 1.50V (FB=1-2:FORCE_BIP/SENSE_BIP: 0.50V) (FB=2-3:FORCE_UNI/SENSE_UNI: 3.00V) + g_MAX5171_device.CODE_LOAD(code); + wait_ms(3000); // wait_ms(unsigned long interval_msec) + // + // example #6 + code = 0x1fff; // 50.0% of full scale REF(2.50V) = 1.25V (FB=1-2:FORCE_BIP/SENSE_BIP: 0.00V) (FB=2-3:FORCE_UNI/SENSE_UNI: 2.50V) + g_MAX5171_device.CODE_LOAD(code); + wait_ms(3000); // wait_ms(unsigned long interval_msec) + // + // example #7 + code = 0x1999; // 40.0% of full scale REF(2.50V) = 1.00V (FB=1-2:FORCE_BIP/SENSE_BIP: -0.50V) (FB=2-3:FORCE_UNI/SENSE_UNI: 2.00V) + g_MAX5171_device.CODE_LOAD(code); + wait_ms(3000); // wait_ms(unsigned long interval_msec) + // + // example #8 + code = 0x1332; // 30.0% of full scale REF(2.50V) = 0.75V (FB=1-2:FORCE_BIP/SENSE_BIP: -1.00V) (FB=2-3:FORCE_UNI/SENSE_UNI: 1.50V) + g_MAX5171_device.CODE_LOAD(code); + wait_ms(3000); // wait_ms(unsigned long interval_msec) + // + // example #9 + code = 0x0ccc; // 20.0% of full scale REF(2.50V) = 0.50V (FB=1-2:FORCE_BIP/SENSE_BIP: -1.50V) (FB=2-3:FORCE_UNI/SENSE_UNI: 1.00V) + g_MAX5171_device.CODE_LOAD(code); + wait_ms(3000); // wait_ms(unsigned long interval_msec) + // + // example #10 + code = 0x0666; // 10.0% of full scale REF(2.50V) = 0.25V (FB=1-2:FORCE_BIP/SENSE_BIP: -2.00V) (FB=2-3:FORCE_UNI/SENSE_UNI: 0.50V) + g_MAX5171_device.CODE_LOAD(code); + wait_ms(3000); // wait_ms(unsigned long interval_msec) + // + // example #11 + code = 0x0000; // 0.0% of full scale REF(2.50V) = 0.00V (FB=1-2:FORCE_BIP/SENSE_BIP: -2.50V) (FB=2-3:FORCE_UNI/SENSE_UNI: 0.00V) + g_MAX5171_device.CODE_LOAD(code); + wait_ms(3000); // wait_ms(unsigned long interval_msec) + // + // example #12 + code = 0x0000; // 0.0% of full scale REF(2.50V) = 0.00V (FB=1-2:FORCE_BIP/SENSE_BIP: -2.50V) (FB=2-3:FORCE_UNI/SENSE_UNI: 0.00V) + g_MAX5171_device.CODE_LOAD(code); + wait_ms(3000); // wait_ms(unsigned long interval_msec) + // + // example #13 + code = 0x0666; // 10.0% of full scale REF(2.50V) = 0.25V (FB=1-2:FORCE_BIP/SENSE_BIP: -2.00V) (FB=2-3:FORCE_UNI/SENSE_UNI: 0.50V) + g_MAX5171_device.CODE_LOAD(code); + wait_ms(3000); // wait_ms(unsigned long interval_msec) + // + // example #14 + code = 0x0ccc; // 20.0% of full scale REF(2.50V) = 0.50V (FB=1-2:FORCE_BIP/SENSE_BIP: -1.50V) (FB=2-3:FORCE_UNI/SENSE_UNI: 1.00V) + g_MAX5171_device.CODE_LOAD(code); + wait_ms(3000); // wait_ms(unsigned long interval_msec) + // + // example #15 + code = 0x1332; // 30.0% of full scale REF(2.50V) = 0.75V (FB=1-2:FORCE_BIP/SENSE_BIP: -1.00V) (FB=2-3:FORCE_UNI/SENSE_UNI: 1.50V) + g_MAX5171_device.CODE_LOAD(code); + wait_ms(3000); // wait_ms(unsigned long interval_msec) + // + // example #16 + code = 0x1999; // 40.0% of full scale REF(2.50V) = 1.00V (FB=1-2:FORCE_BIP/SENSE_BIP: -0.50V) (FB=2-3:FORCE_UNI/SENSE_UNI: 2.00V) + g_MAX5171_device.CODE_LOAD(code); + wait_ms(3000); // wait_ms(unsigned long interval_msec) + // + // example #17 + code = 0x1fff; // 50.0% of full scale REF(2.50V) = 1.25V (FB=1-2:FORCE_BIP/SENSE_BIP: 0.00V) (FB=2-3:FORCE_UNI/SENSE_UNI: 2.50V) + g_MAX5171_device.CODE_LOAD(code); + wait_ms(3000); // wait_ms(unsigned long interval_msec) + // + // example #18 + code = 0x2665; // 60.0% of full scale REF(2.50V) = 1.50V (FB=1-2:FORCE_BIP/SENSE_BIP: 0.50V) (FB=2-3:FORCE_UNI/SENSE_UNI: 3.00V) + g_MAX5171_device.CODE_LOAD(code); + wait_ms(3000); // wait_ms(unsigned long interval_msec) + // + // example #19 + code = 0x2ccc; // 70.0% of full scale REF(2.50V) = 1.75V (FB=1-2:FORCE_BIP/SENSE_BIP: 1.00V) (FB=2-3:FORCE_UNI/SENSE_UNI: 3.50V) + g_MAX5171_device.CODE_LOAD(code); + wait_ms(3000); // wait_ms(unsigned long interval_msec) + // + // example #20 + code = 0x3332; // 80.0% of full scale REF(2.50V) = 2.00V (FB=1-2:FORCE_BIP/SENSE_BIP: 1.50V) (FB=2-3:FORCE_UNI/SENSE_UNI: 4.00V) + g_MAX5171_device.CODE_LOAD(code); + wait_ms(3000); // wait_ms(unsigned long interval_msec) + // + // example #21 + code = 0x3998; // 90.0% of full scale REF(2.50V) = 2.25V (FB=1-2:FORCE_BIP/SENSE_BIP: 2.00V) (FB=2-3:FORCE_UNI/SENSE_UNI: 4.50V) + g_MAX5171_device.CODE_LOAD(code); + wait_ms(3000); // wait_ms(unsigned long interval_msec) + // + // example #22 + code = 0x3fff; // 100.0% of full scale REF(2.50V) = 2.50V (FB=1-2:FORCE_BIP/SENSE_BIP: 2.50V) (FB=2-3:FORCE_UNI/SENSE_UNI: 5.00V) g_MAX5171_device.CODE_LOAD(code); wait_ms(3000); // wait_ms(unsigned long interval_msec) // wait(3.0); } } -
--- a/MAX5171.lib Fri Apr 03 06:44:33 2020 +0000 +++ b/MAX5171.lib Fri May 15 08:25:05 2020 +0000 @@ -1,1 +1,1 @@ -https://os.mbed.com/teams/MaximIntegrated/code/MAX5171/#f661c4a61207 +https://os.mbed.com/teams/MaximIntegrated/code/MAX5171/#564b438a0448