xref: /csrg-svn/share/man/man4/man4.vax/ad.4 (revision 47674)
1*47674Scael.\" Copyright (c) 1983, 1991 Regents of the University of California.
2*47674Scael.\" All rights reserved.
320706Smckusick.\"
4*47674Scael.\" %sccs.include.redist.man%
520706Smckusick.\"
6*47674Scael.\"     @(#)ad.4	6.2 (Berkeley) 03/27/91
7*47674Scael.\"
8*47674Scael.Dd
9*47674Scael.Dt AD 4 vax
10*47674Scael.Os BSD 4.2
11*47674Scael.Sh NAME
12*47674Scael.Nm ad
13*47674Scael.Nd Data Translation A/D converter
14*47674Scael.Sh SYNOPSIS
15*47674Scael.Cd "device ad0 at uba0 csr 0170400 vector adintr"
16*47674Scael.Sh DESCRIPTION
17*47674ScaelThe
18*47674Scael.Nm \&ad
19*47674Scaeldriver
20*47674Scaelprovides an interface to the Data Translation A/D converter.
2120706SmckusickThis is
22*47674Scael.Em not
2320706Smckusicka real-time driver, but merely allows
2420706Smckusickthe user process to sample the board's channels one at a time.
25*47674ScaelEach minor device selects a different
26*47674Scael.Tn A/D
27*47674Scaelboard.
28*47674Scael.Pp
29*47674ScaelThe driver communicates to a user process by means of
30*47674Scael.Xr ioctl 2 Ns s.
31*47674ScaelThe
32*47674Scael.Dv AD_CHAN
33*47674Scael.Xr ioctl
34*47674Scaelselects which channel of the board to read.
3520706SmckusickFor example,
36*47674Scael.Bd -literal -offset indent
3720706Smckusickchan = 5;
3820706Smckusickioctl(fd, AD_CHAN, &chan);
39*47674Scael.Ed
40*47674Scael.Pp
4120706Smckusickselects channel 5.
42*47674ScaelThe
43*47674Scael.Dv AD_READ
44*47674Scael.Xr ioctl 2
45*47674Scaelactually reads the data and returns it to the user
4620706Smckusickprocess.
4720706SmckusickAn example is
48*47674Scael.Bd -literal -offset indent
4920706Smckusickioctl(fd, AD_READ, &data);
50*47674Scael.Ed
51*47674Scael.Sh FILES
52*47674Scael.Bl -tag -width /dev/adx -compact
53*47674Scael.It Pa /dev/ad
54*47674Scael.El
55*47674Scael.Sh DIAGNOSTICS
5620706SmckusickNone.
57*47674Scael.Sh HISTORY
58*47674ScaelThe
59*47674Scael.Nm
60*47674Scaeldriver appeared in
61*47674Scael.Bx 4.1 .
62