From cf138981969a35e0cbf4e242d566e2bb6e0a5da3 Mon Sep 17 00:00:00 2001 From: Adrian Weber Date: Mon, 15 Feb 2021 16:28:40 +0100 Subject: [PATCH] some explenation to CbmRICH sensoring code in ReadMe --- atmega32u4/CbmRich_sensoring/README.md | 59 +++++++++++++++++++++++++- 1 file changed, 58 insertions(+), 1 deletion(-) diff --git a/atmega32u4/CbmRich_sensoring/README.md b/atmega32u4/CbmRich_sensoring/README.md index 37516a1..b4b658f 100644 --- a/atmega32u4/CbmRich_sensoring/README.md +++ b/atmega32u4/CbmRich_sensoring/README.md @@ -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\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\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 -- 2.43.0