Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 66 additions & 20 deletions projects/Edgi-Talk_ADC/Edgi_Talk_M33_ADC/README.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,85 @@
# Edgi-Talk_ADC Example Project

[**中文**](./README_zh.md) | **English**

## Introduction

This example project is based on the **Edgi-Talk platform** and runs on the **RT-Thread real-time operating system**.
It demonstrates how to use the **ADC (Analog-to-Digital Converter)**.
Through this project, users can quickly experience ADC data acquisition and processing functions, providing a reference for developing analog signal acquisition applications.
During operation, the blue indicator LED blinks periodically, indicating that the system has started and is running normally.
This example project is based on the **Edgi-Talk platform**, running on the **RT-Thread real-time operating system**, and demonstrates how to use the **ADC (Analog-to-Digital Converter)**.
Through this project, users can quickly experience ADC data acquisition and processing, providing a reference for developing analog signal acquisition applications.
During runtime, the blue indicator LED blinks periodically, indicating that the system has started and is running properly.

### 1. Overview of ADC

**ADC (Analog-to-Digital Converter)** is a device or module that converts continuous analog signals into discrete digital signals, serving as a core component in modern digital control, signal processing, and measurement systems.

* **Function**: Converts continuous signals such as voltage or current into digital values for processing by a microcontroller (MCU), DSP, or FPGA.
* **Key Specifications**:

* **Resolution**: The number of bits in the ADC output, representing the number of distinguishable levels. Edgi uses **12-bit** resolution, i.e., 2^12 = 4096 levels.
* **Sampling Rate**: The number of samples the ADC takes per second, determining the range of detectable signal frequencies.
* **Input Range**: The range of analog voltages the ADC can handle.
* **Accuracy**: Indicates how closely the ADC output matches the actual input signal, affected by noise, nonlinearity, and offset errors.

### 2. ADC Working Principle

ADC operation typically involves the following stages:

1. **Sampling and Holding (Sample & Hold, S/H)**

* Captures the analog signal at a specific moment and holds it steady to ensure stability during conversion.
2. **Quantization**

* Divides the analog signal into discrete levels, each corresponding to a digital code.
* A 12-bit ADC divides the input voltage range into 4096 levels, with quantization precision expressed as ΔV = VREF / 4096.
3. **Encoding**

* Converts the quantized level into binary code for output.

## Hardware Description

### Connection Interface

![alt text](figures/1.png)

### BTB Connector

![alt text](figures/2.png)

### MCU Pins

![alt text](figures/3.png)

### Physical Board Location

![alt text](figures/4.png)

## Software Description

* The project is developed based on the **Edgi-Talk** platform.

* It uses **RT-Thread** as the operating system kernel.
* Uses **RT-Thread** as the operating system kernel.

* Example features:

* ADC initialization and sampling
* LED indicator blinking
* ADC sampling results printed through the serial port
* ADC sampling results printed via serial port

* The project structure is clear, making it easy for users to understand the ADC driver and RT-Thread thread mechanism.
* The project has a clear structure, making it easy for users to understand the ADC driver and RT-Thread threading mechanism.

## Usage Instructions

### Compilation and Download

1. Open the project and complete the build process.
2. Connect the development board to the PC using the **onboard DAP downloader** via USB.
3. Use the programming tool to flash the generated firmware onto the development board.
1. Open the project and complete the compilation.
2. Connect the board’s USB port to the PC using the **onboard debugger (DAP)**.
3. Use the programming tool to flash the generated firmware onto the board.

### Running Results
### Runtime Behavior

* After flashing, power on the development board to run the example project.
* The **blue indicator LED** blinks every 500ms, indicating normal system scheduling.
* The ADC sampling results of the battery voltage will be printed through the serial port, as shown below:
* After flashing, power on the board to run the example.
* The **blue indicator LED** blinks every 500 ms, indicating normal system operation.
* ADC samples battery voltage and prints results to the serial port as shown below:

