adc-dac-baremetal

adc-dac-baremetal is a skill for Claude Code, Codex from mohitmishra786/low-level-dev-skills. It costs 53 tokens per session (637 once invoked), scanned A, original, MIT.

Guidance for configuring ADCs and DACs on microcontrollers. An ADC reads an analogue signal as numbers, while a DAC turns numbers into an analogue output.

In plain words
What is it for?
Use it to read sensors, configure sampling times, calibrate STM32 ADCs, stream samples with DMA, and produce static or changing voltages through a DAC.
Why use it?
It helps avoid incorrect sampling, missing calibration, and unreliable continuous readings or outputs.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to read sensors, configure sampling times, calibrate STM32 ADCs, stream samples with DMA, and produce static or changing voltages through a DAC.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mohitmishra786/low-level-dev-skills/adc-dac-baremetal
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add mohitmishra786/low-level-dev-skills --skill adc-dac-baremetal
Clone the repo
git clone --depth 1 https://github.com/mohitmishra786/low-level-dev-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for adc-dac-baremetal

README.md
[![agentmods](https://agentmods.dev/badge/skills/mohitmishra786/low-level-dev-skills/adc-dac-baremetal/github.svg)](https://agentmods.dev/skills/mohitmishra786/low-level-dev-skills/adc-dac-baremetal)
Your own site
<a href="https://agentmods.dev/skills/mohitmishra786/low-level-dev-skills/adc-dac-baremetal"><img src="https://agentmods.dev/badge/skills/mohitmishra786/low-level-dev-skills/adc-dac-baremetal/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for adc-dac-baremetal

Your own site · 80×15
<a href="https://agentmods.dev/skills/mohitmishra786/low-level-dev-skills/adc-dac-baremetal"><img src="https://agentmods.dev/badge/skills/mohitmishra786/low-level-dev-skills/adc-dac-baremetal.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 53 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 637 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00053 $0.00637
Opus 5 $0.00026 $0.00318
Sonnet 5 $0.00011 $0.00127
Haiku 4.5 $0.00005 $0.00064

Measured 12d ago against content hash 25b3cdfb478d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

adc-dac-baremetal scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/baremetal/adc-dac-baremetal/SKILL.md · 77 lines

What it actually says

ADC and DAC (Bare-Metal)

Purpose

Configure ADC and DAC peripherals: channel selection, sampling times, calibration sequences, DMA circular buffers, and DAC static/dynamic output.

When to Use

  • Reading analog sensors (temperature, voltage)
  • Audio or control voltage output via DAC
  • Continuous sampling with DMA
  • Post-reset ADC calibration on STM32

Workflow

1. STM32 ADC single conversion

/* Enable ADC1 and GPIOA clock; PA0 analog mode */
ADC1->CR2 |= ADC_CR2_ADON;
for (volatile int i = 0; i < 10000; i++);  /* stabilization — RM value */

ADC1->SMPR2 |= ADC_SMPR2_SMP0_2;  /* 84 cycles sample time ch0 */
ADC1->SQR3   = 0;                 /* channel 0, 1 conversion */
ADC1->CR2   |= ADC_CR2_SWSTART;

while (!(ADC1->SR & ADC_SR_EOC))
    ;
uint16_t sample = ADC1->DR;

Run ADC_Calibration() / ADC_CR2_RSTCAL/CAL per RM on F1/F4 families.

2. DMA circular ADC

/* ADC1 → DMA2 Stream0, circular mode into buffer[64] */
/* Configure DMA: periph-to-mem, halfword, increment mem, circular */
ADC1->CR2 |= ADC_CR2_DMA | ADC_CR2_CONT;
DMA2_Stream0->CR |= DMA_SxCR_EN;

Half-transfer / transfer-complete IRQs for double buffering.

3. DAC output (STM32)

RCC->APB1ENR |= RCC_APB1ENR_DACEN;
DAC->CR |= DAC_CR_EN1;
DAC->DHR12R1 = 2048;  /* mid-scale 3.3V reference */

4. Agent usage

/adc-dac-baremetal Set up ADC1 channel 0 with DMA circular buffer

Common Problems

Symptom Cause Fix
Noisy readings Short sample time Increase SMP bits
Stuck EOC Clock not enabled RCC ADC enable
Wrong voltage Vref not 3.3V Measure VDDA; calibrate
DMA corrupt Buffer alignment Use uint16_t aligned buffer
  • skills/baremetal/dma-baremetal — ADC DMA streams
  • skills/baremetal/timers-pwm-baremetal — ADC external trigger
  • skills/baremetal/gpio-baremetal — analog pin mode
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 77 lines · 53 tokens per session scan A 25b3cdfb478d

Subscribe to this mod's changes

adc-dac-baremetal is a skill published in the GitHub repository mohitmishra786/low-level-dev-skills (203 stars, last pushed 2mo ago), licensed MIT. It adds 53 tokens to every session and 637 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.