Linduino  1.3.0
Linear Technology Arduino-Compatible Demonstration Board
DC2875A.ino
Go to the documentation of this file.
1 /*!
2 Linear Technology DC2875A Demonstration Board
3 LTC2971: Power System Management for High Voltage Systems
4 
5 @verbatim
6 
7 NOTES
8  Setup:
9  Set the terminal baud rate to 115200 and select the newline terminator.
10 
11 @endverbatim
12 
13 https://www.analog.com/en/products/LTC2971.html
14 
15 https://www.analog.com/en/design-center/evaluation-hardware-and-software/evaluation-boards-kits/DC2875A.html
16 
17 
18 Copyright 2019(c) Analog Devices, Inc.
19 
20 All rights reserved.
21 
22 Redistribution and use in source and binary forms, with or without
23 modification, are permitted provided that the following conditions are met:
24  - Redistributions of source code must retain the above copyright
25  notice, this list of conditions and the following disclaimer.
26  - Redistributions in binary form must reproduce the above copyright
27  notice, this list of conditions and the following disclaimer in
28  the documentation and/or other materials provided with the
29  distribution.
30  - Neither the name of Analog Devices, Inc. nor the names of its
31  contributors may be used to endorse or promote products derived
32  from this software without specific prior written permission.
33  - The use of this software may or may not infringe the patent rights
34  of one or more patent holders. This license does not release you
35  from the requirement that you obtain separate licenses from these
36  patent holders to use this software.
37  - Use of the software either in source or binary form, must be run
38  on or directly connected to an Analog Devices Inc. component.
39 
40 THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR
41 IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT,
42 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
43 IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT,
44 INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
45 LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR
46 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
47 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
48 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
49 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
50 */
51 
52 /*! @file
53  @ingroup LTC2971
54 */
55 
56 #include <Arduino.h>
57 #include <stdint.h>
58 #include "Linduino.h"
59 #include "UserInterface.h"
60 #include "LT_Wire.h"
61 #include "LT_PMBus.h"
62 #include "LT_SMBusPec.h"
63 #include "LT_PMBusMath.h"
64 #include "LT_SMBus.h"
65 #include "LT_I2CBus.h"
66 #include "LT_SMBusGroup.h"
67 #include "LT_FaultLog.h"
68 #include "LT_SMBusNoPec.h"
69 #include "LT_SMBusBase.h"
70 
71 #define LTC2971_0_I2C_ADDRESS 0x5C
72 #define LTC2971_1_I2C_ADDRESS 0x5D
73 //#define SCALING_FACTOR_CH3 -1.0
74 #define MFR_PG_CONFIG_ORIGINAL 0xC046
75 #define MFR_PG_CONFIG_WRITE_PG 0xC044
76 
77 // Global variables
78 static uint8_t ltc2971_0_i2c_address;
79 static uint8_t ltc2971_1_i2c_address;
80 static LT_PMBusMath *math = new LT_PMBusMath();
81 static LT_SMBus *smbus = new LT_SMBusPec();
82 static LT_PMBus *pmbus = new LT_PMBus(smbus);
83 
84 //! Initialize Linduino
85 void setup()
86 {
87  Serial.begin(115200); //! Initialize the serial port to the PC
88  print_title();
91 
92  print_prompt();
93 }
94 
95 //! Repeats Linduino loop
96 //! @return void
97 void loop()
98 {
99  uint8_t user_command;
100  uint8_t res;
101  uint8_t model[7];
102  uint8_t revision[10];
103  uint8_t *addresses = NULL;
104 
105  if (Serial.available()) //! Checks for user input
106  {
107  user_command = read_int(); //! Reads the user command
108  if (user_command != 'm')
109  Serial.println(user_command);
110 
111  switch (user_command) //! Prints the appropriate submenu
112  {
113  case 1:
114  menu_1_input_telemetry(); // Print single-ended voltage menu
115  break;
116  case 2:
118  break;
119  case 3:
121  break;
122  case 4:
124  break;
125  case 5:
127  break;
128  case 6:
130  break;
131  case 7:
132  sequence_off_on();
133  break;
134  case 8:
135  addresses = smbus->probe(0);
136  while (*addresses != 0)
137  {
138  Serial.print(F("ADDR 0x"));
139  Serial.println(*addresses++, HEX);
140  }
141  break;
142  case 9 :
143  pmbus->startGroupProtocol();
146  pmbus->executeGroupProtocol();
147  break;
148  default:
149  Serial.println(F("Incorrect Option"));
150  break;
151  }
152  print_prompt();
153  }
154 
155 }
156 
157 // Function Definitions
158 
159 //! Prints the title block when program first starts.
161 {
162  Serial.print(F("\n*****************************************************************\n"));
163  Serial.print(F("* DC2875A Hello World Demonstration Program *\n"));
164  Serial.print(F("* *\n"));
165  Serial.print(F("* This program demonstrates how to send and receive data from *\n"));
166  Serial.print(F("* the LTC2875A demo board. *\n"));
167  Serial.print(F("* *\n"));
168  Serial.print(F("* Set the baud rate to 115200 and select the newline terminator.*\n"));
169  Serial.print(F("* *\n"));
170  Serial.print(F("*****************************************************************\n"));
171 }
172 
173 //! Prints main menu.
175 {
176  Serial.println();
177  Serial.print(F(" 1-Read Input Telemetry\n"));
178  Serial.print(F(" 2-Read Output Telemetry\n"));
179  Serial.print(F(" 3-Read All Status\n"));
180  Serial.print(F(" 4-PG Commands\n"));
181  Serial.print(F(" 5-Margin Commands\n"));
182  Serial.print(F(" 6-PEC Options\n"));
183  Serial.print(F(" 7-Sequence Off/On\n"));
184  Serial.print(F(" 8-Bus Probe\n"));
185  Serial.print(F(" 9-Reset\n"));
186  Serial.print(F("\nEnter a command:"));
187 }
188 
189 //! Prints a warning if the demo board is not detected.
191 {
192  Serial.println(F("\nWarning: Demo board not detected. Linduino will attempt to proceed."));
193 }
194 
195 
196 
197 //! Print all output voltages
199 {
200  float voltage;
201  float scaled_voltage;
202  uint8_t page;
203 
204  for (page = 0; page < 2; page++)
205  {
206  pmbus->setPage(ltc2971_0_i2c_address, page);
207  voltage = pmbus->readVout(ltc2971_0_i2c_address, false);
208  /*scaled_voltage = voltage*scaling;*/
209  Serial.print(F(" LTC2971:U0:CH"));
210  Serial.print(page, DEC);
211  Serial.print(F(" VOUT = "));
212  Serial.print(voltage, DEC);
213  /*Serial.print(F("V (Scaled "));
214  Serial.print(scaled_voltage, DEC); */
215  Serial.println(F(" V"));
216  }
217 
218  for (page = 0; page < 2; page++)
219  {
220  pmbus->setPage(ltc2971_1_i2c_address, page);
221  voltage = pmbus->readVout(ltc2971_1_i2c_address, false);
222  Serial.print(F(" LTC2971:U1:CH"));
223  Serial.print(page, DEC);
224  Serial.print(F(" VOUT = "));
225  Serial.print(voltage, DEC);
226  Serial.println(F(" V"));
227  }
228 
229  //Serial.println();
230 }
231 
232 
233 
234 //! Print all input voltages
235 //! @return void
237 {
238  float voltage;
239 
240  voltage = pmbus->readVin(ltc2971_0_i2c_address, false);
241  Serial.print(F(" LTC2971:U0 VIN = "));
242  Serial.print(voltage, DEC);
243  Serial.println(F(" V"));
244  voltage = pmbus->readVin(ltc2971_1_i2c_address, false);
245  Serial.print(F(" LTC2971:U1 VIN = "));
246  Serial.print(voltage, DEC);
247  Serial.println(F(" V"));
248 
249 }
250 
251 //! Print all output currents
252 //! @return void
254 {
255  float current;
256  uint8_t page;
257 
258  for (page = 0; page < 2; page++)
259  {
260  pmbus->setPage(ltc2971_0_i2c_address, page);
261  current = pmbus->readIout(ltc2971_0_i2c_address, false);
262  Serial.print(F(" LTC2971:U0:CH"));
263  Serial.print(page, DEC);
264  Serial.print(F(" IOUT = "));
265  Serial.print(current, DEC);
266  Serial.println(F(" A"));
267  }
268 
269  for (page = 0; page < 2; page++)
270  {
271  pmbus->setPage(ltc2971_1_i2c_address, page);
272  current = pmbus->readIout(ltc2971_1_i2c_address, false);
273  Serial.print(F(" LTC2971:U1:CH"));
274  Serial.print(page, DEC);
275  Serial.print(F(" IOUT = "));
276  Serial.print(current, DEC);
277  Serial.println(F(" A"));
278  }
279 }
280 
281 //! Print all input currents
282 //! @return void
284 {
285  float current;
286 
287  current = pmbus->readIin(ltc2971_0_i2c_address, false);
288  Serial.print(F(" LTC2971:U0 Iin = "));
289  Serial.print(current, DEC);
290  Serial.println(F(" A"));
291  current = pmbus->readIin(ltc2971_1_i2c_address, false);
292  Serial.print(F(" LTC2971:U1 Iin = "));
293  Serial.print(current, DEC);
294  Serial.println(F(" A"));
295 }
296 
297 
298 
299 //! Print all output power
300 //! @return void
302 {
303  float power;
304  uint8_t page;
305 
306  for (page = 0; page < 2; page++)
307  {
308  pmbus->setPage(ltc2971_0_i2c_address, page);
309  power = pmbus->readPout(ltc2971_0_i2c_address, false);
310  Serial.print(F(" LTC2971:U0:CH"));
311  Serial.print(page, DEC);
312  Serial.print(F(" POUT = "));
313  Serial.print(power, DEC);
314  Serial.println(F(" W"));
315  }
316 
317  for (page = 0; page < 2; page++)
318  {
319  pmbus->setPage(ltc2971_1_i2c_address, page);
320  power = pmbus->readPout(ltc2971_1_i2c_address, false);
321  Serial.print(F(" LTC2971:U1:CH"));
322  Serial.print(page, DEC);
323  Serial.print(F(" POUT = "));
324  Serial.print(power, DEC);
325  Serial.println(F(" W"));
326  }
327 }
328 
329 
330 
331 //! Print all input power
332 //! @return void
334 {
335  float power;
336 
337  power = pmbus->readPin(ltc2971_0_i2c_address, false);
338  Serial.print(F(" LTC2971:U0 Pin = "));
339  Serial.print(power, DEC);
340  Serial.println(F(" W"));
341  power = pmbus->readPin(ltc2971_1_i2c_address, false);
342  Serial.print(F(" LTC2971:U1 Pin = "));
343  Serial.print(power, DEC);
344  Serial.println(F(" W"));
345 }
346 
347 
348 //! Print all status bytes and words
349 //! @return void
351 {
352  uint8_t b;
353  uint16_t w;
354  uint8_t page;
355 
356  for (page = 0; page < 2; page++)
357  {
358  Serial.print(F("U0:CH"));
359  Serial.println(page, DEC);
360  pmbus->setPage(ltc2971_0_i2c_address, page);
362  Serial.print(F(" LTC2971 STATUS BYTE 0x"));
363  Serial.println(b, HEX);
365  Serial.print(F(" LTC2971 STATUS WORD 0x"));
366  Serial.println(w, HEX);
367  }
368 
369  for (page = 0; page < 2; page++)
370  {
371  Serial.print(F("U1:CH"));
372  Serial.println(page, DEC);
373  pmbus->setPage(ltc2971_1_i2c_address, page);
375  Serial.print(F(" LTC2971 STATUS BYTE 0x"));
376  Serial.println(b, HEX);
378  Serial.print(F(" LTC2971 STATUS WORD 0x"));
379  Serial.println(w, HEX);
380  }
381 }
382 
383 
384 
385 //! Print all PG states
386 //! @return void
388 {
389  uint16_t pg_status;
390 
391  pg_status = smbus->readWord(ltc2971_0_i2c_address, 0xE5);
392  pg_status &= 0x03;
393  Serial.print(F(" PG0 = LOGIC"));
394  if (pg_status & 0x01)
395  {
396  Serial.print(F(" HIGH\n"));
397  }
398  else
399  {
400  Serial.print(F(" LOW\n"));
401  }
402  Serial.print(F(" PG1 = LOGIC"));
403  if (pg_status & 0x02)
404  {
405  Serial.print(F(" HIGH\n"));
406  }
407  else
408  {
409  Serial.print(F(" LOW\n"));
410  }
411 
412  pg_status = smbus->readWord(ltc2971_1_i2c_address, 0xE5);
413  pg_status &= 0x03;
414  Serial.print(F(" PG2 = LOGIC"));
415  if (pg_status & 0x01)
416  {
417  Serial.print(F(" HIGH\n"));
418  }
419  else
420  {
421  Serial.print(F(" LOW\n"));
422  }
423  Serial.print(F(" PG3 = LOGIC"));
424  if (pg_status & 0x02)
425  {
426  Serial.print(F(" HIGH\n"));
427  }
428  else
429  {
430  Serial.print(F(" LOW\n"));
431  }
432 }
433 
434 
435 
436 //! Toggle PG0
437 //! @return void
439 {
440 
441  pmbus->setPage(ltc2971_0_i2c_address, 0);
442  smbus->writeWord(ltc2971_0_i2c_address, 0xCB, MFR_PG_CONFIG_WRITE_PG); //! enable writing to pg register
443  smbus->writeByte(ltc2971_0_i2c_address, 0xCE, 0x00); //! force pg low
444  delay(1000);
445  smbus->writeByte(ltc2971_0_i2c_address, 0xCE, 0x01); //! return pg to hi-z
446  smbus->writeWord(ltc2971_0_i2c_address, 0xCB, MFR_PG_CONFIG_ORIGINAL); //! return register to original state
447 }
448 
449 //! Toggle PG0
450 //! @return void
452 {
453  pmbus->setPage(ltc2971_0_i2c_address, 1);
455  smbus->writeByte(ltc2971_0_i2c_address, 0xCE, 0x00);
456  delay(1000);
457  smbus->writeByte(ltc2971_0_i2c_address, 0xCE, 0x01);
459 }
460 
461 //! Toggle PG2
462 //! @return void
464 {
465  pmbus->setPage(ltc2971_1_i2c_address, 0);
467  smbus->writeByte(ltc2971_1_i2c_address, 0xCE, 0x00);
468  delay(1000);
469  smbus->writeByte(ltc2971_1_i2c_address, 0xCE, 0x01);
471 }
472 
473 //! Toggle PG3
474 //! @return void
476 {
477  pmbus->setPage(ltc2971_1_i2c_address, 1);
479  smbus->writeByte(ltc2971_1_i2c_address, 0xCE, 0x00);
480  delay(1000);
481  smbus->writeByte(ltc2971_1_i2c_address, 0xCE, 0x01);
483 }
484 
485 //! Sequence off then on
486 //! @return void
488 {
489  pmbus->sequenceOffGlobal();
490  delay (2000);
491  pmbus->sequenceOnGlobal();
492 }
493 
494 //! Margin high
495 //! @return void
497 {
498  pmbus->marginHighGlobal();
499 }
500 
501 //! Margin low
502 //! @return void
504 {
505  pmbus->marginLowGlobal();
506 }
507 
508 
509 
510 //! Go to nominal
511 //! @return void
513 {
514  pmbus->sequenceOnGlobal();
515 }
516 
517 //! Display menu 1
518 //! @return void
520 {
521  uint8_t user_command;
522 
523  do
524  {
525  //! Displays the Input Telemetry menu
526  Serial.println();
527  Serial.print(F(" 1-Read Input Voltages\n"));
528  Serial.print(F(" 2-Read Input Currents\n"));
529  Serial.print(F(" 3-Read Input Power\n"));
530  Serial.print(F(" 4-Read All Input Telemetry\n"));
531  Serial.print(F(" m-Main Menu\n"));
532  Serial.print(F("\nEnter a command: "));
533 
534  user_command = read_int(); //! Reads the user command
535  if (user_command == 'm') // Print m if it is entered
536  {
537  Serial.print(F("m\n"));
538  }
539  else
540  Serial.println(user_command); // Print user command
541 
542  switch (user_command)
543  {
544  case 1:
546  break;
547  case 2:
549  break;
550  case 3:
552  break;
553  case 4:
554  Serial.println();
556  Serial.println();
558  Serial.println();
560  break;
561  default:
562  if (user_command != 'm')
563  Serial.println(F("Invalid Selection"));
564  break;
565  }
566  }
567  while (user_command != 'm');
568 }
569 
570 //! Display menu 2
571 //! @return void
573 {
574  uint8_t user_command;
575 
576  do
577  {
578  //! Displays the Ouput Telemetry menu
579  Serial.println();
580  Serial.print(F(" 1-Read Output Voltages\n"));
581  Serial.print(F(" 2-Read Output Currents\n"));
582  Serial.print(F(" 3-Read Output Power\n"));
583  Serial.print(F(" 4-Read All Output Telemetry\n"));
584  Serial.print(F(" m-Main Menu\n"));
585  Serial.print(F("\nEnter a command: "));
586 
587  user_command = read_int(); //! Reads the user command
588  if (user_command == 'm') // Print m if it is entered
589  {
590  Serial.print(F("m\n"));
591  }
592  else
593  Serial.println(user_command); // Print user command
594 
595  switch (user_command)
596  {
597  case 1:
599  break;
600  case 2:
602  break;
603  case 3:
605  break;
606  case 4:
607  Serial.println();
609  Serial.println();
611  Serial.println();
613  break;
614  default:
615  if (user_command != 'm')
616 
617  Serial.println(F("Invalid Selection"));
618  break;
619  }
620  }
621  while (user_command != 'm');
622 }
623 
624 //! Display menu 3
625 //! @return void
627 {
628  uint8_t user_command;
629 
630  do
631  {
632  //! Displays the PG Command menu
633  Serial.println();
634  Serial.print(F(" 1-Read All PG States\n"));
635  Serial.print(F(" 2-Force PG0 Low (1 sec)\n"));
636  Serial.print(F(" 3-Force PG1 Low (1 sec)\n"));
637  Serial.print(F(" 4-Force PG2 Low (1 sec)\n"));
638  Serial.print(F(" 5-Force PG3 Low (1 sec)\n"));
639  Serial.print(F(" m-Main Menu\n"));
640  Serial.print(F("\nEnter a command: "));
641 
642  user_command = read_int(); //! Reads the user command
643  if (user_command == 'm') // Print m if it is entered
644  {
645  Serial.print(F("m\n"));
646  }
647  else
648  Serial.println(user_command); // Print user command
649 
650  switch (user_command)
651  {
652  case 1:
653  print_all_pg();
654  break;
655  case 2:
656  toggle_pg0();
657  break;
658  case 3:
659  toggle_pg1();
660  break;
661  case 4:
662  toggle_pg2();
663  break;
664  case 5:
665  toggle_pg3();
666  break;
667  default:
668  if (user_command != 'm')
669  Serial.println(F("Invalid Selection"));
670  break;
671  }
672  }
673  while (user_command != 'm');
674 }
675 
676 
677 //! Display menu 4
678 //! @return void
680 {
681  uint8_t user_command;
682 
683  do
684  {
685  //! Displays the Margin menu
686  Serial.println();
687  Serial.print(F(" 1-Margin High\n"));
688  Serial.print(F(" 2-Margin Low\n"));
689  Serial.print(F(" 3-Margin Off\n"));
690  Serial.print(F(" m-Main Menu\n"));
691  Serial.print(F("\nEnter a command: "));
692 
693  user_command = read_int(); //! Reads the user command
694  if (user_command == 'm') // Print m if it is entered
695  {
696  Serial.print(F("m\n"));
697  }
698  else
699  Serial.println(user_command); // Print user command
700 
701  switch (user_command)
702  {
703  case 1:
704  margin_high();
705  delay(500);
707  break;
708  case 2:
709  margin_low();
710  delay(500);
712  break;
713  case 3:
714  margin_off();
715  delay(500);
717  break;
718  default:
719  if (user_command != 'm')
720  Serial.println(F("Invalid Selection"));
721  break;
722  }
723  }
724  while (user_command != 'm');
725 }
726 
727 
728 //! Display menu 5
729 //! @return void
731 {
732  uint8_t user_command;
733 
734  do
735  {
736  //! Displays the PEC menu
737  Serial.println();
738  Serial.print(F(" 1-PEC On\n"));
739  Serial.print(F(" 2-PEC Off\n"));
740  Serial.print(F(" m-Main Menu\n"));
741  Serial.print(F("\nEnter a command: "));
742 
743  user_command = read_int(); //! Reads the user command
744  if (user_command == 'm') // Print m if it is entered
745  {
746  Serial.print(F("m\n"));
747  }
748  else
749  Serial.println(user_command); // Print user command
750 
751  switch (user_command)
752  {
753  case 1:
756  delete smbus;
757  delete pmbus;
758  smbus = new LT_SMBusPec();
759  pmbus = new LT_PMBus(smbus);
760  Serial.print(F("\n PEC Enabled"));
761  break;
762  case 2:
765  delete smbus;
766  delete pmbus;
767  smbus = new LT_SMBusNoPec();
768  pmbus = new LT_PMBus(smbus);
769  Serial.print(F("\n PEC Disabled"));
770  break;
771  default:
772  if (user_command != 'm')
773  Serial.println(F("Invalid Selection"));
774  break;
775  }
776  }
777  while (user_command != 'm');
778 }
float readPout(uint8_t address, bool polling)
Get the measured output power.
Definition: LT_PMBus.cpp:1963
static void menu_1_input_telemetry()
Display menu 1.
Definition: DC2875A.ino:519
unsigned char user_command
static void print_title()
Prints the title block when program first starts.
Definition: DC2875A.ino:160
LTC SMBus Support: API for a shared SMBus layer.
LTC SMBus Support: Implementation for a shared SMBus layer.
LTC SMBus Support: Implementation for a shared SMBus layer.
#define MFR_PG_CONFIG_ORIGINAL
Definition: DC2875A.ino:74
uint8_t readStatusByte(uint8_t address)
Get the status byte.
Definition: LT_PMBus.cpp:2423
static void toggle_pg2()
Toggle PG2.
Definition: DC2875A.ino:463
static void sequence_off_on()
Sequence off then on.
Definition: DC2875A.ino:487
Header File for Linduino Libraries and Demo Code.
void enablePec(uint8_t address)
Enable pec for all transactions.
Definition: LT_PMBus.cpp:3173
static void print_all_input_power()
Print all input power.
Definition: DC2875A.ino:333
static LT_PMBusMath * math
Definition: DC2875A.ino:80
#define LTC2971_0_I2C_ADDRESS
Definition: DC2875A.ino:71
static void print_all_pg()
Print all PG states.
Definition: DC2875A.ino:387
uint16_t readStatusWord(uint8_t address)
Get the status word.
Definition: LT_PMBus.cpp:2470
float readIout(uint8_t address, bool polling)
Get the measured output current.
Definition: LT_PMBus.cpp:1898
static LT_PMBus * pmbus
Definition: DC2875A.ino:82
static uint8_t ltc2971_0_i2c_address
Definition: DC2875A.ino:78
static void print_prompt()
Prints main menu.
Definition: DC2875A.ino:174
virtual void writeWord(uint8_t address, uint8_t command, uint16_t data)=0
SMBus write word command.
static LT_SMBus * smbus
Definition: DC2875A.ino:81
TwoWire.h - TWI/I2C library for Arduino & Wiring Copyright (c) 2006 Nicholas Zambetti.
static void print_all_output_voltages()
Print all output voltages.
Definition: DC2875A.ino:198
static void print_all_status()
Print all status bytes and words.
Definition: DC2875A.ino:350
float readPin(uint8_t address, bool polling)
Get the measured input power.
Definition: LT_PMBus.cpp:2027
void startGroupProtocol(void)
starts group protocol
Definition: LT_PMBus.cpp:3350
#define LTC2971_1_I2C_ADDRESS
Definition: DC2875A.ino:72
float readVout(uint8_t address, bool polling)
Get the measured output voltage.
Definition: LT_PMBus.cpp:1598
static void print_all_output_power()
Print all output power.
Definition: DC2875A.ino:301
static void margin_off()
Go to nominal.
Definition: DC2875A.ino:512
static void toggle_pg3()
Toggle PG3.
Definition: DC2875A.ino:475
LT_I2CBus: Routines to communicate to I2C by Wire Library.
static void print_all_output_currents()
Print all output currents.
Definition: DC2875A.ino:253
LTC PMBus Support: Implementation for a LTC Fault Log.
virtual void writeByte(uint8_t address, uint8_t command, uint8_t data)=0
SMBus write byte command.
static void menu_5_pec_commands()
Display menu 5.
Definition: DC2875A.ino:730
static void print_warning_prompt()
Prints a warning if the demo board is not detected.
Definition: DC2875A.ino:190
static void margin_low()
Margin low.
Definition: DC2875A.ino:503
void setPage(uint8_t address, uint8_t page)
Set the page.
Definition: LT_PMBus.cpp:3156
void marginLowGlobal(void)
Margin all rails low.
Definition: LT_PMBus.cpp:3078
static uint8_t ltc2971_1_i2c_address
Definition: DC2875A.ino:79
static void toggle_pg1()
Toggle PG0.
Definition: DC2875A.ino:451
void sequenceOnGlobal(void)
Sequence on all rails.
Definition: LT_PMBus.cpp:2896
virtual uint8_t * probe(uint8_t command)=0
SMBus bus probe.
static void menu_4_margin_commands()
Display menu 4.
Definition: DC2875A.ino:679
static void setup()
Initialize Linduino.
Definition: DC2875A.ino:85
float readIin(uint8_t address, bool polling)
Get the input current.
Definition: LT_PMBus.cpp:1805
LTC SMBus Support: Implementation for a shared SMBus layer.
static void toggle_pg0()
Toggle PG0.
Definition: DC2875A.ino:438
int32_t read_int()
void sequenceOffGlobal(void)
Sequence off all rails.
Definition: LT_PMBus.cpp:2876
float readVin(uint8_t address, bool polling)
Get the input voltage.
Definition: LT_PMBus.cpp:1487
void executeGroupProtocol(void)
ends group protocol
Definition: LT_PMBus.cpp:3356
void restoreFromNvm(uint8_t address)
Restore device from NVM.
Definition: LT_PMBus.cpp:2663
static void loop()
Repeats Linduino loop.
Definition: DC2875A.ino:97
LTC PMBus Support.
static float voltage
Definition: DC2289AA.ino:71
#define MFR_PG_CONFIG_WRITE_PG
Definition: DC2875A.ino:75
static uint16_t current
the current measurement from the LTC3335&#39;s counter test mode.
Definition: DC2343A.ino:114
void marginHighGlobal(void)
Margin all rails high.
Definition: LT_PMBus.cpp:3068
LTC PMBus Support: Math conversion routines.
static void print_all_input_currents()
Print all input currents.
Definition: DC2875A.ino:283
static void menu_2_output_telemetry()
Display menu 2.
Definition: DC2875A.ino:572
static void margin_high()
Margin high.
Definition: DC2875A.ino:496
virtual uint16_t readWord(uint8_t address, uint8_t command)=0
SMBus read word command.
static void print_all_input_voltages()
Print all input voltages.
Definition: DC2875A.ino:236
static void menu_3_pg_commands()
Display menu 3.
Definition: DC2875A.ino:626
LTC SMBus Support: Implementation for a shared SMBus layer.
PMBus communication.
Definition: LT_PMBus.h:370