/************************************************************ * reads some dis and make them readable over i2c bus. * out of 8 registers only the register 1 is needed * * +-------+ * (RESET) PC6 -|1 O 28|- PC5 (ADC5/SCL) * (RXD) PD0 -|2 27|- PC4 (ADC4/SDA) * (TXD) PD1 -|3 26|- PC3 (ADC3) * (INT0) PD2 -|4 25|- PC2 (ADC2) * (INT1) PD3 -|5 24|- PC1 (ADC1) Sensor 4 * (XCK/T0) PD4 -|6 23|- PC0 (ADC0) Sensor 3 * VCC -|7 22|- GND * GND -|8 21|- AREF * (XTAL2/TOSC2) PB6 -|9 20|- AVCC * (XTAL2/TOSC2) PB7 -|10 19|- PB5 (SCK) * Sensor 8 (T1) PD5 -|11 18|- PB4 (MISO) * Sensor 7 (AIN0) PD6 -|12 17|- PB3 (MOSI(OC2) * Sensor 6 (AIN1) PD7 -|13 16|- PB2 (SS/OC1B) Sensor 2 * Sensor 5 (ICP1) PB0 -|14 15|- PB1 (OC1A) Sensor 1 * +-------+ */ #include #include #include #include #include #include #define TWCR_ACK TWCR = (1<