Manufacturer Part Number Error


The quote is mostly correct, but do not approve it yet.
Required corrections/confirmation
  1. C1 is wrong
    • Quoted: 0805X106M6R3NT
    • This appears to be 10 µF, 6.3 V
    • Required: 10 µF, at least 10 V, X7R, 0805
    • Ask PCBWay to replace it with a 10 V or higher part.
  2. Confirm U1 assembly
    • The quoted SC0915 Raspberry Pi Pico is correct.
    • Ask them to confirm it will be manually through-hole assembled on the top side, with the USB connector in the indicated orientation.
Everything else matches: both 100 nF capacitors, all resistors, three Würth 82400102 TVS arrays, and TI SN74LVC1G07QDBVRQ1.
Quote total for one assembled board: $120.11
  • Components: $10.82
  • Assembly: $88.00
  • PCB: $21.29
Send PCBWay:
Please change C1 to a 10uF, minimum 10V, X7R, 0805 ceramic capacitor. Also confirm U1, Raspberry Pi Pico SC0915, will be manually through-hole assembled on the top side with the USB connector matching the assembly drawing.
tell me what to send

image

Copy and send this:
Hello Esther,
Please update C1. The quoted part 0805X106M6R3NT is rated for only 6.3 V.
C1 must be:
  • 10 µF
  • 10 V minimum
  • X7R ceramic
  • 0805 package
Please provide the replacement manufacturer part number for approval.
Also, please confirm that U1, Raspberry Pi Pico SC0915, will be manually through-hole assembled on the top side, with the USB connector matching the assembly drawing.
Finally, please have your CAM engineer confirm that all eight J2 smart-card contact areas are present on the top-copper and top-solder-mask layers and will remain exposed with no solder paste.
Thank you.
Then click Send. No photo attachment is necessary.
Review PCBWay reply
Create bring-up checklist
Verify updated quotation

Firmware Starter
This starter targets the Raspberry Pi Pico SDK and the final schematic pin map. It uses RP2040 PIO state machines for both parallel input sampling and the DATA open-drain command path. The normal protocol assumption is a standards-compliant 50 kHz SLE4442 clock; a build-time higher-frequency test mode raises the electrical sampling rate without changing the hardware.
Final pin map

Table


Pico pinFunctionElectrical path
GP2CLK sense5 V CLOCK through protected 12 kΩ / 22 kΩ divider
GP3RST sense5 V RESET through protected 12 kΩ / 22 kΩ divider
GP4DATA sense5 V open-drain DATA through protected 12 kΩ / 22 kΩ divider
GP5DATA drive commandDrives SN74LVC1G07 input; high releases DATA, low asserts DATA low
GP6AUX1 sense5 V AUX1 through protected 12 kΩ / 22 kΩ divider
GP7AUX2 sense5 V AUX2 through protected 12 kΩ / 22 kΩ divider
GP8VPP senseConfirmed 5 V maximum, through protected 12 kΩ / 22 kΩ divider
GP26 / ADC0Card VCC monitorCard +5 V through 12 kΩ / 22 kΩ divider
VSYSPico powerReader/card +5 V; do not connect reader +5 V to a GPIO
The digital sense pins are contiguous GP2–GP8. The sampler reads seven bits at once; bit 3 is the local GP5 drive-command state, while the external DATA level is bit 2 from GP4.
Divider and ADC scaling
For every 12 kΩ upper / 22 kΩ lower divider:
  • Divider ratio: 22 / (12 + 22) = 0.6470588
  • At 5.00 V input: approximately 3.235 V at the Pico pin
  • Reconstruct input voltage: Vin = Vpin * (34 / 22)
For the 12-bit Pico ADC using a nominal 3.3 V reference:

Text


VCC = adc_raw * (3.3 / 4095) * (34 / 22)
For precision measurements, calibrate the actual 3V3/ADC reference and resistor tolerances. The schematic leaves the module's external ADC_VREF pin intentionally unconnected; the Pico module's onboard reference arrangement remains in use.
Safety rule for DATA
Never push DATA high. GP5 only commands the 3.3 V-powered SN74LVC1G07 open-drain buffer:
  • GP5 = 1: buffer output is high impedance; the external 4.7 kΩ pull-up releases DATA high.
  • GP5 = 0: buffer sinks DATA low.
The starter exposes only data_release() and data_assert_low() so application code keeps this release-high/assert-low contract.
Files
Create the following three files in a firmware directory.
CMakeLists.txt

Cmake


cmake_minimum_required(VERSION 3.13)

include(pico_sdk_import.cmake)

