<?xml version='1.0' encoding='UTF-8'?><!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.docbook.org/xml/4.4/docbookx.dtd"><article><articleinfo><title>PWMDAC</title><revhistory><revision><revnumber>24</revnumber><date>2013-01-15 05:27:27</date><authorinitials>guest</authorinitials></revision><revision><revnumber>23</revnumber><date>2013-01-15 05:22:19</date><authorinitials>guest</authorinitials></revision><revision><revnumber>22</revnumber><date>2013-01-09 07:15:57</date><authorinitials>guest</authorinitials></revision><revision><revnumber>21</revnumber><date>2013-01-09 07:15:18</date><authorinitials>guest</authorinitials></revision><revision><revnumber>20</revnumber><date>2013-01-09 07:15:02</date><authorinitials>guest</authorinitials></revision><revision><revnumber>19</revnumber><date>2013-01-09 07:14:20</date><authorinitials>guest</authorinitials></revision><revision><revnumber>18</revnumber><date>2013-01-09 07:11:50</date><authorinitials>guest</authorinitials></revision><revision><revnumber>17</revnumber><date>2013-01-09 07:11:09</date><authorinitials>guest</authorinitials></revision><revision><revnumber>16</revnumber><date>2013-01-09 05:45:42</date><authorinitials>guest</authorinitials></revision><revision><revnumber>15</revnumber><date>2013-01-08 22:47:29</date><authorinitials>guest</authorinitials></revision><revision><revnumber>14</revnumber><date>2013-01-08 22:27:18</date><authorinitials>guest</authorinitials></revision><revision><revnumber>13</revnumber><date>2013-01-08 22:25:51</date><authorinitials>guest</authorinitials></revision><revision><revnumber>12</revnumber><date>2013-01-08 22:19:57</date><authorinitials>guest</authorinitials></revision><revision><revnumber>11</revnumber><date>2013-01-08 22:18:06</date><authorinitials>guest</authorinitials></revision><revision><revnumber>10</revnumber><date>2013-01-08 22:15:21</date><authorinitials>guest</authorinitials></revision><revision><revnumber>9</revnumber><date>2013-01-08 22:11:46</date><authorinitials>guest</authorinitials></revision><revision><revnumber>8</revnumber><date>2013-01-08 22:10:32</date><authorinitials>guest</authorinitials></revision><revision><revnumber>7</revnumber><date>2013-01-08 22:08:58</date><authorinitials>guest</authorinitials></revision><revision><revnumber>6</revnumber><date>2013-01-08 22:00:39</date><authorinitials>guest</authorinitials></revision><revision><revnumber>5</revnumber><date>2013-01-08 21:58:50</date><authorinitials>guest</authorinitials></revision><revision><revnumber>4</revnumber><date>2013-01-08 21:57:40</date><authorinitials>guest</authorinitials></revision><revision><revnumber>3</revnumber><date>2013-01-08 20:37:52</date><authorinitials>guest</authorinitials></revision><revision><revnumber>2</revnumber><date>2013-01-08 20:37:05</date><authorinitials>guest</authorinitials></revision><revision><revnumber>1</revnumber><date>2013-01-08 20:11:39</date><authorinitials>guest</authorinitials></revision></revhistory></articleinfo><section><title>Arduino (ATmega) PWM audio DAC</title><section><title>About PWM on the Arduino (ATmega)</title><para>This page describes all the nitty gritty of getting your Arduino set up to output decent audio on its PWM via Timer1.  For more in-depth information on what the settings mean, and what values are right for your application, please check out our <ulink url='http://www.openmusiclabs.com/learning/digital/pwm-dac/'>PWM Tutorial</ulink> on the main site. </para><para>Timer1 outputs its data on pins 9 and 10 on the Arduino (pin 9/10 are OC1A/B and PORTB1/2 on the ATmega328p).  For all of the following, it will be assumed that pin 9 is used for Single PWM, and is the high byte for Dual PWM.  Pin 10 is not used for Single PWM, and is the low byte for Dual PWM.  You can also set up for Dual PWM, and output 2 different signals, one on each output. </para><para>Other timers can be similarly setup to run PWM, but we use Timer1 because it is a 16 bit timer, so it can do greater bit depth at lower frequencies (if desired).  The register settings for other timers is similar, but check the <ulink url='http://www.atmel.com/Images/doc8161.pdf'>ATmega328p datasheet</ulink> to be make sure its all correct.  Also, be careful when using Timer0 on the Arduino, as it is already in use for the delay() and millis() functions, and its overflow interrupt can not be reused. </para></section><section><title>Register settings</title><para>The following charts all assume a microcontroller clock frequency of 16MHz (standard on the Arduino).  If you are using a different oscillator, just multiply the frequencies listed by <emphasis>Fcpu</emphasis>/16MHz, where <emphasis>Fcpu</emphasis> is your oscillator frequency.  For example, if you were running at 8MHz, you would multiply by 1/2, and if you were running at 20MHz, you would multiply by 5/4.  Everything else stays the same. </para><para>There are only 3 values to set in order to configure your PWM. they are: </para><itemizedlist><listitem><para><emphasis role='strong'>PWM_FREQ</emphasis> - This is the frequency value taken from the table below. </para></listitem><listitem><para><emphasis role='strong'>PWM_MODE</emphasis> - Set to 1 for Fast mode, and 0 for Phase Correct mode. </para></listitem><listitem><para><emphasis role='strong'>PWM_QTY</emphasis> - Set to 1 for Single PWM, and 2 for Dual PWM. </para></listitem></itemizedlist><informaltable><tgroup cols='7'><colspec colname='col_0'/><colspec colname='col_1'/><colspec colname='col_2'/><colspec colname='col_3'/><colspec colname='col_4'/><colspec colname='col_5'/><colspec colname='col_6'/><tbody><row rowsep='1'><entry colsep='1' rowsep='1'/><entry align='center' colsep='1' namest='col_1' rowsep='1' nameend='col_3'><para> <emphasis role='strong'>Fast - PWM_MODE 1</emphasis> </para></entry><entry align='center' colsep='1' namest='col_4' rowsep='1' nameend='col_6'><para> <emphasis role='strong'>Phase Correct - PWM_MODE 0</emphasis> </para></entry></row><row rowsep='1'><entry colsep='1' rowsep='1'><para> <emphasis role='strong'> Frequency</emphasis> </para></entry><entry colsep='1' rowsep='1'><para> <emphasis role='strong'>PWM_FREQ</emphasis> </para></entry><entry align='center' colsep='1' namest='col_2' rowsep='1' nameend='col_3'><para> <emphasis role='strong'>Bit Depth</emphasis> </para></entry><entry colsep='1' rowsep='1'><para> <emphasis role='strong'>PWM_FREQ</emphasis> </para></entry><entry align='center' colsep='1' namest='col_5' rowsep='1' nameend='col_6'><para> <emphasis role='strong'>Bit Depth</emphasis> </para></entry></row><row rowsep='1'><entry colsep='1' rowsep='1'><para> <emphasis role='strong'>Fcpu = 16MHz</emphasis> </para></entry><entry colsep='1' rowsep='1'><para> <emphasis role='strong'>Value</emphasis> </para></entry><entry colsep='1' rowsep='1'><para> <emphasis role='strong'>Single</emphasis> </para></entry><entry colsep='1' rowsep='1'><para> <emphasis role='strong'>Dual</emphasis> </para></entry><entry colsep='1' rowsep='1'><para> <emphasis role='strong'>Value</emphasis> </para></entry><entry colsep='1' rowsep='1'><para> <emphasis role='strong'>Single</emphasis> </para></entry><entry colsep='1' rowsep='1'><para> <emphasis role='strong'>Dual</emphasis> </para></entry></row><row rowsep='1'><entry colsep='1' rowsep='1'><para> 250kHz </para></entry><entry colsep='1' rowsep='1'><para> 0x003F </para></entry><entry colsep='1' rowsep='1'><para> 6 bit </para></entry><entry colsep='1' rowsep='1'><para> 12 bit </para></entry><entry colsep='1' rowsep='1'><para> 0x001F </para></entry><entry colsep='1' rowsep='1'><para> 5 bit </para></entry><entry colsep='1' rowsep='1'><para> 10 bit </para></entry></row><row rowsep='1'><entry colsep='1' rowsep='1'><para> 125kHz </para></entry><entry colsep='1' rowsep='1'><para> 0x007F </para></entry><entry colsep='1' rowsep='1'><para> 7 bit </para></entry><entry colsep='1' rowsep='1'><para> 14 bit </para></entry><entry colsep='1' rowsep='1'><para> 0x003F </para></entry><entry colsep='1' rowsep='1'><para> 6 bit </para></entry><entry colsep='1' rowsep='1'><para> 12 bit </para></entry></row><row rowsep='1'><entry colsep='1' rowsep='1'><para> 62.5kHz </para></entry><entry colsep='1' rowsep='1'><para> 0x00FF </para></entry><entry colsep='1' rowsep='1'><para> 8 bit </para></entry><entry colsep='1' rowsep='1'><para> 16 bit </para></entry><entry colsep='1' rowsep='1'><para> 0x007F </para></entry><entry colsep='1' rowsep='1'><para> 7 bit </para></entry><entry colsep='1' rowsep='1'><para> 14 bit </para></entry></row><row rowsep='1'><entry colsep='1' rowsep='1'><para> 31.3kHz </para></entry><entry colsep='1' rowsep='1'><para> 0x01FF </para></entry><entry colsep='1' rowsep='1'><para> 9 bit </para></entry><entry colsep='1' rowsep='1'><para> N/A </para></entry><entry colsep='1' rowsep='1'><para> 0x00FF </para></entry><entry colsep='1' rowsep='1'><para> 8 bit </para></entry><entry colsep='1' rowsep='1'><para> 16 bit </para></entry></row><row rowsep='1'><entry colsep='1' rowsep='1'><para> 15.6kHz </para></entry><entry colsep='1' rowsep='1'><para> 0x03FF </para></entry><entry colsep='1' rowsep='1'><para> 10 bit </para></entry><entry colsep='1' rowsep='1'><para> N/A </para></entry><entry colsep='1' rowsep='1'><para> 0x01FF </para></entry><entry colsep='1' rowsep='1'><para> 9 bit </para></entry><entry colsep='1' rowsep='1'><para> N/A </para></entry></row><row rowsep='1'><entry colsep='1' rowsep='1'><para> 7.81kHz </para></entry><entry colsep='1' rowsep='1'><para> 0x07FF </para></entry><entry colsep='1' rowsep='1'><para> 11 bit </para></entry><entry colsep='1' rowsep='1'><para> N/A </para></entry><entry colsep='1' rowsep='1'><para> 0x03FF </para></entry><entry colsep='1' rowsep='1'><para> 10 bit </para></entry><entry colsep='1' rowsep='1'><para> N/A </para></entry></row><row rowsep='1'><entry colsep='1' rowsep='1'><para> 3.91kHz </para></entry><entry colsep='1' rowsep='1'><para> 0x0FFF </para></entry><entry colsep='1' rowsep='1'><para> 12 bit </para></entry><entry colsep='1' rowsep='1'><para> N/A </para></entry><entry colsep='1' rowsep='1'><para> 0x07FF </para></entry><entry colsep='1' rowsep='1'><para> 11 bit </para></entry><entry colsep='1' rowsep='1'><para> N/A </para></entry></row><row rowsep='1'><entry colsep='1' rowsep='1'><para> 1.95kHz </para></entry><entry colsep='1' rowsep='1'><para> 0x1FFF </para></entry><entry colsep='1' rowsep='1'><para> 13 bit </para></entry><entry colsep='1' rowsep='1'><para> N/A </para></entry><entry colsep='1' rowsep='1'><para> 0x0FFF </para></entry><entry colsep='1' rowsep='1'><para> 12 bit </para></entry><entry colsep='1' rowsep='1'><para> N/A </para></entry></row><row rowsep='1'><entry colsep='1' rowsep='1'><para> 976Hz </para></entry><entry colsep='1' rowsep='1'><para> 0x3FFF </para></entry><entry colsep='1' rowsep='1'><para> 14 bit </para></entry><entry colsep='1' rowsep='1'><para> N/A </para></entry><entry colsep='1' rowsep='1'><para> 0x1FFF </para></entry><entry colsep='1' rowsep='1'><para> 13 bit </para></entry><entry colsep='1' rowsep='1'><para> N/A </para></entry></row><row rowsep='1'><entry colsep='1' rowsep='1'><para> 488Hz </para></entry><entry colsep='1' rowsep='1'><para> 0x7FFF </para></entry><entry colsep='1' rowsep='1'><para> 15 bit </para></entry><entry colsep='1' rowsep='1'><para> N/A </para></entry><entry colsep='1' rowsep='1'><para> 0x3FFF </para></entry><entry colsep='1' rowsep='1'><para> 14 bit </para></entry><entry colsep='1' rowsep='1'><para> N/A </para></entry></row><row rowsep='1'><entry colsep='1' rowsep='1'><para> 244Hz </para></entry><entry colsep='1' rowsep='1'><para> 0xFFFF </para></entry><entry colsep='1' rowsep='1'><para> 16 bit </para></entry><entry colsep='1' rowsep='1'><para> N/A </para></entry><entry colsep='1' rowsep='1'><para> 0x7FFF </para></entry><entry colsep='1' rowsep='1'><para> 15 bit </para></entry><entry colsep='1' rowsep='1'><para> N/A </para></entry></row><row rowsep='1'><entry colsep='1' rowsep='1'><para> 122Hz </para></entry><entry colsep='1' rowsep='1'><para> N/A </para></entry><entry colsep='1' rowsep='1'><para> N/A </para></entry><entry colsep='1' rowsep='1'><para> N/A </para></entry><entry colsep='1' rowsep='1'><para> 0xFFFF </para></entry><entry colsep='1' rowsep='1'><para> 16 bit </para></entry><entry colsep='1' rowsep='1'><para> N/A </para></entry></row></tbody></tgroup></informaltable></section><section><title>Dual PWMs</title><para>Dual PWMs just mix an upper and lower value together, to make one analog value.  This mixing occurs through 2 resistors, one of which is 2^n times the other, where n is the bit depth.  For 2 - 8 bit PWMs (16b), use 1:256, or 3.9k and 1M (as shown below).  For 2 - 7 bit PWMs (14b), use 1:128, or 3.9k and 499k, etc.  The 3.9k is used so that the output resistance of the microcontroller is much less than the total resistance, reducing errors.  And be sure to use 1% resistors for 14b and higher PWMs. </para></section><section><title>Example Arduino Sketch</title><para>This skecth uses the above chart to set the Arduino PWM to 31.25kHz, Dual PWM, Phase Correct, at 16 bit depth.  It takes in audio on ADC0, and plays it out the PWM, so you can hear the sort of quality you can expect from 10 bit data (10 bits is the depth of the ADC).  For ATmega programmers, the Arduino sketch is written in C, and is essentially usable if copied into your programming  interface of choice.  The following low-pass filter and summing circuit should be used, along with a the bias circuit for the ADC. </para><para><inlinemediaobject><imageobject><imagedata fileref='http://wiki.openmusiclabs.com/wiki//wiki/PWMDAC?action=AttachFile&amp;do=get&amp;target=pwm_schem_sm.jpg'/></imageobject><textobject><phrase>pwm_schem_sm.jpg</phrase></textobject></inlinemediaobject> </para><itemizedlist><listitem><para><ulink url='http://wiki.openmusiclabs.com/wiki/PWMDAC/wiki/PWMDAC?action=AttachFile&amp;do=get&amp;target=adc_to_pwm.pde'>ADC to PWM Arduino Sketch</ulink> </para></listitem></itemizedlist><programlisting startinglinenumber='1' language='highlight' linenumbering='numbered' format='linespecific'>
<lineannotation><![CDATA[// adc_to_pwm.pde]]></lineannotation>
<lineannotation></lineannotation><lineannotation><![CDATA[// ADC to PWM converter]]></lineannotation>
<lineannotation></lineannotation><lineannotation><![CDATA[// guest - openmusiclabs.com - 1.9.13]]></lineannotation>
<lineannotation></lineannotation><lineannotation><![CDATA[// options table at http://wiki.openmusiclabs.com/wiki/PWMDAC]]></lineannotation>
<lineannotation></lineannotation><lineannotation><![CDATA[// takes in audio data from the ADC and plays it out on]]></lineannotation>
<lineannotation></lineannotation><lineannotation><![CDATA[// Timer1 PWM.  16b, Phase Correct, 31.25kHz - although ADC is 10b.]]></lineannotation>
<lineannotation></lineannotation>
<![CDATA[#define PWM_FREQ 0x00FF ]]><lineannotation><![CDATA[// pwm frequency - see table]]></lineannotation>
<lineannotation></lineannotation><![CDATA[#define PWM_MODE 0 ]]><lineannotation><![CDATA[// Fast (1) or Phase Correct (0)]]></lineannotation>
<lineannotation></lineannotation><![CDATA[#define PWM_QTY 2 ]]><lineannotation><![CDATA[// number of pwms, either 1 or 2]]></lineannotation>
<lineannotation></lineannotation>
<token><![CDATA[void]]></token><![CDATA[ ]]><methodname><![CDATA[setup]]></methodname><![CDATA[() {]]>
<![CDATA[  ]]><lineannotation><![CDATA[// setup ADC]]></lineannotation>
<lineannotation></lineannotation><![CDATA[  ]]><methodname><![CDATA[ADMUX]]></methodname><![CDATA[ = 0x60; ]]><lineannotation><![CDATA[// left adjust, adc0, internal vcc]]></lineannotation>
<lineannotation></lineannotation><![CDATA[  ]]><methodname><![CDATA[ADCSRA]]></methodname><![CDATA[ = 0xe5; ]]><lineannotation><![CDATA[// turn on adc, ck/32, auto trigger]]></lineannotation>
<lineannotation></lineannotation><![CDATA[  ]]><methodname><![CDATA[ADCSRB]]></methodname><![CDATA[ =0x07; ]]><lineannotation><![CDATA[// t1 capture for trigger]]></lineannotation>
<lineannotation></lineannotation><![CDATA[  ]]><methodname><![CDATA[DIDR0]]></methodname><![CDATA[ = 0x01; ]]><lineannotation><![CDATA[// turn off digital inputs for adc0]]></lineannotation>
<lineannotation></lineannotation><![CDATA[  ]]>
<![CDATA[  ]]><lineannotation><![CDATA[// setup PWM]]></lineannotation>
<lineannotation></lineannotation><![CDATA[  ]]><methodname><![CDATA[TCCR1A]]></methodname><![CDATA[ = (((]]><methodname><![CDATA[PWM_QTY]]></methodname><![CDATA[ - 1) << 5) | 0x80 | (]]><methodname><![CDATA[PWM_MODE]]></methodname><![CDATA[ << 1)); ]]><lineannotation><![CDATA[// ]]></lineannotation>
<lineannotation></lineannotation><![CDATA[  ]]><methodname><![CDATA[TCCR1B]]></methodname><![CDATA[ = ((]]><methodname><![CDATA[PWM_MODE]]></methodname><![CDATA[ << 3) | 0x11); ]]><lineannotation><![CDATA[// ck/1]]></lineannotation>
<lineannotation></lineannotation><![CDATA[  ]]><methodname><![CDATA[TIMSK1]]></methodname><![CDATA[ = 0x20; ]]><lineannotation><![CDATA[// interrupt on capture interrupt]]></lineannotation>
<lineannotation></lineannotation><![CDATA[  ]]><methodname><![CDATA[ICR1H]]></methodname><![CDATA[ = (]]><methodname><![CDATA[PWM_FREQ]]></methodname><![CDATA[ >> 8);]]>
<![CDATA[  ]]><methodname><![CDATA[ICR1L]]></methodname><![CDATA[ = (]]><methodname><![CDATA[PWM_FREQ]]></methodname><![CDATA[ & 0xff);]]>
<![CDATA[  ]]><methodname><![CDATA[DDRB]]></methodname><![CDATA[ |= ((]]><methodname><![CDATA[PWM_QTY]]></methodname><![CDATA[ << 1) | 0x02); ]]><lineannotation><![CDATA[// turn on outputs]]></lineannotation>
<lineannotation></lineannotation><![CDATA[  ]]>
<![CDATA[  ]]><methodname><![CDATA[sei]]></methodname><![CDATA[(); ]]><lineannotation><![CDATA[// turn on interrupts - not really necessary with arduino]]></lineannotation>
<lineannotation></lineannotation><![CDATA[}]]>

<token><![CDATA[void]]></token><![CDATA[ ]]><methodname><![CDATA[loop]]></methodname><![CDATA[() {]]>
<![CDATA[  ]]><token><![CDATA[while]]></token><![CDATA[(1); ]]><lineannotation><![CDATA[// gets rid of jitter]]></lineannotation>
<lineannotation></lineannotation><![CDATA[}]]>

<methodname><![CDATA[ISR]]></methodname><![CDATA[(]]><methodname><![CDATA[TIMER1_CAPT_vect]]></methodname><![CDATA[) {]]>
<![CDATA[  ]]>
<![CDATA[  ]]><lineannotation><![CDATA[// get ADC data]]></lineannotation>
<lineannotation></lineannotation><![CDATA[  ]]><token><![CDATA[unsigned]]></token><![CDATA[ ]]><token><![CDATA[int]]></token><![CDATA[ ]]><methodname><![CDATA[temp1]]></methodname><![CDATA[ = ]]><methodname><![CDATA[ADCL]]></methodname><![CDATA[; ]]><lineannotation><![CDATA[// you need to fetch the low byte first]]></lineannotation>
<lineannotation></lineannotation><![CDATA[  ]]><token><![CDATA[unsigned]]></token><![CDATA[ ]]><token><![CDATA[int]]></token><![CDATA[ ]]><methodname><![CDATA[temp2]]></methodname><![CDATA[ = ]]><methodname><![CDATA[ADCH]]></methodname><![CDATA[;]]>
<![CDATA[  ]]><lineannotation><![CDATA[// although ADCH and ADCL are 8b numbers, they are represented]]></lineannotation>
<lineannotation></lineannotation><![CDATA[  ]]><lineannotation><![CDATA[// here by unsigned ints, just to demonstrate how you would]]></lineannotation>
<lineannotation></lineannotation><![CDATA[  ]]><lineannotation><![CDATA[// use numbers larger than 8b.  also, be sure you use unsigned]]></lineannotation>
<lineannotation></lineannotation><![CDATA[  ]]><lineannotation><![CDATA[// ints for this operation.  if you have a signed int (a regular]]></lineannotation>
<lineannotation></lineannotation><![CDATA[  ]]><lineannotation><![CDATA[// int), add 0x8000 and cast it to an unsigned int before sending]]></lineannotation>
<lineannotation></lineannotation><![CDATA[  ]]><lineannotation><![CDATA[// it out to OCR1AH or OCR1AL.]]></lineannotation>
<lineannotation></lineannotation><![CDATA[  ]]><lineannotation><![CDATA[// example:]]></lineannotation>
<lineannotation></lineannotation><![CDATA[  ]]><lineannotation><![CDATA[// int temp3 = 87;]]></lineannotation>
<lineannotation></lineannotation><![CDATA[  ]]><lineannotation><![CDATA[// unsigned int temp4 = temp3 + 0x8000;]]></lineannotation>
<lineannotation></lineannotation><![CDATA[  ]]><lineannotation><![CDATA[// OCR1AH = temp4 >> 8;]]></lineannotation>
<lineannotation></lineannotation><![CDATA[  ]]><lineannotation><![CDATA[// OCR1AL = temp4;]]></lineannotation>
<lineannotation></lineannotation><![CDATA[  ]]>
<![CDATA[  ]]><lineannotation><![CDATA[// output high byte on OC1A]]></lineannotation>
<lineannotation></lineannotation><![CDATA[  ]]><methodname><![CDATA[OCR1AH]]></methodname><![CDATA[ = ]]><methodname><![CDATA[temp2]]></methodname><![CDATA[ >> 8; ]]><lineannotation><![CDATA[// takes top 8 bits]]></lineannotation>
<lineannotation></lineannotation><![CDATA[  ]]><methodname><![CDATA[OCR1AL]]></methodname><![CDATA[ = ]]><methodname><![CDATA[temp2]]></methodname><![CDATA[; ]]><lineannotation><![CDATA[// takes bottom 8 bits]]></lineannotation>
<lineannotation></lineannotation><![CDATA[  ]]>
<![CDATA[  ]]><lineannotation><![CDATA[// output low byte on OC1B]]></lineannotation>
<lineannotation></lineannotation><![CDATA[  ]]><methodname><![CDATA[OCR1BH]]></methodname><![CDATA[ = ]]><methodname><![CDATA[temp1]]></methodname><![CDATA[ >> 8;]]>
<![CDATA[  ]]><methodname><![CDATA[OCR1BL]]></methodname><![CDATA[ = ]]><methodname><![CDATA[temp1]]></methodname><![CDATA[;]]>
<![CDATA[}]]>
</programlisting></section></section></article>