From 60d9b6316385ad2979688d7c965365e59e06ed29 Mon Sep 17 00:00:00 2001 From: Peter McGoron Date: Wed, 13 Jul 2022 14:12:06 -0400 Subject: [PATCH] testing PMOD DAC output successful --- software/src/main.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/software/src/main.c b/software/src/main.c index 5e1f13d..f68930b 100644 --- a/software/src/main.c +++ b/software/src/main.c @@ -11,10 +11,16 @@ main(void) LOG_PRINTK("hello, world\n"); for (;;) { k_sleep(K_MSEC(1000)); +#if 0 // ADC code *adc_conv[0] = v; v = !v; r = *adc_sdo[0]; - +#endif + *dac_ctrl[0] = v; + v++; + if (v == 8) + v = 0; + r = *dac_miso[0]; LOG_PRINTK("out: %d; in: %d\n", v, r); } }