Gast
#2912988
Hallo World ;-) kurze Frage zum DS2482 ... ich habe hier mal was aus einem C-Codeschnipsel geklaut, was ich nicht verstehe?! ??? Die Configregister haben die gleichen Adressen wie die Statusregister ??? Wie unterscheide ich das bei read/write ???? 62 /** 63 * Configure Register bit definitions 64 * The top 4 bits always read 0. 65 * To write, the top nibble must be the 1's compl. of the low nibble. 66 */ 67 #define DS2482_REG_CFG_1WS 0x08 68 #define DS2482_REG_CFG_SPU 0x04 69 #define DS2482_REG_CFG_PPM 0x02 70 #define DS2482_REG_CFG_APU 0x01 84 /** 85 * Status Register bit definitions (read only) 86 */ 91 #define DS2482_REG_STS_LL 0x08 92 #define DS2482_REG_STS_SD 0x04 93 #define DS2482_REG_STS_PPD 0x02 94 #define DS2482_REG_STS_1WB 0x01 --- Ich habe die mal ausgelesen ->
1 | |
2 | |
3 | |
4 | |
DS2482 Status 1-Wire Busy: 0x19 DS2482 Status Presence Pulse Detect: 0x1a DS2482 Status Short Detected: 0x1c DS2482 Status 1-Wire Logic Level: 0x18 DS2482 Status Device Reset: 0x18 DS2482 Status Single Bit Result: 0x38 DS2482 Status Triplet Second Bit: 0x58 DS2482 Status Branch Direction Taken: 0x98