1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<html> 3 4<head> 5<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 6<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 8.0.0.0 for Windows"> 7<META http-equiv="Content-Style-Type" content="text/css"> 8<title>MICSamplingType</title> 9<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css"> 10</head> 11 12<body> 13 14<h1 align="left">MICSamplingType <img src="../../image/NTR.gif"><img src="../../image/TWL.gif"></h1> 15 16<h2>Definition</h2> 17 18<dl> 19 <dd> 20<CODE>#include <nitro/spi.h></CODE><BR> 21 <PRE><CODE>typedef enum 22{ 23 MIC_SAMPLING_TYPE_8BIT = 0 , 24 MIC_SAMPLING_TYPE_12BIT , 25 MIC_SAMPLING_TYPE_SIGNED_8BIT , 26 MIC_SAMPLING_TYPE_SIGNED_12BIT , 27 MIC_SAMPLING_TYPE_12BIT_FILTER_OFF , 28 MIC_SAMPLING_TYPE_SIGNED_12BIT_FILTER_OFF , 29 MIC_SAMPLING_TYPE_MAX 30 31} MICSamplingType;</CODE></PRE> 32 </dd> 33 34</dl><h2>Elements</h2> 35<TABLE border="1" width="100%"> 36 <TBODY> 37 <TR> 38 <TD width="300"><em><strong><font face="Courier New">MIC_SAMPLING_TYPE_8BIT</font></strong></em></TD> 39 <TD width="700">Sampling with a valid bit width of 8 bits (unsigned). 40 The range of output data is 0 to 255. 41 </TD> 42 </TR> 43 <TR> 44 <TD width="300"><em><strong><font face="Courier New">MIC_SAMPLING_TYPE_12BIT</font></strong></em></TD> 45 <TD width="700">Sampling with a valid bit width of 12 bits (unsigned). 46 The range of output data is 0 to 65520. 47 </TD> 48 </TR> 49 <TR> 50 <TD width="300"><em><strong><font face="Courier New">MIC_SAMPLING_TYPE_SIGNED_8BIT</font></strong></em></TD> 51 <TD width="700">Sampling with a valid bit width of 8 bits (signed). 52 The range of output data is -128 to 127. 53 </TD> 54 </TR> 55 <TR> 56 <TD width="300"><em><strong><font face="Courier New">MIC_SAMPLING_TYPE_SIGNED_12BIT</font></strong></em></TD> 57 <TD width="700">Sampling with a valid bit width of 12 bits (signed). 58 The range of output data is -32768 to 32752. 59 </TD> 60 </TR> 61 <TR> 62 <TD width="300"><em><strong><font face="Courier New">MIC_SAMPLING_TYPE_12BIT_FILTER_OFF</font></strong></em></TD> 63 <TD width="700">Sampling with a valid bit width of 12 bits (unsigned) with no filter.<br /> 64 The range of output data is <code>0</code> to <code>65520</code>.<br /> 65 If there was a conflict with another SPI device access and sampling failed, the output data becomes <code>0xffff</code> (<code>65535</code>). 66 </TD> 67 </TR> 68 <TR> 69 <TD width="300"><em><strong><font face="Courier New">MIC_SAMPLING_TYPE_SIGNED_12BIT_FILTER_OFF</font></strong></em></TD> 70 <TD width="700">Sampling with a valid bit width of 12 bits (signed) with no filter.<br /> 71 The range of output data is <code>-32768</code> to <code>32752</code>.<br /> 72 If there was a conflict with another SPI device access and sampling failed, the output data becomes <code>0xffff</code> (<code>-1</code>). 73 </TD> 74 </TR> 75 </TBODY> 76</TABLE> 77 78<H2>Description</H2> 79<P>List of the sampling types. Sampling can be conducted with one of two levels of resolution: 8 bits or 12 bits. Data can be output in the format regardless of whether it is signed or unsigned. With 8-bit sampling, 1 byte of data is obtained each time. With 12-bit sampling, 2 bytes of data are obtained each time (the upper 12 bits are valid, the lower 4 bits are zero-padded).<br />When the input sound exceeds the valid bit width, the output data is clamped to the minimum or the maximum value. The volume that can be covered with the valid bit width can be changed using a <CODE><A href="../pm/PM_SetAmpGain.html">PM_SetAmpGain*</A></CODE> function.<BR>When performing auto-sampling, sampling may fail if there is a conflict with another SPI device (such as touch panel). When this occurs, it is normally filtered by using the sampling data that is immediately before it. However, if <code>*_FILTER_OFF</code> was specified as the sampling type, filtering will not occur and the value that indicates a sampling failure (<code>0xffff</code>) will be output. 80</P> 81 82<h2>See Also</h2> 83<P> 84<CODE><A href="MIC_DoSampling.html">MIC_DoSampling</A>, <A href="MIC_DoSamplingAsync.html">MIC_DoSamplingAsync</A>, <A href="MIC_StartAutoSampling.html">MIC_StartAutoSampling</A>, <A href="MIC_StartAutoSamplingAsync.html">MIC_StartAutoSamplingAsync</A>, <A href="../pm/PM_SetAmpGain.html">PM_SetAmpGain</A>, <A href="MIC_StartLimitedSampling.html">MIC_StartLimitedSampling</A>, <A href="MIC_StartLimitedSamplingAsync.html">MIC_StartLimitedSamplingAsync</A></CODE> 85</P> 86 87<H2>Revision History</H2> 88<P> 892004/12/03 Added a sampling type without a filter<br /> 2004/06/01 Initial version 90</P> 91<hr><p>CONFIDENTIAL</p></body> 92</html> 93