project(pico_sle4442_emulator C CXX ASM)
set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD 17)

option(SLE4442_HIGH_FREQ_TEST "Use higher PIO sample rate for electrical testing" OFF)

pico_sdk_init()

add_executable(pico_sle4442_emulator
    main.c
)

pico_generate_pio_header(pico_sle4442_emulator
    ${CMAKE_CURRENT_LIST_DIR}/sle4442.pio
)

target_link_libraries(pico_sle4442_emulator
    pico_stdlib
    hardware_adc
    hardware_clocks
    hardware_pio
)

if(SLE4442_HIGH_FREQ_TEST)
    target_compile_definitions(pico_sle4442_emulator PRIVATE SLE4442_HIGH_FREQ_TEST=1)
endif()

pico_enable_stdio_usb(pico_sle4442_emulator 1)
pico_enable_stdio_uart(pico_sle4442_emulator 0)
pico_add_extra_outputs(pico_sle4442_emulator)
sle4442.pio

Pio


.program sample_bus
; GP2..GP8 are read as one contiguous seven-bit sample.
; With shift-left configuration, the latest sample is in RX bits [6:0].
.wrap_target
    mov isr, null
    in pins, 7
    push noblock
.wrap

.program data_drive
; One FIFO word controls GP5 through its least-significant bit.
; 1 = release external DATA, 0 = assert external DATA low.
.wrap_target
    pull block
    out pins, 1
.wrap
main.c

C


#include <stdio.h>
#include "pico/stdlib.h"
#include "hardware/adc.h"
#include "hardware/clocks.h"
#include "hardware/pio.h"
#include "sle4442.pio.h"

#define PIN_CLK_SENSE       2u
#define PIN_RST_SENSE       3u
#define PIN_DATA_SENSE      4u
#define PIN_DATA_DRIVE      5u
#define PIN_AUX1_SENSE      6u
#define PIN_AUX2_SENSE      7u
#define PIN_VPP_SENSE       8u
#define PIN_VCC_ADC         26u
#define VCC_ADC_INPUT       0u

#define EXPECTED_PROTOCOL_CLOCK_HZ 50000u

#ifdef SLE4442_HIGH_FREQ_TEST
#define INPUT_SAMPLE_HZ 5000000u
#else
#define INPUT_SAMPLE_HZ 1000000u
#endif

#define SAMPLE_CLK_BIT       (1u << 0)
#define SAMPLE_RST_BIT       (1u << 1)
#define SAMPLE_DATA_BIT      (1u << 2)
#define SAMPLE_DRIVE_BIT     (1u << 3)
#define SAMPLE_AUX1_BIT      (1u << 4)
#define SAMPLE_AUX2_BIT      (1u << 5)
#define SAMPLE_VPP_BIT       (1u << 6)

static PIO drive_pio;
static uint drive_sm;

static inline void data_release(void) {
    /* GP5 high makes the non-inverting open-drain buffer output high-Z. */
    pio_sm_put_blocking(drive_pio, drive_sm, 1u);
}

static inline void data_assert_low(void) {
    /* GP5 low makes the open-drain buffer sink external DATA. */
    pio_sm_put_blocking(drive_pio, drive_sm, 0u);
}

static void init_input_sampler(PIO pio, uint sm) {
    uint offset = pio_add_program(pio, &sample_bus_program);
    pio_sm_config c = sample_bus_program_get_default_config(offset);

    sm_config_set_in_pins(&c, PIN_CLK_SENSE);
    sm_config_set_in_shift(&c, false, false, 32); /* shift left, explicit PUSH */

    for (uint pin = PIN_CLK_SENSE; pin <= PIN_VPP_SENSE; ++pin) {
        pio_gpio_init(pio, pin);
    }
    pio_sm_set_consecutive_pindirs(pio, sm, PIN_CLK_SENSE, 7, false);

    /* The PIO loop is three instructions per completed sample. */
    float divider = (float)clock_get_hz(clk_sys) /
                    ((float)INPUT_SAMPLE_HZ * 3.0f);
    sm_config_set_clkdiv(&c, divider);

    pio_sm_init(pio, sm, offset, &c);
    pio_sm_set_enabled(pio, sm, true);
}

static void init_data_drive(PIO pio, uint sm) {
    uint offset = pio_add_program(pio, &data_drive_program);
    pio_sm_config c = data_drive_program_get_default_config(offset);

    sm_config_set_out_pins(&c, PIN_DATA_DRIVE, 1);
    sm_config_set_out_shift(&c, true, false, 32);
    pio_gpio_init(pio, PIN_DATA_DRIVE);
    pio_sm_set_consecutive_pindirs(pio, sm, PIN_DATA_DRIVE, 1, true);

    pio_sm_init(pio, sm, offset, &c);

    /* R14 already pulls GP5 high while the Pico is starting. Queue release
       before enabling the state machine to preserve the safe idle state. */
    pio_sm_put_blocking(pio, sm, 1u);
    pio_sm_set_enabled(pio, sm, true);
}

