Changes for page Front I/O
Last modified by Kevin Wiki on 2024/07/07 22:48
From version
2.5
edited by Kevin Wiki
on 2024/07/04 22:57
on 2024/07/04 22:57
Change comment:
There is no comment for this version
To version 1.1
edited by Kevin Wiki
on 2024/02/17 18:50
on 2024/02/17 18:50
Change comment:
There is no comment for this version
Summary
Details
- Page properties
-
- Content
-
... ... @@ -1,10 +1,20 @@ 1 +(% class="jumbotron" %) 2 +((( 3 +(% class="container" %) 4 +((( 5 += My new article = 6 + 7 +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed viverra enim quis tristique tincidunt. Morbi nec hendrerit mi. Mauris convallis tortor et justo gravida elementum. Mauris dictum imperdiet quam, quis sodales velit tempus varius. Ut convallis mi rutrum imperdiet eleifend. Ut diam sapien, iaculis facilisis nisl non, varius cursus eros. Praesent vitae ipsum molestie enim pulvinar semper nec a nisi. 8 +))) 9 +))) 10 + 1 1 (% class="row" %) 2 2 ((( 3 3 (% class="col-xs-12 col-sm-8" %) 4 4 ((( 5 -= P inout=15 += Paragraph 1 = 6 6 7 - There is a single cable that controlsfourparts,eachhalfsideofI/OLEDandcentercolumn ofblueLEDs.17 +Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 8 8 9 9 == Sub-paragraph == 10 10 ... ... @@ -19,187 +19,17 @@ 19 19 Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 20 20 21 21 22 -= How wegot here=32 += Paragraph 2 = 23 23 24 - Measureoutthegroundandpower signalsbycomparingwithother chips on board.E.g.wefind[SAA1064T] datasheet,locatetheGND(Vee)and5V (Vcc) andmeasureconnectivity(0ohm resistance)betweenchippinsandcable pins.This givesuspinsGND2&8andPWR16 & 22.34 +Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 25 25 26 - Wekeep doing this forSCL & SDApins on SAA1064T chipand find pins 14 & 15 and 20 & 21 are I2C clockand data pins foreachchip.36 +== Sub-paragraph == 27 27 28 - ==Finding i2c chip address==38 +Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 29 29 30 -== =SAA1064T===40 +== Sub-paragraph == 31 31 32 -Reading the datasheet for SAA1064T chip we find that: "//This results in the corresponding valid addresses HEX 70, 72, 74 and 76 for writing and 71, 73, 75 and 77 for reading. All other addresses cannot be acknowledged by the circuit".// Giving us a clue what we are looking for, i2c addresses 0x70, 0x72 or 0x74. 33 - 34 -=== PCA9554 === 35 - 36 -asdf 37 - 38 -=== Code example finding i2c addresses === 39 - 40 -We can test the following addresses manually or use the following code snippet: 41 - 42 -{{code language="C++"}} 43 -/*I2C_scanner 44 - This sketch tests standard 7-bit addresses. 45 - Devices with higher bit address might not be seen properly.*/ 46 - 47 -#include <Wire.h> 48 - 49 -void setup() { 50 - Wire.begin(); 51 - 52 - Serial.begin(9600); 53 - while (!Serial); 54 - Serial.println("\nI2C Scanner"); 55 -} 56 - 57 -void loop() { 58 - byte error, address; 59 - int nDevices; 60 - 61 - Serial.println("Scanning..."); 62 - 63 - nDevices = 0; 64 - for (address = 1; address < 127; address++ ) { 65 - Wire.beginTransmission(address); 66 - error = Wire.endTransmission(); 67 - 68 - if (error == 0) { 69 - Serial.print("I2C device found at address 0x"); 70 - if (address < 16) 71 - Serial.print("0"); 72 - Serial.print(address, HEX); 73 - Serial.println(" !"); 74 - 75 - nDevices++; 76 - } 77 - else if (error == 4) { 78 - Serial.print("Unknown error at address 0x"); 79 - if (address < 16) 80 - Serial.print("0"); 81 - Serial.println(address, HEX); 82 - } 83 - } 84 - if (nDevices == 0) 85 - Serial.println("No I2C devices found\n"); 86 - else 87 - Serial.println("done\n"); 88 - 89 - delay(5000); 90 -} 91 -{{/code}} 92 - 93 -== i2c multiplexing with TCA9548 == 94 - 95 -We have two sets of chips, one for left and one for right where we have two different i2c chips on each side for controlling lights. Since the chips controlling their respective parts have the same address for each side, we can't distinguish them from each other. To handle this we use a i2c multiplexer to selectively communicate with one half at a time, switching TCA9548 between two different output ports. 96 - 97 -=== Code example finding i2c ports === 98 - 99 -To verify wiring, connection, output ports and device addresses run the following script: 100 - 101 -{{code language="c++"}} 102 -/** 103 - * TCA9548 I2CScanner.ino -- I2C bus scanner for Arduino 104 - * 105 - * Based on https://playground.arduino.cc/Main/I2cScanner/ 106 - * 107 - */ 108 - 109 -#include "Wire.h" 110 - 111 -#define TCAADDR 0x70 112 - 113 -void tcaselect(uint8_t i) { 114 - if (i > 7) return; 115 - 116 - Wire.beginTransmission(TCAADDR); 117 - Wire.write(1 << i); 118 - Wire.endTransmission(); 119 -} 120 - 121 - 122 -// standard Arduino setup() 123 -void setup() 124 -{ 125 - while (!Serial); 126 - delay(1000); 127 - 128 - Wire.begin(); 129 - 130 - Serial.begin(9600); 131 - Serial.println("\nTCAScanner ready!"); 132 - 133 - for (uint8_t t=0; t<8; t++) { 134 - tcaselect(t); 135 - Serial.print("TCA Port #"); Serial.println(t); 136 - 137 - for (uint8_t addr = 0; addr<=127; addr++) { 138 - if (addr == TCAADDR) continue; 139 - 140 - Wire.beginTransmission(addr); 141 - if (!Wire.endTransmission()) { 142 - Serial.print("Found I2C 0x"); Serial.println(addr,HEX); 143 - } 144 - } 145 - } 146 - Serial.println("\ndone"); 147 -} 148 - 149 -void loop() 150 -{ 151 -} 152 -{{/code}} 153 - 154 -== SAA1064T data for driving center IO == 155 - 156 -Center IO stack is a stack of 23 LED's, 22 blue and 1 green for ethernet activity. These are duplicated next to each other and driven by each their SAA1064T chips. Earlier we found the i2c address and just by playing around figured out that 4 segments of 1 byte binary values are used to set ship register. 157 - 158 -{{code language="C++"}} 159 -void fillColumns() { 160 - Serial.println("filling columns"); 161 - Wire.beginTransmission(saa1064); 162 - Wire.write(1); 163 - Wire.write(0x7F); // 127 - 1111111 164 - Wire.write(0x7F); // 127 - 1111111 165 - Wire.write(0x7F); // 127 - 1111111 166 - Wire.write(0x1F); // 31 - 11111 167 - Wire.endTransmission(); 168 - 169 - colsFilled = 1; 170 -} 171 -{{/code}} 172 - 173 -(% class="wikigeneratedid" %) 174 -Here the last byte we send only is 5 bits since we only have 5 LEDs instead of 6 to address (total of 23). Also note that we start the transmission with a single bit. 175 - 176 -== Pinouts voltages from MLB == 177 - 178 -Powered off: 179 - 180 -* PWR fail LED - 0.00 V 181 -* UID LED - 4.5V 182 -* OH/Fan fail LED - 4.72 V 183 -* NIC1 LED - 0.8 - 2.6 V 184 -* NIC2 LED - 2.95 V 185 -* UID SW - 2.8V 186 -* HDD LED - 0.00 V 187 -* Power LED P3V3 - 0.00V 188 -* Power LED - 0.00 V after unplug grows 189 - 190 -Powered on: 191 - 192 -* PWR tail LED - 3.47 V 193 -* UID LED - 4.85V 194 -* OH/Fan failed LED - 5 V 195 -* NIC 1 LED - 1.2 - 2.9 V 196 -* NIC 2 LED - 3.2 V 197 -* UID SW - 3V 198 -* HDD LED - 3 V 199 -* Power LED P3V3 - 3.30V 200 -* Power LED - 0.87 V 201 - 202 - 42 +Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 203 203 ))) 204 204 205 205 ... ... @@ -214,12 +214,5 @@ 214 214 215 215 [[image:[email protected]]] 216 216 //Figure 2: [[Waves>>https://commons.wikimedia.org/wiki/File:Culebra_-_Playa_de_Flamenco.jpg]]// 217 - 218 - 219 - 220 - 221 - 222 - 223 - 224 224 ))) 225 225 )))