### Initializing PicoEMP Project with CMake Source: https://github.com/newaetech/chipshouter-picoemp/blob/main/firmware/c/CMakeLists.txt This snippet defines the minimum required CMake version, imports the Pico SDK, initializes it, and declares the `picoemp` executable. The comments highlight the importance of SDK initialization before the project definition. ```CMake cmake_minimum_required(VERSION 3.13) # initialize the SDK based on PICO_SDK_PATH # note: this must happen before project() include(pico_sdk_import.cmake) project(picoemp) pico_sdk_init() add_executable(picoemp) ``` -------------------------------- ### Building PicoEMP Firmware with CMake Source: https://github.com/newaetech/chipshouter-picoemp/blob/main/firmware/c/README.md These shell commands are used to compile the PicoEMP C firmware. They first set the PICO_SDK_PATH environment variable to locate the Pico SDK, then use CMake to configure the build system, and finally compile the project. ```Shell export PICO_SDK_PATH=.. path to pico SDK .. cmake -S . -B build cmake --build build ``` -------------------------------- ### Linking Source Files and Libraries for PicoEMP Source: https://github.com/newaetech/chipshouter-picoemp/blob/main/firmware/c/CMakeLists.txt This section specifies the C source files (`main.c`, `picoemp.c`, `serial.c`) for the `picoemp` executable and links essential Pico SDK libraries like `pico_stdlib`, `hardware_pwm`, `hardware_pio`, and `pico_multicore`. `pico_add_extra_outputs` ensures all necessary build artifacts are generated. ```CMake target_sources(picoemp PRIVATE main.c picoemp.c serial.c ) target_link_libraries(picoemp PRIVATE pico_stdlib hardware_pwm hardware_pio pico_multicore) pico_add_extra_outputs(picoemp) ``` -------------------------------- ### Listing Generic Components and Substitutions for PicoEMP Source: https://github.com/newaetech/chipshouter-picoemp/blob/main/hardware/README.md This snippet lists more generic components for the PicoEMP, including suggested part numbers and known substitutions to aid in sourcing. It provides crucial details for component replacement, such as considering the gate charge for IGBT (Q2), gate turn-on voltage for N-Channel MOSFETs (Q3/Q4), and voltage rating/case size for capacitors (C3) to ensure proper circuit functionality. ```csv 1,RGT16BM65DTL,Q2 2,AO3422,Q3 Q4 1,TL3301AF160QJ,SW3 1,MURA160T3G,D2 4,SM4005PL-TP,D1 D3 D4 D5 1,KRM55TR72J474MH01K,C3 1,CRMA2010AF20M0FKEF,R1 1,3522300KFT,R2 1,BG306-02-A-2-0400-L-G,J3 1,0732511150,J1 ``` -------------------------------- ### Listing Specific Components for PicoEMP Build Source: https://github.com/newaetech/chipshouter-picoemp/blob/main/hardware/README.md This snippet details the Bill of Materials for critical and hard-to-substitute components essential for the PicoEMP build. It provides quantities, specific part numbers, and reference designators. Notes highlight the impact of substitutions, such as the Zener diode (D7) affecting the drive waveform and the low-current requirements of the opto-coupler (Q1). ```csv 2,ATB322524-0110-T000,T1 T2 1,MM3Z18VB,D7 1,LDA111STR,Q1 1,1551BTRD,SHIELD 1,SC0915,U1 ``` -------------------------------- ### Generic Parts Bill of Materials for PicoEMP Source: https://github.com/newaetech/chipshouter-picoemp/blob/main/hardware/README.md This list provides generic electronic components for the ChipSHOUTER PicoEMP, which are not specific to a single manufacturer and can be sourced based on availability. It includes various resistors, capacitors, and LEDs, with notes on acceptable tolerances, voltage ratings, and interchangeable footprints (e.g., 0603/0805 resistors, SW1/SW2 switches). ```plaintext 2,KSC741J LFS,SW1 SW2 2,10R 0603 RESISTOR,R3 R7 1,75R 0805 RESISTOR,R4 5,1K 0603 RESISTOR,R5 R10 R11 R12 R13 1,2K 0805 RESISTOR,R9 1,22K 0603 RESISTOR,R6 2,4.7uF 50V 0805 CERAMIC CAPACITOR,C1 C2 1,100nF 0603 CERAMIC CAPACITOR,C5 2,APT1608SRCPRV,D6 D9 1,APT1608CGCK,D8 ``` -------------------------------- ### Configuring Standard I/O for PicoEMP Source: https://github.com/newaetech/chipshouter-picoemp/blob/main/firmware/c/CMakeLists.txt This snippet configures the standard I/O for the `picoemp` project, enabling USB output and explicitly disabling UART output. This directs all console communication through the USB interface, which is common for Pico projects. ```CMake pico_enable_stdio_usb(picoemp 1) pico_enable_stdio_uart(picoemp 0) ``` -------------------------------- ### Generating PIO Header for PicoEMP Source: https://github.com/newaetech/chipshouter-picoemp/blob/main/firmware/c/CMakeLists.txt This command generates a C header file from the `trigger_basic.pio` PIO assembly code. This header is crucial for integrating custom PIO state machines into the C/C++ application. ```CMake pico_generate_pio_header(picoemp ${CMAKE_CURRENT_LIST_DIR}/trigger_basic.pio) ``` -------------------------------- ### SMA Connectors and Ferrites for PicoEMP Output Source: https://github.com/newaetech/chipshouter-picoemp/blob/main/hardware/README.md This section lists recommended components for the PicoEMP's output, including an SMA connector (CONSMA013.062) and ferrites (PCV-0-472-03L, 744710603). These parts are essential for connecting the tool to external devices and managing signal integrity, with a suggestion to acquire multiple SMA connectors for flexibility. ```plaintext 1,CONSMA013.062 1,PCV-0-472-03L 1,744710603 ``` -------------------------------- ### Recommended USB Isolator for PicoEMP Communication Source: https://github.com/newaetech/chipshouter-picoemp/blob/main/hardware/README.md This snippet suggests a specific USB isolator (Seeed Technology Co 114991949) for safe communication with the PicoEMP during operation. A USB isolator is crucial to prevent damage to connected devices by electrically isolating the USB connection, with Adafruit 2107 offered as an alternative. ```plaintext Seeed Technology Co 114991949 ``` -------------------------------- ### Battery Input Parts for PicoEMP Source: https://github.com/newaetech/chipshouter-picoemp/blob/main/hardware/README.md This snippet lists components for the battery input section of the PicoEMP, specifically a JST-XH connector (J2) and a Sparkfun AA battery holder (PRT-09925). The battery holder includes a power switch and connects directly to the R-Pi Pico power input, requiring adherence to the Pico's specified voltage ranges. ```plaintext 1,S2B-XH-A(LF)(SN),J2 1,PRT-09925,BATTERY HOLDER ``` -------------------------------- ### Disabling High Voltage Timeout in MicroPython Source: https://github.com/newaetech/chipshouter-picoemp/blob/main/firmware/micropython/README.md This MicroPython snippet demonstrates how the Chipshouter PicoEMP firmware automatically turns off high voltage after 60 seconds of inactivity to conserve battery. Users can comment out this section to keep the high voltage enabled indefinitely. It checks for activity using `utime.ticks_diff` and disables HV by setting `enabled` to `False`, turning off PWM, and the arm LED. ```MicroPython # Turn off HV if no activity after 60 seconds if enabled: if utime.ticks_diff(utime.ticks_ms(), timeout_start) > 60000: enabled = False pwm_off() ledArm.off() ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.