All Projects → shuai132 → ScopeMCU

shuai132 / ScopeMCU

Licence: other
虚拟示波器 MCU端

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to ScopeMCU

STM32F103 MSD BOOTLOADER
STM32F103 Mass Storage Device Bootloader
Stars: ✭ 23 (-61.02%)
Mutual labels:  stm32, stm32f103
i2c-sniffer
Debugging tool for I2C networks, built for STM32 microcontrollers
Stars: ✭ 22 (-62.71%)
Mutual labels:  stm32, stm32f103
platformio-libopencm3-freertos
Sample blinky project for PlatformIO using libopencm3 and FreeRTOS
Stars: ✭ 14 (-76.27%)
Mutual labels:  stm32, stm32f103
gsm
gsm module library for STM32 LL
Stars: ✭ 28 (-52.54%)
Mutual labels:  stm32, cubemx
DHT11-DHT22-STM32-HAL
Библиотека для работы с датчиками DHT11/DHT22/AM2302/AM2301 на STM32
Stars: ✭ 26 (-55.93%)
Mutual labels:  stm32, stm32f103
STM32F10x Servo Library
Servo library with stm developed by the Liek Software Team. We are working on new versions.
Stars: ✭ 14 (-76.27%)
Mutual labels:  stm32, stm32f103
STM32-Bare-Metal
STM32F103C8 bare metal template
Stars: ✭ 26 (-55.93%)
Mutual labels:  stm32, stm32f103
tiny scope
Tiny Scope for Arduino
Stars: ✭ 34 (-42.37%)
Mutual labels:  oscilloscope, scope
FASTUSBasp
This is the fast avr programmer for AVR MCUs based on cheap stm32f103c8t6 board with usb-to-serial support.
Stars: ✭ 78 (+32.2%)
Mutual labels:  stm32, stm32f103
STM32Keyboard
No description or website provided.
Stars: ✭ 15 (-74.58%)
Mutual labels:  stm32, stm32f103
STM32F103-Bare-Metal
Programming the STM32F103C8 micro controller at the "bare metal" register level.
Stars: ✭ 42 (-28.81%)
Mutual labels:  stm32, stm32f103
grbl32
CNC controller running on the STM32F103 "Blue Pill" board, build and flash on Mac/Linux
Stars: ✭ 33 (-44.07%)
Mutual labels:  stm32, stm32f103
BlueVGA
VGA library for STM32F103C (BluePill) that can manipulate a screen with 28x30 tiles with 8x8 pixels each, in a total resolution of 224x240 pixels with 8 colors using a very low footprint
Stars: ✭ 39 (-33.9%)
Mutual labels:  stm32, stm32f103
stm32 tiny monitor
A tiny external monitor for PC using STM32 and ST7789. Connects to PC over USB and displays the captured screen on ST7789 (240x240) display.
Stars: ✭ 61 (+3.39%)
Mutual labels:  stm32, stm32f103
ScopeGUI
虚拟示波器 GUI for https://github.com/shuai132/ScopeMCU
Stars: ✭ 46 (-22.03%)
Mutual labels:  oscilloscope, scope
stm32f10x makefile freertos
stm32f10x gcc makefile freertos
Stars: ✭ 28 (-52.54%)
Mutual labels:  stm32, stm32f103
esm
Lightweight communicating state machine framework for embedded systems
Stars: ✭ 21 (-64.41%)
Mutual labels:  stm32, stm32f103
stm-ILI9341-spi
STM32 ILI9341 spi
Stars: ✭ 77 (+30.51%)
Mutual labels:  stm32, stm32f103
stm32-mcu
Application components for STMicro STM32 MCUs
Stars: ✭ 22 (-62.71%)
Mutual labels:  stm32, cubemx
rt soldering pen
RT soldering pen project firmware
Stars: ✭ 109 (+84.75%)
Mutual labels:  stm32

ScopeMCU

Build Status

Oscilloscope for MCU

MCU: STM32F103C8Tx

需配合ScopeGUI使用

截图说明见wiki

最新版Releases

Introduction

用最少的硬件成本,做一个实用的虚拟示波器。

这是硬件部分,基于STM32最小系统,不使用任何片外外设。 可以方便地移植到其他硬件(只需要ADC、定时器、串口/USB即可)。 采样率和采样深度等参数取决于芯片性能。

Features

  • Timer触发ADC+DMA 精确采样
  • ADC数值已校准(使用内部基准电压)
  • 采样率无级可调 最高采样率1Msps
  • 采样深度可调 当前6144(1024*6)点
  • 内置自测信号(1kHz方波)
  • 多种触发方式(自动、正常、单次)
  • FFT频谱分析(上位机实现)
  • USB CDC 高速数据传输

注:

  • 未设计前端运放电路,只用于采集0~3.3V信号。
  • 为了采样精度和校准,当前最高采样率: 70ksps

IO Map

必需

管脚 作用
PA0 ADC通道
PA11 USB DM USB接口
PA12 USB DP USB接口

可选

管脚 作用
PC13 LED指示灯 采样过程为低电平
PA8 1kHz方波信号 用于自测
PA9 USART1 TX 调试串口
PA10 USART1 RX 调试串口

移植

设计上把可移植性作为重要目标,可以很方便地移植到其他单片机、Arduino、DSP等硬件。

只需硬件提供指定功能实现函数即可,具体见ScopeCore中public方法的注释或移植步骤。

注:

  • 需要C++11支持,推荐使用arm-none-eabi编译器和cmake构建,已在Windows、macOS、Ubuntu下测试通过。
  • 为了方便软件设计和数据解析,直接打包结构体作为消息单元。注意要和上位机保持一致的字节序(arm、x86、arduino均为小端模式)。

移植步骤

  • 初始化scope
    // 在全局初始化
    static const size_t MaxSn = 1024 * 6;   // 取决于RAM大小
    static uint8_t Buffer[Message::CalcBytes(MaxSn)];
    static ScopeMCU scopeMcu(MaxSn, Buffer);
    ...

    scopeMcu.setVolLimits(0, 3300);
    scopeMcu.setFsLimits(1, 10000);
    scopeMcu.setMcuImpl(
            {
                    .sendData = [](uint8_t* data, size_t size) {
                        // 用串口发送数据
                    },
                    .startADC = []{
                        // 开始采样
                    },
                    .stopADC = []{
                        // 停止采样
                    },
                    .setSampleFs = [](uint32_t fs) {
                        // 设置采样率 返回实际的采样率
                    },
                    .onSampling = [](bool sampling) {
                        // 可用来控制指示灯状态
                    },
            });
  • 当收到串口数据
    scopeMcu.onRead(data, size);
  • 当一次ADC转换完成
    scopeMcu.onADC(vol);

注:

  • startADC之前不要触发onADC

DevelopTools

  • STM32CubeMX
  • arm-none-eabi-gcc
  • CLion(CMake)
  • OpenOCD
  • ST-LINK

Install Requirements(for macOS)

  • config OpenOCD and ST-LINK
brew install openocd
brew install stlink
brew cask install gcc-arm-embedded

Usage

Links

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].