static void init_vcc_adc(void) {
    adc_init();
    adc_gpio_init(PIN_VCC_ADC);
    adc_select_input(VCC_ADC_INPUT);
}

static float read_card_vcc(void) {
    const uint16_t raw = adc_read();
    const float adc_pin_v = (float)raw * (3.3f / 4095.0f);
    return adc_pin_v * (34.0f / 22.0f);
}

int main(void) {
    stdio_init_all();
    sleep_ms(1500);

    PIO sample_pio = pio0;
    uint sample_sm = pio_claim_unused_sm(sample_pio, true);
    drive_pio = pio1;
    drive_sm = pio_claim_unused_sm(drive_pio, true);

    init_data_drive(drive_pio, drive_sm);
    data_release();
    init_input_sampler(sample_pio, sample_sm);
    init_vcc_adc();

    printf("SLE4442 Pico starter: expected clock %u Hz, sample rate %u Hz\n",
           EXPECTED_PROTOCOL_CLOCK_HZ, INPUT_SAMPLE_HZ);

    uint32_t previous = 0xffffffffu;
    absolute_time_t next_adc_report = make_timeout_time_ms(1000);

    while (true) {
        /* No CPU edge interrupts are used. PIO performs the actual sampling;
           the CPU drains snapshots and can be replaced by a protocol parser
           or DMA ring buffer in the full emulator. */
        while (!pio_sm_is_rx_fifo_empty(sample_pio, sample_sm)) {
            uint32_t sample = pio_sm_get(sample_pio, sample_sm) & 0x7fu;
            if (sample != previous) {
                previous = sample;
                printf("CLK=%u RST=%u DATA=%u DRIVE=%u AUX1=%u AUX2=%u VPP=%u\n",
                       !!(sample & SAMPLE_CLK_BIT),
                       !!(sample & SAMPLE_RST_BIT),
                       !!(sample & SAMPLE_DATA_BIT),
                       !!(sample & SAMPLE_DRIVE_BIT),
                       !!(sample & SAMPLE_AUX1_BIT),
                       !!(sample & SAMPLE_AUX2_BIT),
                       !!(sample & SAMPLE_VPP_BIT));
            }
        }

        if (time_reached(next_adc_report)) {
            printf("Card VCC: %.3f V\n", read_card_vcc());
            next_adc_report = make_timeout_time_ms(1000);
        }

        tight_loop_contents();
    }
}
Build and flash
  1. Install the Raspberry Pi Pico SDK and export its path:

    Bash


    export PICO_SDK_PATH=/absolute/path/to/pico-sdk
  2. Copy pico_sdk_import.cmake from the SDK's external/ directory into the firmware directory, or provide it through your normal SDK project setup.
  3. Configure and build the normal 50 kHz-protocol-assumption firmware:

    Bash


    cmake -S . -B build
    cmake --build build -j
  4. Configure the higher-frequency electrical test build:

    Bash


    cmake -S . -B build-high -DSLE4442_HIGH_FREQ_TEST=ON
    cmake --build build-high -j
  5. Hold BOOTSEL while connecting the Pico USB port, then copy the generated .uf2 file to the RPI-RP2 drive. Alternatively, flash the ELF with a supported SWD probe.
Startup sequence
  1. Pico powers from reader +5 V through VSYS; USB may coexist through the Pico module's onboard power-path arrangement.
  2. R14 holds the SN74LVC1G07 input high so DATA is released during reset.
  3. Firmware starts the PIO DATA state machine with a release command.
  4. Firmware starts PIO sampling of GP2–GP8.
  5. Firmware initializes ADC0 and monitors card VCC.
  6. Protocol code may then observe CLK/RST/DATA/AUX/VPP and use only the two safe DATA control functions.
Extension note
The starter intentionally demonstrates the hardware contract and PIO ownership. For lossless long captures at the 5 MHz test rate, connect the sampling state machine RX FIFO to a DMA ring buffer rather than printing every transition over USB.
  • Final pin map

  • Divider and ADC scaling

  • Safety rule for DATA

  • Files

  • `CMakeLists.txt`

  • `sle4442.pio`

  • `main.c`

  • Build and flash

  • Startup sequence

  • Extension note