some explenation to CbmRICH sensoring code in ReadMe
authorAdrian Weber <adrian.a.weber@exp2.physik.uni-giessen.de>
Mon, 15 Feb 2021 15:28:40 +0000 (16:28 +0100)
committerAdrian Weber <adrian.a.weber@exp2.physik.uni-giessen.de>
Mon, 15 Feb 2021 15:28:40 +0000 (16:28 +0100)
atmega32u4/CbmRich_sensoring/README.md

index 37516a188bf41499fa0d10bce48f0d2689c93ee2..b4b658fade807318c4d3b846488bbb2a98bedeef 100644 (file)
@@ -34,13 +34,70 @@ If the board was already flashed, the HWB Pin has to be pulled to GND and simukt
 
 After flashing with microUSB, please unplug the cable and plug the adapter. Keep in mind to plug the GND connection too.
 
+
 ______________________________________________________________________________________________________________
+## Generell function
 
-## Register definition
+The microcontroller (uC) is used ot controll up to 9 lines of 1-wire. Each line will hold up to 16 MLX90393 and minimum
+the same amount of DS18B20. So 32 devices per line are possible.
+
+The uC scans after reset/start the 1-wire lines. Each found DS18B20 and each MLX90393 (NOT the DS28E17) are identified
+with a internal number. The number is used to shorten the data transfers. If a Device is found, the internal number is 
+transmitted with the UID and the I2C Address over UART (to the FPGA). Such a Address message is identified with an 'A'
+as first character.
+The FPGA can use the UID and internal counted number to match the sensor (and its position fronm a DB) to the internal
+address and its registers. The intenral address should also represent the register psoition on the FPGA. The addresses
+between MLX90383 and DS18B20 are separated by the 1-wire familiy code. (DS18B20: 0x28; MLX90393 is connected to DS28E17 
+(0x19)).
+
+Measured values are transmitted via UART and indicated by the char 'V'. The format is givin below.
+
+The FPGA can send UART to the uC to go into a config mode. The config mode is not implemented yet.
 
 ______________________________________________________________________________________________________________
 
 ## Protokoll definition
 
+Definition of Address messages:
+
+``` bash
+A<FF><II><xxxxxxxxxxxx><CC>\n
+A : char for Address message
+FF: 8-bit Family code (hex)
+II: 8-bit internal Address for Register mapping (hex)
+xx: 48-bit UID
+CC: I2C Address (maybe not needed)
+
+e.g.:
+A2800382b740c000000
+A280116e7740c000000
+A19004210040000000c
+A19014210040000000d
+
+```
+Definition of Value messages:
+
+``` bash
+V<FF><II><T><VAL>\n
+V : char for Value message
+FF: 8-bit Family code (hex)
+II: 8-bit internal Address for Register mapping (hex)
+T:  char for data type (T,X,Y,Z)
+VAL: value of measurement in hex
+
+e.g.:
+V2801T0a20
+or
+V1901Tb3ed
+```
+
+______________________________________________________________________________________________________________
+
+## Register definition
+
+
+
 ______________________________________________________________________________________________________________
 ## Usage