|
@@ -5,13 +5,17 @@ This project that has been developed on the Mac with STM32CubeIDE, Version: 1.8.
|
|
- Scan and send temperatures of all connected DS18B20 (Max 5 units)
|
|
- Scan and send temperatures of all connected DS18B20 (Max 5 units)
|
|
- Control out DI with UART2 Rx control (the blue pill green LED)
|
|
- Control out DI with UART2 Rx control (the blue pill green LED)
|
|
|
|
|
|
|
|
+
|
|
|
|
+[More STM32 Docs](https://docs.google.com/document/d/1Wjg423PqePENCzdlPTyxFAglW16Ct_v9gj3FkSOzNIo/edit?usp=sharing)
|
|
|
|
+
|
|
## Functions
|
|
## Functions
|
|
|
|
|
|
-Master clock with PLL is set to 56MHz
|
|
|
|
-The TIM1 is used in OW to get an exact delay. When measuring OW then ADC interrupt is off
|
|
|
|
-ADC1 is set to contious mode with interrupt
|
|
|
|
-Max and Min values of ADC is measured and then sustracted and sent
|
|
|
|
-Control on UART2 Rx {0} and {1} will control the green led on the blue pill card
|
|
|
|
|
|
+Master clock with PLL is set to 56MHz
|
|
|
|
+The TIM1 is used in OW to get an exact delay. When measuring OW then ADC interrupt is off.
|
|
|
|
+ADC1 is set to contious mode with interrupt.
|
|
|
|
+Max and Min values of ADC is measured and then sustracted and sent.
|
|
|
|
+Control on UART2 Rx {0} and {1} will control the green led on the blue pill card.
|
|
|
|
+
|
|
Data is sent every 10 seconds in format:
|
|
Data is sent every 10 seconds in format:
|
|
```
|
|
```
|
|
{VPP,0,2164}
|
|
{VPP,0,2164}
|
|
@@ -21,13 +25,13 @@ Data is sent every 10 seconds in format:
|
|
|
|
|
|
## ADC Timing
|
|
## ADC Timing
|
|
|
|
|
|
-Tconv = Sampling time + 12.5 cycles
|
|
|
|
-Example:
|
|
|
|
-With an ADCCLK = 14 MHz and a sampling time of 1.5 cycles: Tconv = 1.5 + 12.5 = 14 cycles = 1 μs
|
|
|
|
-In this application we want to sample a 50Hz signal = 20mS
|
|
|
|
-Calcs here: https://docs.google.com/spreadsheets/d/1an5f3Aog4bdwpe-rDquWTxlXBpsXEK-1DVhAsiCqlq0/edit#gid=304302332
|
|
|
|
|
|
+Tconv = Sampling time + 12.5 cycles
|
|
|
|
+Example:
|
|
|
|
+With an ADCCLK = 14 MHz and a sampling time of 1.5 cycles: Tconv = 1.5 + 12.5 = 14 cycles = 1 μs
|
|
|
|
+In this application we want to sample a 50Hz signal = 20mS
|
|
|
|
+[Calcs here](https://docs.google.com/spreadsheets/d/1an5f3Aog4bdwpe-rDquWTxlXBpsXEK-1DVhAsiCqlq0/edit#gid=304302332)
|
|
|
|
|
|
-
|
|
|
|
|
|
+--------------------------------------
|
|
|
|
|
|
Select the instructions depending on Espressif chip installed on your development board:
|
|
Select the instructions depending on Espressif chip installed on your development board:
|
|
|
|
|