Changes for page Front I/O
Last modified by Kevin Wiki on 2024/07/07 22:48
From version
2.2
edited by Kevin Wiki
on 2024/07/04 17:53
on 2024/07/04 17:53
Change comment:
There is no comment for this version
To version
1.2
edited by Kevin Wiki
on 2024/07/04 13:12
on 2024/07/04 13:12
Change comment:
There is no comment for this version
Summary
Details
- Page properties
-
- Content
-
... ... @@ -19,160 +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=22 += 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.24 +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.26 +== Sub-paragraph == 27 27 28 - ==Finding i2c chip address==28 +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===30 +== 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 -== Pinouts voltages from MLB == 155 - 156 -Powered off: 157 - 158 -* PWR fail LED - 0.00 V 159 -* OH/Fan fail LED - 4.72 V 160 -* NIC1 LED - 0.8 - 2.6 V 161 -* NIC2 LED - 2.95 V 162 -* HDD LED - 0.00 V 163 -* Power LED - 0.00 V after unplug grows 164 - 165 -Powered on: 166 - 167 -* PWR tail LED - 3.47 V 168 -* OH/Fan failed LED - 5 V 169 -* NIC 1 LED - 1.2 - 2.9 V 170 -* NIC 2 LED - 3.2 V 171 -* HDD LED - 3 V 172 -* Power LED - 0.87 V 173 - 174 - 175 - 32 +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. 176 176 ))) 177 177 178 178 ... ... @@ -187,11 +187,5 @@ 187 187 188 188 [[image:[email protected]]] 189 189 //Figure 2: [[Waves>>https://commons.wikimedia.org/wiki/File:Culebra_-_Playa_de_Flamenco.jpg]]// 190 - 191 - 192 - 193 - 194 - 195 - 196 196 ))) 197 197 )))