From 371c59fc2865811a24ab2cd5c098449eb2dde856 Mon Sep 17 00:00:00 2001 From: Steve Markgraf Date: Thu, 28 Nov 2024 21:10:50 +0100 Subject: [PATCH] external_adc: Switch to GP20 for ADC clock ..so that more consecutive pins are available for attaching an additional audio ADC module. --- README.md | 2 +- apps/external_adc/external_adc.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 115ac59..1c11d9a 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ The data from the internal ADC is streamed out via USB. Default configuration is ### external_adc -This app contains a PIO program that reads the data from a 12-bit ADC connected to GP0-GP11, outputs the ADC clock on GP22, and packs the 12 bit samples to 16-bit words to achieve maximum throughput. +This app contains a PIO program that reads the data from a 12-bit ADC connected to GP0-GP11, outputs the ADC clock on GP20, and packs the 12 bit samples to 16-bit words to achieve maximum throughput. It is meant to be used with cheap AD9226 ADC boards. The default setting is overclocking the RP2350 to 320 MHz and driving the ADC with a 40 MHz clock. With higher overclocking up to 50.25 MHz ADC clock can be used. This can be used for sampling the IF of a tuner/downcoverter, as a direct-sampling HF SDR, or for capturing a video signal e.g. with [vhsdecode](https://github.com/oyvindln/vhs-decode). diff --git a/apps/external_adc/external_adc.c b/apps/external_adc/external_adc.c index 0f99588..02d132a 100644 --- a/apps/external_adc/external_adc.c +++ b/apps/external_adc/external_adc.c @@ -49,9 +49,9 @@ //#define SYS_CLK 384000 // 48 MHz ADC clock //#define SYS_CLK 402000 // 50.25 MHz ADC clock, maximum that works on my Pico2 (with overvolting) -// ADC is attached to GP0 - GP11 with clock on GP22 +// ADC is attached to GP0 - GP11 with clock on GP20 #define PIO_INPUT_PIN_BASE 0 -#define PIO_OUTPUT_CLK_PIN 22 +#define PIO_OUTPUT_CLK_PIN 20 #define DMACH_PIO_PING 0 #define DMACH_PIO_PONG 1