8000 Check AnalogIn and AnalogOut to make sure they are all 16 bit · Issue #14 · adafruit/circuitpython · GitHub
[go: up one dir, main page]

Skip to content
Check AnalogIn and AnalogOut to make sure they are all 16 bit #14
Closed
@tdicola

Description

@tdicola

The DAC object allows passing to write a value that's greater than the DAC supports, like 1024, 9999, etc. We should catch this and fail with an out of bounds error. Example:

import machine
dac = machine.DAC()
dac.write(9999)

Interestingly a write of 9999 outputs a voltage around 2.5v when the reference is 3.3v. Values within the 10-bit range (0-1023) have the expected out and are all good, so this is a minor issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0