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: mbed
src/all_io.cpp@39:bdd06cbaf9c3, 2019-03-08 (annotated)
- Committer:
- Slord2142
- Date:
- Fri Mar 08 20:37:28 2019 +0000
- Revision:
- 39:bdd06cbaf9c3
- Parent:
- 20:5de24e4ae1c5
- Child:
- 40:5e675a9bcb6e
Ticker and pin designation
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| mfwic | 0:44a3005d4f20 | 1 | //------------------------------------------------------------------------------- |
| mfwic | 0:44a3005d4f20 | 2 | // |
| mfwic | 0:44a3005d4f20 | 3 | // Treehouse Designs Inc. |
| mfwic | 0:44a3005d4f20 | 4 | // Colorado Springs, Colorado |
| mfwic | 0:44a3005d4f20 | 5 | // |
| mfwic | 8:d3d7dca419b3 | 6 | // Copyright (c) 2018 by Treehouse Designs Inc. |
| mfwic | 0:44a3005d4f20 | 7 | // Copyright (c) 2018 by Agility Power Systems Inc. |
| mfwic | 0:44a3005d4f20 | 8 | // |
| mfwic | 0:44a3005d4f20 | 9 | // This code is the property of Treehouse Designs, Inc. (Treehouse) and |
| mfwic | 0:44a3005d4f20 | 10 | // Agility Power Systems Inc. (Agility) and may not be redistributed |
| mfwic | 0:44a3005d4f20 | 11 | // in any form without prior written permission from |
| mfwic | 0:44a3005d4f20 | 12 | // both copyright holders, Treehouse and Agility. |
| mfwic | 0:44a3005d4f20 | 13 | // |
| mfwic | 0:44a3005d4f20 | 14 | // The above copyright notice and this permission notice shall be included in |
| mfwic | 0:44a3005d4f20 | 15 | // all copies or substantial portions of the Software. |
| mfwic | 0:44a3005d4f20 | 16 | // |
| mfwic | 0:44a3005d4f20 | 17 | // |
| mfwic | 0:44a3005d4f20 | 18 | //------------------------------------------------------------------------------- |
| mfwic | 0:44a3005d4f20 | 19 | // |
| mfwic | 0:44a3005d4f20 | 20 | // REVISION HISTORY: |
| mfwic | 0:44a3005d4f20 | 21 | // |
| mfwic | 0:44a3005d4f20 | 22 | // $Author: $ |
| mfwic | 0:44a3005d4f20 | 23 | // $Rev: $ |
| mfwic | 0:44a3005d4f20 | 24 | // $Date: $ |
| mfwic | 0:44a3005d4f20 | 25 | // $URL: $ |
| mfwic | 0:44a3005d4f20 | 26 | // |
| mfwic | 0:44a3005d4f20 | 27 | //------------------------------------------------------------------------------- |
| mfwic | 0:44a3005d4f20 | 28 | |
| mfwic | 0:44a3005d4f20 | 29 | #include "mbed.h" |
| mfwic | 0:44a3005d4f20 | 30 | #include "all_io.h" |
| mfwic | 0:44a3005d4f20 | 31 | #include "PortOut.h" |
| mfwic | 0:44a3005d4f20 | 32 | |
| mfwic | 0:44a3005d4f20 | 33 | // Digital IO |
| mfwic | 0:44a3005d4f20 | 34 | // |
| mfwic | 0:44a3005d4f20 | 35 | // Slots 12 to 0 are activated with the wr_out signals |
| mfwic | 0:44a3005d4f20 | 36 | // wr_out[13] = slots[12:0] |
| mfwic | 20:5de24e4ae1c5 | 37 | // BusOut signals are specified LSB first |
| Slord2142 | 39:bdd06cbaf9c3 | 38 | //BusOut wr_out(PA_10, PA_11, PA_12, PA_13, PA_14, PA_15, PC_6, PC_7, PC_8, PC_9, PC_10, PC_11, PC_12); //RK: Need to change ADC inputs to PC_0-PC_5 |
| mfwic | 3:d8948c5b2951 | 39 | |
| mfwic | 0:44a3005d4f20 | 40 | // en_out are binary weighted signals that activate groups of DC-DC converters on the slot cards. |
| mfwic | 0:44a3005d4f20 | 41 | // en_out[6] = {en32, en16, en8, en4, en2, en1} |
| mfwic | 20:5de24e4ae1c5 | 42 | //BusOut en_out(PA_9, PA_8, PA_7, PA_6, PC_14, PA_4); //RK: debug 11/26/2018 |
| mfwic | 20:5de24e4ae1c5 | 43 | //BusOut signals are specified LSB first |
| Slord2142 | 39:bdd06cbaf9c3 | 44 | //BusOut en_out(PA_4, PC_13, PA_6, PA_7, PA_8, PA_9); |
| Slord2142 | 39:bdd06cbaf9c3 | 45 | //DigitalIn pc14(PC_14); |
| Slord2142 | 39:bdd06cbaf9c3 | 46 | I2C I2C_SCL(PB6) |
| Slord2142 | 39:bdd06cbaf9c3 | 47 | I2C I2C_SDA(PB7) |
| mfwic | 20:5de24e4ae1c5 | 48 | |
| mfwic | 3:d8948c5b2951 | 49 | |
| mfwic | 0:44a3005d4f20 | 50 | // Expansion port signals |
| mfwic | 0:44a3005d4f20 | 51 | // eport[16] = eport[18:3] |
| Slord2142 | 39:bdd06cbaf9c3 | 52 | //DigitalIn eport[16] = {PB_15, PB_14, PB_13, PB_12, PC_15, PB_10, PB_9, PB_8, PB_7, PB_6, PB_5, PB_4, PB_3, PB_2, PB_1, PB_0}; //RK 11/24/2018 PB_11 throws an error. Identifier "PB_11" is undefined. PB_11 is connected to VCAP1. |
| Slord2142 | 39:bdd06cbaf9c3 | 53 | DigitalInOut SWDIO(PA13) |
| Slord2142 | 39:bdd06cbaf9c3 | 54 | DigitalOut fan_on(PA15) |
| Slord2142 | 39:bdd06cbaf9c3 | 55 | DigitalOut UART_TX(PA2) |
| Slord2142 | 39:bdd06cbaf9c3 | 56 | DigitalOut UART_RX(PA3) |
| Slord2142 | 39:bdd06cbaf9c3 | 57 | DigitalOut vdoc(PA4) |
| mfwic | 3:d8948c5b2951 | 58 | |
| mfwic | 1:9f8583ba2431 | 59 | // Use extchlat to latch new wr_out signals to the external slots via ribbon cable. |
| Slord2142 | 39:bdd06cbaf9c3 | 60 | //DigitalOut extchlat(PA_1); |
| Slord2142 | 39:bdd06cbaf9c3 | 61 | DigitalOut ec2(PC0) |
| Slord2142 | 39:bdd06cbaf9c3 | 62 | DigitalOut ec15(PC1) |
| Slord2142 | 39:bdd06cbaf9c3 | 63 | DigitalOut ec26(PC2) |
| Slord2142 | 39:bdd06cbaf9c3 | 64 | DigitalOut ec6(PC3) |
| Slord2142 | 39:bdd06cbaf9c3 | 65 | DigitalOut ec12(PC4) |
| Slord2142 | 39:bdd06cbaf9c3 | 66 | DigitalOut ec25(PC5) |
| Slord2142 | 39:bdd06cbaf9c3 | 67 | DigitalOut ec36(PC6) |
| Slord2142 | 39:bdd06cbaf9c3 | 68 | DigitalOut ec31(PC7) |
| Slord2142 | 39:bdd06cbaf9c3 | 69 | DigitalOut ec9(PC8) |
| Slord2142 | 39:bdd06cbaf9c3 | 70 | DigitalOut ec5(PC9) |
| Slord2142 | 39:bdd06cbaf9c3 | 71 | DigitalOut ec24(PC10) |
| Slord2142 | 39:bdd06cbaf9c3 | 72 | DigitalOut ec11(PC11) |
| Slord2142 | 39:bdd06cbaf9c3 | 73 | DigitalOut ec1(PC12) |
| Slord2142 | 39:bdd06cbaf9c3 | 74 | DigitalOut ec10(PC13) |
| Slord2142 | 39:bdd06cbaf9c3 | 75 | DigitalOut ec23(PC14) |
| Slord2142 | 39:bdd06cbaf9c3 | 76 | DigitalOut ec7(PC15) |
| Slord2142 | 39:bdd06cbaf9c3 | 77 | DigitalOut ec18(PA8) |
| Slord2142 | 39:bdd06cbaf9c3 | 78 | DigitalOut ec14(PA9) |
| Slord2142 | 39:bdd06cbaf9c3 | 79 | DigitalOut ec27(PA10) |
| Slord2142 | 39:bdd06cbaf9c3 | 80 | DigitalOut ec19(PA11) |
| Slord2142 | 39:bdd06cbaf9c3 | 81 | DigitalOut ec32(PA12) |
| Slord2142 | 39:bdd06cbaf9c3 | 82 | DigitalOut ec35(PB0) |
| Slord2142 | 39:bdd06cbaf9c3 | 83 | DigitalOut ec21(PB1) |
| Slord2142 | 39:bdd06cbaf9c3 | 84 | DigitalOut ec30(PB2) |
| Slord2142 | 39:bdd06cbaf9c3 | 85 | DigitalOut ec33(PB4) |
| Slord2142 | 39:bdd06cbaf9c3 | 86 | DigitalOut ec20(PB5) |
| Slord2142 | 39:bdd06cbaf9c3 | 87 | DigitalOut ec34(PB8) |
| Slord2142 | 39:bdd06cbaf9c3 | 88 | DigitalOut ec29(PB9) |
| Slord2142 | 39:bdd06cbaf9c3 | 89 | DigitalOut ec8(PB10) |
| Slord2142 | 39:bdd06cbaf9c3 | 90 | DigitalOut ec4(PB11) |
| Slord2142 | 39:bdd06cbaf9c3 | 91 | DigitalOut ec17(PB12) |
| Slord2142 | 39:bdd06cbaf9c3 | 92 | DigitalOut ec13(PB13) |
| Slord2142 | 39:bdd06cbaf9c3 | 93 | DigitalOut ec26(PB14) |
| Slord2142 | 39:bdd06cbaf9c3 | 94 | DigitalOut ec22(PB15) |
| mfwic | 3:d8948c5b2951 | 95 | |
| mfwic | 0:44a3005d4f20 | 96 | // all_on indicates that the load demanded a high amount of current and all DC-DC converters are enabled. |
| Slord2142 | 39:bdd06cbaf9c3 | 97 | //DigitalIn all_on(PA_0); |
| Slord2142 | 39:bdd06cbaf9c3 | 98 | DigitalIn ILR_enable(PA0) |
| Slord2142 | 39:bdd06cbaf9c3 | 99 | DigitalIn SWDCLK(PA14) |
| Slord2142 | 39:bdd06cbaf9c3 | 100 | DigitalIn fan_pwn(PB3) |
| mfwic | 0:44a3005d4f20 | 101 | |
| mfwic | 0:44a3005d4f20 | 102 | // Analog IO |
| mfwic | 0:44a3005d4f20 | 103 | // |
| Slord2142 | 39:bdd06cbaf9c3 | 104 | AnalogIn 48Vfilt(PA7); |
| Slord2142 | 39:bdd06cbaf9c3 | 105 | //AnalogIn VIN24(PC_4); |
| Slord2142 | 39:bdd06cbaf9c3 | 106 | AnalogIn 12Vfilt(PA6); |
| Slord2142 | 39:bdd06cbaf9c3 | 107 | //AnalogIn IIN48(PC_2); |
| Slord2142 | 39:bdd06cbaf9c3 | 108 | //AnalogIn IIN24(PC_1); |
| Slord2142 | 39:bdd06cbaf9c3 | 109 | AnalogIn 12ifilt(PA5); |
| mfwic | 1:9f8583ba2431 | 110 | |
| Slord2142 | 39:bdd06cbaf9c3 | 111 | //DigitalOut myled(LED1); |