summaryrefslogtreecommitdiff
path: root/static/netbsd/man4/mcp3kadc.4
diff options
context:
space:
mode:
Diffstat (limited to 'static/netbsd/man4/mcp3kadc.4')
-rw-r--r--static/netbsd/man4/mcp3kadc.495
1 files changed, 95 insertions, 0 deletions
diff --git a/static/netbsd/man4/mcp3kadc.4 b/static/netbsd/man4/mcp3kadc.4
new file mode 100644
index 00000000..f7c2d97f
--- /dev/null
+++ b/static/netbsd/man4/mcp3kadc.4
@@ -0,0 +1,95 @@
+.\" $NetBSD: mcp3kadc.4,v 1.2 2015/08/19 09:57:41 wiz Exp $
+.\"
+.\" Copyright (c) 2015 The NetBSD Foundation, Inc.
+.\" All rights reserved.
+.\"
+.\" This code is derived from software contributed to The NetBSD Foundation
+.\" by Frank Wille.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.Dd August 18, 2015
+.Dt MCP3KADC 4
+.Os
+.Sh NAME
+.Nm mcp3kadc
+.Nd Microchip 3x0x SAR analog to digital converter
+.Sh SYNOPSIS
+.Cd "mcp3kadc* at spi? slave ? flags N"
+.Sh DESCRIPTION
+The
+.Nm
+driver reports the current voltage on the chip's ADC channels through the
+.Xr envsys 4
+API.
+The driver calculates these values according to the currently selected
+reference voltage
+.Li ( Vref ) .
+It can be changed through the
+.Xr sysctl 8
+node
+.Li hw.mcp3kadc0.vref .
+.Pp
+The following table shows the supported chips.
+The type of the chip can be selected with the
+.Ar flags
+argument in the config file.
+.Bl -column "Designation" "Resolution" "Input Channels" "flags" -offset indent
+.It Sy "Designation" Ta Sy "Resolution" Ta Sy "Input Channels" Ta Sy "flags"
+.It Li "MCP3001" Ta "10 bits" Ta "1" Ta "0"
+.It Li "MCP3002" Ta "10 bits" Ta "2" Ta "1"
+.It Li "MCP3004" Ta "10 bits" Ta "4" Ta "2"
+.It Li "MCP3008" Ta "10 bits" Ta "8" Ta "3"
+.It Li "MCP3201" Ta "12 bits" Ta "1" Ta "4"
+.It Li "MCP3202" Ta "12 bits" Ta "2" Ta "5"
+.It Li "MCP3204" Ta "12 bits" Ta "4" Ta "6"
+.It Li "MCP3208" Ta "12 bits" Ta "8" Ta "7"
+.It Li "MCP3301" Ta "13 bits" Ta "1" Ta "8"
+.It Li "MCP3302" Ta "13 bits" Ta "4" Ta "9"
+.It Li "MCP3304" Ta "13 bits" Ta "8" Ta "10"
+.El
+.Sh SYSCTL VARIABLES
+The following
+.Xr sysctl 3
+variables are provided:
+.Bl -tag -width indent
+.It hw.mcp3kadc0.vref
+Defines the reference voltage on the chip's
+.Li Vref
+pin in millivolts (mV).
+It defaults to the ADC's maximum output value + 1
+in millivolts (e.g., 4096 for a 12-bit ADC).
+.El
+.Sh SEE ALSO
+.Xr envsys 4 ,
+.Xr spi 4 ,
+.Xr sysctl 8
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Nx 8.0 .
+.Sh AUTHORS
+The
+.Nm
+driver was written by
+.An Frank Wille .