xref: /csrg-svn/share/man/man4/man4.vax/ad.4 (revision 61594)
1*61594Sbostic.\" Copyright (c) 1983, 1991, 1993
2*61594Sbostic.\"	The Regents of the University of California.  All rights reserved.
320706Smckusick.\"
447674Scael.\" %sccs.include.redist.man%
520706Smckusick.\"
6*61594Sbostic.\"     @(#)ad.4	8.1 (Berkeley) 06/05/93
747674Scael.\"
847674Scael.Dd
947674Scael.Dt AD 4 vax
1047674Scael.Os BSD 4.2
1147674Scael.Sh NAME
1247674Scael.Nm ad
1347674Scael.Nd Data Translation A/D converter
1447674Scael.Sh SYNOPSIS
1547674Scael.Cd "device ad0 at uba0 csr 0170400 vector adintr"
1647674Scael.Sh DESCRIPTION
1747674ScaelThe
1847674Scael.Nm \&ad
1947674Scaeldriver
2047674Scaelprovides an interface to the Data Translation A/D converter.
2120706SmckusickThis is
2247674Scael.Em not
2320706Smckusicka real-time driver, but merely allows
2420706Smckusickthe user process to sample the board's channels one at a time.
2547674ScaelEach minor device selects a different
2647674Scael.Tn A/D
2747674Scaelboard.
2847674Scael.Pp
2947674ScaelThe driver communicates to a user process by means of
3047674Scael.Xr ioctl 2 Ns s.
3147674ScaelThe
3247674Scael.Dv AD_CHAN
3347674Scael.Xr ioctl
3447674Scaelselects which channel of the board to read.
3520706SmckusickFor example,
3647674Scael.Bd -literal -offset indent
3720706Smckusickchan = 5;
3820706Smckusickioctl(fd, AD_CHAN, &chan);
3947674Scael.Ed
4047674Scael.Pp
4120706Smckusickselects channel 5.
4247674ScaelThe
4347674Scael.Dv AD_READ
4447674Scael.Xr ioctl 2
4547674Scaelactually reads the data and returns it to the user
4620706Smckusickprocess.
4720706SmckusickAn example is
4847674Scael.Bd -literal -offset indent
4920706Smckusickioctl(fd, AD_READ, &data);
5047674Scael.Ed
5147674Scael.Sh FILES
5247674Scael.Bl -tag -width /dev/adx -compact
5347674Scael.It Pa /dev/ad
5447674Scael.El
5547674Scael.Sh DIAGNOSTICS
5620706SmckusickNone.
5747674Scael.Sh HISTORY
5847674ScaelThe
5947674Scael.Nm
6047674Scaeldriver appeared in
6147674Scael.Bx 4.1 .
62