```
Value is: 3.123 V
Expand All @@ -43,22 +89,22 @@ During operation, the blue indicator LED blinks periodically, indicating that th

## Notes

* To modify the project’s **graphical configuration**, open the configuration file with the following tool:
* To modify the **graphical configuration** of the project, open the configuration file using the following tool:

```
tools/device-configurator/device-configurator.exe
libs/TARGET_APP_KIT_PSE84_EVAL_EPC2/config/design.modus
```
* After making changes, save the configuration and regenerate the code.

## Boot Process
## Boot Sequence

The system boot sequence is as follows:

```
+------------------+
| Secure M33 |
| (Secure Core) |
| (Secure Core) |
+------------------+
|
v
Expand All @@ -74,12 +120,12 @@ The system boot sequence is as follows:
+-------------------+
```

⚠️ Please strictly follow the above flashing sequence; otherwise, the system may fail to run properly.
⚠️ Please strictly follow the boot sequence above when flashing firmware, or the system may fail to start properly.

---

* If the example project does not run properly, it is recommended to first build and flash the **Edgi-Talk_M33_S_Template** project to ensure that the initialization and core startup process works correctly before running this example.
* To enable the M55 core, open the configuration in the **M33 project**:
* If the example project does not run correctly, compile and flash the **Edgi-Talk_M33_S_Template** project first to ensure proper initialization and core startup sequence before running this example.
* To enable the M55 core, configure the **M33 project** as follows:

```
RT-Thread Settings --> Hardware --> select SOC Multi Core Mode --> Enable CM55 Core
Expand Down
33 changes: 33 additions & 0 deletions projects/Edgi-Talk_ADC/Edgi_Talk_M33_ADC/README_zh.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,44 @@
# Edgi-Talk_ADC 示例工程

**中文** | [**English**](./README.md)

## 简介

本示例工程基于 **Edgi-Talk 平台**,运行于 **RT-Thread 实时操作系统**,用于演示 **ADC(模数转换器)** 的使用方法。
通过本工程,用户可以快速体验 ADC 数据采集与处理功能,为后续开发模拟信号采集应用提供参考。
运行时,蓝色指示灯周期性闪烁,表示系统已正常启动并运行。

### 1. ADC概述

**ADC(Analog-to-Digital Converter)** 是将连续的模拟信号转换为离散的数字信号的器件或模块,是现代数字控制系统、信号处理和测量系统中的核心部件。

- **功能**:把电压、电流等连续信号转换为数字值,以便微控制器(MCU)、DSP 或 FPGA 进行处理。
- **重要指标**
- **分辨率(Resolution)**:ADC输出的数字位数,表示可区分的电平数。Edgi为 **12位**,即 2^12 = 4096 个不同电平。
- **采样率(Sampling Rate)**:ADC每秒采样次数,影响可捕捉的信号频率范围。
- **输入范围(Input Range)**:ADC能处理的模拟电压范围。
- **精度(Accuracy)**:表示ADC输出与实际输入信号的接近程度,受噪声、非线性、偏移误差影响。

### 2. ADC工作原理

ADC通常分为几个阶段:

1. **采样与保持(Sample & Hold, S/H)**
- 将连续变化的模拟信号在采样瞬间固定,保证后续转换过程中信号不变。
2. **量化(Quantization)**
- 将模拟信号划分为离散电平,每个电平对应一个数字编码。
- 12位ADC将输入电压范围分为 4096 个电平,量化精度可以表示为:ΔV = VREF / 4096。
3. **编码(Encoding)**
- 将量化后的电平转换成二进制代码输出。
## 硬件说明
### 连接接口
![alt text](figures/1.png)
### BTB座子
![alt text](figures/2.png)
### MCU引脚
![alt text](figures/3.png)
### 实物图位置
![alt text](figures/4.png)
## 软件说明

* 工程基于 **Edgi-Talk** 平台开发。
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
67 changes: 48 additions & 19 deletions projects/Edgi-Talk_AHT20/Edgi_Talk_M33_AHT20/README.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,64 @@
# Edgi-Talk_M33_AHT20 Example Project

[**中文**](./README_zh.md) | **English**

## Introduction

This example project is based on the **Edgi-Talk platform** and demonstrates how to drive and use the **AHT20 temperature and humidity sensor**.
Through this project, users can quickly experience AHT20 data acquisition and processing, and view the sampled results via the serial terminal on the development board.
Through this project, users can quickly experience AHT20 data acquisition and processing, and view the sampled results via the serial port on the development board.

### AHT10 Software Package Overview

The AHT10 software package provides basic functions for using the AHT10 temperature and humidity sensor, and also includes an optional software-based moving average filter.
For more details, please refer to the README file in the AHT10 software package.

## Hardware Description

### Sensor Connection Interface

![alt text](figures/1.png)

### Level Shifting

![alt text](figures/2.png)

### BTB Connector

![alt text](figures/3.png)

### MCU Pins

![alt text](figures/4.png)

### Physical Board Location

![alt text](figures/5.png)

## Software Description

* The project is developed based on the **Edgi-Talk** platform.

* The example includes the following features:
* Example functionalities include:

* AHT20 initialization and communication via I²C
* Temperature and humidity data reading and parsing
* Serial printing of sampled data
* Temperature and humidity data acquisition and parsing
* Displaying sampled data via serial output

* The project structure is clear, making it easy for users to understand I²C driver implementation and sensor interfacing.
* The project has a clear structure, helping users understand I²C driver usage and sensor interfacing.

## Usage Instructions

### Compilation and Download

1. Open the project and complete the build process.
2. Connect the development board to the PC via the **onboard DAP downloader (USB interface)**.
3. Use a programming tool to flash the generated firmware onto the development board.
1. Open the project and complete the compilation.
2. Connect the board’s USB port to the PC using the **onboard debugger (DAP)**.
3. Use the programming tool to flash the generated firmware onto the development board.

### Running Results
### Runtime Behavior

* After flashing, power on the development board to run the example project.
* The system will initialize the AHT20 and start sampling temperature and humidity data.
* The sampling results will be printed through the serial terminal, as shown below:
* After flashing, power on the board to run the example project.
* The system will initialize the AHT20 sensor and begin sampling temperature and humidity data.
* The sampled data will be printed via the serial terminal, as shown below:

```
\ | /
Expand All @@ -47,23 +76,23 @@ msh >[I/aht10] AHT10 has been initialized!

## Notes

* To modify the project’s **graphical configuration**, open the configuration file using the following tool:
* To modify the **graphical configuration** of the project, open the configuration file using the following tool:

```
tools/device-configurator/device-configurator.exe
libs/TARGET_APP_KIT_PSE84_EVAL_EPC2/config/design.modus
```

* After making changes, save the configuration and regenerate the code.
* After editing, save the configuration and regenerate the code.

## Boot Process
## Boot Sequence

The system boot sequence is as follows:

```
+------------------+
| Secure M33 |
| (Secure Core) |
| (Secure Core) |
+------------------+
|
v
Expand All @@ -79,12 +108,12 @@ The system boot sequence is as follows:
+-------------------+
```

⚠️ Please strictly follow the above flashing sequence; otherwise, the system may fail to run properly.
⚠️ Please strictly follow the boot sequence above when flashing firmware; otherwise, the system may fail to start properly.

---

* If the example project does not run properly, it is recommended to first build and flash the **Edgi-Talk_M33_S_Template** project to ensure the initialization and core startup process works correctly before running this example.
* To enable the M55 core, open the configuration in the **M33 project**:
* If the example project does not run correctly, compile and flash the **Edgi-Talk_M33_S_Template** project first to ensure proper initialization and core startup sequence before running this example.
* To enable the M55 core, configure the **M33 project** as follows:

```
RT-Thread Settings --> Hardware --> select SOC Multi Core Mode --> Enable CM55 Core
Expand Down
16 changes: 16 additions & 0 deletions projects/Edgi-Talk_AHT20/Edgi_Talk_M33_AHT20/README_zh.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,26 @@
# Edgi-Talk_M33_AHT20 示例工程

**中文** | [**English**](./README.md)

## 简介

本示例工程基于 **Edgi-Talk平台**,演示 **AHT20 温湿度传感器** 的驱动和使用方法。
通过本工程,用户可以快速体验 AHT20 的数据采集与处理,并在开发板上通过串口查看采样结果。

### AHT10 软件包简介
AHT10 软件包提供了使用温度与湿度传感器 aht10 基本功能,并且提供了软件平均数滤波器可选功能,如需详细了解该软件包,请参考 AHT10 软件包中的 README。

## 硬件说明
### 传感器连接接口
![alt text](figures/1.png)
### 电平转换
![alt text](figures/2.png)
### BTB座子
![alt text](figures/3.png)
### MCU引脚
![alt text](figures/4.png)
### 实物图位置
![alt text](figures/5.png)
## 软件说明

* 工程基于 **Edgi-Talk** 平台开发。
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading