<?xml version="1.0" encoding="utf-8"?>
				<!-- generator="e107" -->
				<!-- content type="Forum / topic" -->
				<rss  version="2.0">
				<channel>
				<title>8051 Microcontroller Projects AVR PIC Projects Tutorials Ebooks Libraries codes : Forum / topic</title>
				<link>http://www.8051projects.net/</link>
				<description>Learn to make simple microcontroller projects, pic, 8051, avr and arm projects. download 8051 projects, tutorials, libraries, sample codes. join the microcontroller discussion forum and ask doubts regarding electronics. the best source for 8051 over internet.</description>

<language>en-gb</language>
				<copyright>2008 Rickey's World</copyright>
				<managingEditor>contact@nospam.com (Ajay Bhargav)</managingEditor>
				<webMaster>contact@nospam.com (Ajay Bhargav)</webMaster>
				<pubDate>Wed, 07 Jan 2009 16:40:52 -0800</pubDate>
				<lastBuildDate>Wed, 07 Jan 2009 16:40:52 -0800</lastBuildDate>
				<docs>http://backend.userland.com/rss</docs>
				<generator>e107 (http://e107.org)</generator>
				<ttl>60</ttl>
				<textInput>
				<title>Search</title>
				<description>Search 8051 Microcontroller Projects AVR PIC Projects Tutorials Ebooks Libraries codes</description>
				<name>query</name>
				<link>http://www.8051projects.net/search.php</link>
				</textInput>
						<item>
						<title>help ARM LPC 2214 LPF IIR filter</title>
<link>http://www.8051projects.net/forum-t9136.html</link>
<description><![CDATA[why my code not operate<br /><div class='code_box'>CODE:</div><div class='code_highlight' style='unicode-bidi: embed; direction: ltr'><div class="c" style="font-family: monospace;"><span style="color: #339933;">#include &quot;LPC22xx.H&quot; &nbsp; &nbsp;// LPC2214 MPU Register</span><br /><span style="color: #339933;">#include &quot;stdio.h&quot;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // For Used Function printf </span><br /><span style="color: #339933;">#include &quot;math.h&quot;</span><br /><span style="color: #339933;">#include &quot;stdlib.h&quot;</span><br /><span style="color: #808080; font-style: italic;">//------------------------------</span><br /><span style="color: #808080; font-style: italic;">// Macros for Interrupt Nesting</span><br /><span style="color: #339933;">#define IENABLE &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;/* Nested Interrupts Entry */ &nbsp; \</span><br />&nbsp; __asm <span style="color: #66cc66;">&#123;</span> MRS &nbsp; &nbsp; LR, SPSR &nbsp; &nbsp; &nbsp;<span style="color: #66cc66;">&#125;</span> &nbsp; &nbsp;<span style="color: #808080; font-style: italic;">/* Copy SPSR_irq to LR &nbsp; &nbsp; */</span> &nbsp; \<br />&nbsp; __asm <span style="color: #66cc66;">&#123;</span> STMFD &nbsp; SP!, <span style="color: #66cc66;">&#123;</span>LR<span style="color: #66cc66;">&#125;</span> &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span> &nbsp; &nbsp;<span style="color: #808080; font-style: italic;">/* Save SPSR_irq &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; */</span> &nbsp; \<br />&nbsp; __asm <span style="color: #66cc66;">&#123;</span> MSR &nbsp; &nbsp; CPSR_c, <span style="color: #339933;">#0x1F } &nbsp; &nbsp;/* Enable IRQ (Sys Mode) &nbsp; */ &nbsp; \</span><br />&nbsp; __asm <span style="color: #66cc66;">&#123;</span> STMFD &nbsp; SP!, <span style="color: #66cc66;">&#123;</span>LR<span style="color: #66cc66;">&#125;</span> &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span> &nbsp; &nbsp;<span style="color: #808080; font-style: italic;">/* Save LR &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; */</span> &nbsp; \<br /><br /><span style="color: #339933;">#define IDISABLE &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;/* Nested Interrupts Exit */ &nbsp; \</span><br />&nbsp; __asm <span style="color: #66cc66;">&#123;</span> LDMFD &nbsp; SP!, <span style="color: #66cc66;">&#123;</span>LR<span style="color: #66cc66;">&#125;</span> &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span> &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">/* Restore LR &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;*/</span> &nbsp; \<br />&nbsp; __asm <span style="color: #66cc66;">&#123;</span> MSR &nbsp; &nbsp; CPSR_c, <span style="color: #339933;">#0x92 } &nbsp; &nbsp; /* Disable IRQ (IRQ Mode) &nbsp;*/ &nbsp; \</span><br />&nbsp; __asm <span style="color: #66cc66;">&#123;</span> LDMFD &nbsp; SP!, <span style="color: #66cc66;">&#123;</span>LR<span style="color: #66cc66;">&#125;</span> &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span> &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">/* Restore SPSR_irq to LR &nbsp;*/</span> &nbsp; \<br />&nbsp; __asm <span style="color: #66cc66;">&#123;</span> MSR &nbsp; &nbsp; SPSR_cxsf, LR <span style="color: #66cc66;">&#125;</span> &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">/* Copy LR to SPSR_irq &nbsp; &nbsp; */</span> &nbsp; \<br /><br /><br /><span style="color: #808080; font-style: italic;">//----------------------------------------</span><br /><br /><span style="color: #000000; font-weight: bold;">extern</span> <span style="color: #993333;">void</span> init_serial0 <span style="color: #66cc66;">&#40;</span><span style="color: #993333;">void</span><span style="color: #66cc66;">&#41;</span>;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// Used Initial UART0 From &quot;Serial0.c&quot;</span><br /><span style="color: #808080; font-style: italic;">//CCLK=12xM=12x5=60MHZ</span><br /><span style="color: #808080; font-style: italic;">//PCLK=CCLK (VPBDIV=0x00)</span><br /><br /><span style="color: #993333;">void</span> IRQ_Match0_timer0<span style="color: #66cc66;">&#40;</span><span style="color: #993333;">void</span><span style="color: #66cc66;">&#41;</span>__irq;<span style="color: #808080; font-style: italic;">//ngat Timer0</span><br /><span style="color: #993333;">void</span> IRQ_Capture_timer1<span style="color: #66cc66;">&#40;</span><span style="color: #993333;">void</span><span style="color: #66cc66;">&#41;</span>__irq;<span style="color: #808080; font-style: italic;">//ngat for CAP pin 1.1 11</span><br /><br /><span style="color: #808080; font-style: italic;">//*************************************************************</span><br /><span style="color: #808080; font-style: italic;">//declare for Filter fs=1kHz,fc=40Hz,butterWorth low pass order=4</span><br /><br /><span style="color: #993333;">const</span> &nbsp;<span style="color: #993333;">float</span> Numerator<span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span>=<span style="color: #66cc66;">&#123;</span><span style="color: #cc66cc;">1</span>,<span style="color: #cc66cc;">1</span>,<span style="color: #cc66cc;">1</span>,<span style="color: #cc66cc;">1</span>,<span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#125;</span>;<br /><span style="color: #993333;">const</span> &nbsp;<span style="color: #993333;">float</span> Denominator<span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span>=<span style="color: #66cc66;">&#123;</span><span style="color: #cc66cc;">1</span>,<span style="color: #cc66cc;">-3</span>,<span style="color: #cc66cc;">4</span>,<span style="color: #cc66cc;">-2</span>,<span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#125;</span>;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br /><span style="color: #808080; font-style: italic;">//*************************************************************</span><br /><br /><span style="color: #993333;">void</span> Low_pass_filter<span style="color: #66cc66;">&#40;</span><span style="color: #993333;">float</span> *NUM,<span style="color: #993333;">float</span> *DEN,<span style="color: #993333;">float</span> *W,<span style="color: #993333;">float</span> data_update<span style="color: #66cc66;">&#41;</span>;<br /><span style="color: #808080; font-style: italic;">//===========</span><br /><span style="color: #808080; font-style: italic;">//flag for define filter for which chanel data changing</span><br /><span style="color: #993333;">unsigned</span> <span style="color: #993333;">char</span> flag_filter_1=<span style="color: #cc66cc;">1</span>;<span style="color: #808080; font-style: italic;">//cho kenh ADXL1</span><br /><span style="color: #993333;">unsigned</span> <span style="color: #993333;">char</span> flag_filter_2=<span style="color: #cc66cc;">1</span>;<span style="color: #808080; font-style: italic;">//cho kenh ADXL2</span><br /><br /><span style="color: #808080; font-style: italic;">//=================</span><br /><span style="color: #808080; font-style: italic;">//read ADC</span><br /><span style="color: #993333;">unsigned</span> <span style="color: #993333;">long</span> <span style="color: #993333;">int</span> read_adc<span style="color: #66cc66;">&#40;</span><span style="color: #993333;">unsigned</span> <span style="color: #993333;">int</span> num_adc<span style="color: #66cc66;">&#41;</span>;<br /><span style="color: #993333;">void</span> outs<span style="color: #66cc66;">&#40;</span><span style="color: #993333;">unsigned</span> <span style="color: #993333;">int</span> datlong,<span style="color: #993333;">float</span> *p<span style="color: #66cc66;">&#41;</span>;<br /><span style="color: #993333;">void</span> delay<span style="color: #66cc66;">&#40;</span><span style="color: #993333;">unsigned</span> <span style="color: #993333;">long</span> <span style="color: #993333;">int</span><span style="color: #66cc66;">&#41;</span>;&nbsp; <span style="color: #808080; font-style: italic;">// Delay Time Function</span><br /><span style="color: #993333;">float</span> voltx;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// ADC Result Volt</span><br /><span style="color: #993333;">float</span> volty;<br /><span style="color: #993333;">float</span> ax,ay,a,unit_x,unit_y;<br /><span style="color: #993333;">unsigned</span> <span style="color: #993333;">int</span> offsetx,offsety;<br /><span style="color: #993333;">float</span> vectx<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">1000</span><span style="color: #66cc66;">&#93;</span>=<span style="color: #66cc66;">&#123;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#125;</span>;<br /><span style="color: #993333;">float</span> vecty<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">1000</span><span style="color: #66cc66;">&#93;</span>=<span style="color: #66cc66;">&#123;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#125;</span>;<br /><span style="color: #993333;">float</span> samplex1<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">5</span><span style="color: #66cc66;">&#93;</span>=<span style="color: #66cc66;">&#123;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#125;</span>;<br /><span style="color: #993333;">float</span> sampley1<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">5</span><span style="color: #66cc66;">&#93;</span>=<span style="color: #66cc66;">&#123;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#125;</span>;<br /><span style="color: #808080; font-style: italic;">//for ADXL 2</span><br /><span style="color: #993333;">unsigned</span> <span style="color: #993333;">char</span> flag,chanel;<br /><span style="color: #993333;">float</span> asisx<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">20</span><span style="color: #66cc66;">&#93;</span>=<span style="color: #66cc66;">&#123;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#125;</span>;<br /><span style="color: #993333;">float</span> asisy<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">20</span><span style="color: #66cc66;">&#93;</span>=<span style="color: #66cc66;">&#123;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#125;</span>;<br /><span style="color: #993333;">unsigned</span> <span style="color: #993333;">long</span> tempx,tempy;<br /><span style="color: #993333;">unsigned</span> countx,county;<br /><span style="color: #808080; font-style: italic;">//======================</span><br /><span style="color: #993333;">unsigned</span> <span style="color: #993333;">char</span> count;<br /><span style="color: #993333;">unsigned</span> <span style="color: #993333;">int</span> dat_count,somau;<br /><span style="color: #993333;">unsigned</span> <span style="color: #993333;">int</span> value;<br /><span style="color: #993333;">float</span> temp;<br /><span style="color: #808080; font-style: italic;">//======ham chinh==========</span><br /><span style="color: #808080; font-style: italic;">//ADXL header VCC &nbsp;ST x y gnd</span><br /><span style="color: #993333;">int</span> main<span style="color: #66cc66;">&#40;</span><span style="color: #993333;">void</span><span style="color: #66cc66;">&#41;</span><br /><span style="color: #66cc66;">&#123;</span><br /><br /><span style="color: #993333;">unsigned</span> <span style="color: #993333;">char</span> dem =<span style="color: #cc66cc;">20</span>;<br /><br />init_serial0<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;&nbsp;<br /><span style="color: #808080; font-style: italic;">// Initial UART0 = 9600,N,8,1</span><br /><span style="color: #808080; font-style: italic;">//int timer0</span><br />T0TCR=0x3;<span style="color: #808080; font-style: italic;">//TC and PR count enable</span><br />T0PR=<span style="color: #cc66cc;">59</span>;<span style="color: #808080; font-style: italic;">//tan so dem cua TC = PCLK/(PR+1)=1MHz-&gt; 1us tang 1 don vi</span><br />T0MCR=0x3;<span style="color: #808080; font-style: italic;">//interrupt match0 enable and TC reset when match , va giu TC ko dem cho toi khi bit 1 bang 0</span><br />T0MR0=<span style="color: #cc66cc;">1000</span>;<span style="color: #808080; font-style: italic;">//1ms for TC reaches to T0MR0 and occur match0</span><br /><span style="color: #808080; font-style: italic;">//int timer1&nbsp; &nbsp; for Capture pin</span><br />T1TCR=0x3;<span style="color: #808080; font-style: italic;">//TC and PR count enable</span><br />T1PR=<span style="color: #cc66cc;">59</span>;<span style="color: #808080; font-style: italic;">//tan so dem cua TC = PCLK/(PR+1)=1MHz-&gt; 1us tang 1 don vi</span><br />T1TCR=0x1;<span style="color: #808080; font-style: italic;">//cho phep TC dem</span><br /><span style="color: #808080; font-style: italic;">//T1CCR=0x0000002D;//interrup capture 1.0 1.1&nbsp; &nbsp;when rising edge</span><br />T1CCR=0x00000005;<span style="color: #808080; font-style: italic;">//&nbsp; &nbsp; &nbsp;interrup capture 1.0 when rising edge</span><br /><span style="color: #808080; font-style: italic;">//int flag</span><br />flag=<span style="color: #cc66cc;">0</span>;<br />chanel=<span style="color: #cc66cc;">0</span>;<br /><span style="color: #808080; font-style: italic;">//interrupt</span><br /><span style="color: #808080; font-style: italic;">//-----------</span><br />VICVectCntl0=0x24;<span style="color: #808080; font-style: italic;">//choose Source Int Timer0=4, and enable IRQ slot</span><br />VICVectAddr0=<span style="color: #66cc66;">&#40;</span><span style="color: #993333;">unsigned</span><span style="color: #66cc66;">&#41;</span>&nbsp;IRQ_Match0_timer0;<br />VICIntEnable|=<span style="color: #cc66cc;">1</span>&lt;&lt;<span style="color: #cc66cc;">4</span>;<span style="color: #808080; font-style: italic;">//enable Timer0 interrupt source</span><br /><span style="color: #808080; font-style: italic;">//-----------</span><br />VICVectCntl1=0x25;<span style="color: #808080; font-style: italic;">//choose Source Int Timer1=5, and enable IRQ slot</span><br />VICVectAddr1=<span style="color: #66cc66;">&#40;</span><span style="color: #993333;">unsigned</span><span style="color: #66cc66;">&#41;</span>&nbsp;IRQ_Capture_timer1;<br />VICIntEnable|=<span style="color: #cc66cc;">1</span>&lt;&lt;<span style="color: #cc66cc;">5</span>;<span style="color: #808080; font-style: italic;">//enable Timer1 interrupt source</span><br /><br />&nbsp; <span style="color: #808080; font-style: italic;">//chon adc.2 = P0.10 va adc.3=P0.12 &nbsp;</span><br />&nbsp; <span style="color: #808080; font-style: italic;">//p0.12= Ax gia toc theo truc x</span><br />&nbsp; <span style="color: #808080; font-style: italic;">//P0.10=Ay gia toc theo truc y&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><br />&nbsp; <span style="color: #808080; font-style: italic;">//truc X : unit_x=0.669Volt--------&gt;1g : Range: 0.8 &nbsp; &nbsp; &nbsp;1.470 &nbsp; &nbsp; &nbsp; 2.14 Volt</span><br />&nbsp; <span style="color: #808080; font-style: italic;">//truc Y : unit_y=0.569Volt--------&gt;1g : Range: 0.822 &nbsp; &nbsp;1.391 &nbsp; &nbsp; &nbsp; 1.96 Volt</span><br /><br />&nbsp;<br /><br /><span style="color: #808080; font-style: italic;">//int starting VIA</span><br />PINSEL1|=0x15400000; <span style="color: #808080; font-style: italic;">//cho phep 8 kenh ADC</span><br />PINSEL0|=0x00A00005;<span style="color: #808080; font-style: italic;">//capture 1.0 and 1.1 pin for timer1</span><br />offsetx=<span style="color: #cc66cc;">456</span>;<span style="color: #808080; font-style: italic;">//ung voi 1.47 volt*1024/3.3</span><br />offsety=<span style="color: #cc66cc;">431</span>;<span style="color: #808080; font-style: italic;">//ung voi 1.391 volt*1024/3.3</span><br />unit_x=<span style="color: #cc66cc;">0.669</span>;<br />unit_y=<span style="color: #cc66cc;">0.569</span>;<br /><span style="color: #808080; font-style: italic;">//count=100;</span><br />somau=<span style="color: #cc66cc;">0</span>;<br />dat_count=<span style="color: #cc66cc;">0</span>;<br />T0TCR=0x1;<span style="color: #808080; font-style: italic;">//cho phep TC dem</span><br /><br /><span style="color: #b1b100;">while</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span> &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//thuc hien ham loc&nbsp; &nbsp; &nbsp;real time</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// for ADXL1</span><br />&nbsp; &nbsp; &nbsp; &nbsp; Low_pass_filter<span style="color: #66cc66;">&#40;</span>Numerator,Denominator,samplex1,voltx<span style="color: #66cc66;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; vectx<span style="color: #66cc66;">&#91;</span>somau<span style="color: #66cc66;">&#93;</span>=temp;<br />&nbsp; &nbsp; &nbsp; &nbsp; Low_pass_filter<span style="color: #66cc66;">&#40;</span>Numerator,Denominator,sampley1,volty<span style="color: #66cc66;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; vecty<span style="color: #66cc66;">&#91;</span>somau<span style="color: #66cc66;">&#93;</span>=temp;<br /><span style="color: #66cc66;">&#125;</span><br />&nbsp; &nbsp;<br />&nbsp;<br /><span style="color: #66cc66;">&#125;</span><br /><span style="color: #808080; font-style: italic;">//=====================end main=======================</span><br /><span style="color: #808080; font-style: italic;">//==============interupt function=============</span><br />&nbsp;<span style="color: #993333;">void</span> IRQ_Match0_timer0<span style="color: #66cc66;">&#40;</span><span style="color: #993333;">void</span><span style="color: #66cc66;">&#41;</span>__irq<br /><span style="color: #66cc66;">&#123;</span>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; T0IR=<span style="color: #cc66cc;">1</span>;&nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//xoa co ngat MR0 de cho match0 tiep theo xay ra</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; voltx=<span style="color: #66cc66;">&#40;</span><span style="color: #993333;">float</span><span style="color: #66cc66;">&#41;</span>read_adc<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">3</span><span style="color: #66cc66;">&#41;</span>;&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #808080; font-style: italic;">//gia toc theo truc x</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; volty=<span style="color: #66cc66;">&#40;</span><span style="color: #993333;">float</span><span style="color: #66cc66;">&#41;</span>read_adc<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#41;</span>;&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #808080; font-style: italic;">//gia toc theo truc y</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//&nbsp; &nbsp; &nbsp; ax=(voltx-offsetx)*3.300/unit_x/1024.000-0.1 ; //(hieu chinh 0.1);</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//&nbsp; &nbsp; ay=(volty-offsety)*3.300/unit_y/1024.000 -0.1;//hieu chinh 0.1</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dat_count++;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; somau++;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span>somau&gt;<span style="color: #cc66cc;">20</span><span style="color: #66cc66;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; IENABLE; // allow nested interrupts</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; somau=<span style="color: #cc66cc;">0</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.opengroup.org/onlinepubs/009695399/functions/printf.html"><span style="color: #000066;">printf</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span> vecto theo truc x<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #66cc66;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; outs<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">20</span>,vectx<span style="color: #66cc66;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.opengroup.org/onlinepubs/009695399/functions/printf.html"><span style="color: #000066;">printf</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span> vecto theo truc y<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #66cc66;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; outs<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">20</span>,vecty<span style="color: #66cc66;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.opengroup.org/onlinepubs/009695399/functions/printf.html"><span style="color: #000066;">printf</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;already&quot;</span><span style="color: #66cc66;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; IDISABLE;<span style="color: #808080; font-style: italic;">// disable interrupt nesting</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; VICVectAddr = 0x00000000;&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #808080; font-style: italic;">// Reset Global Interrupt and return</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br /><span style="color: #66cc66;">&#125;</span><br /><span style="color: #808080; font-style: italic;">//==========Capture Interupt=========</span><br /><span style="color: #993333;">void</span> IRQ_Capture_timer1<span style="color: #66cc66;">&#40;</span><span style="color: #993333;">void</span><span style="color: #66cc66;">&#41;</span>__irq<br /><span style="color: #66cc66;">&#123;</span><br />flag=~flag;<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span>flag!=<span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span><span style="color: #808080; font-style: italic;">//rising edge</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span>chanel==<span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;tempx=T1CR0;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;T1CCR= 0x00000006;<span style="color: #808080; font-style: italic;">//enable falling edge interupt,and disable rising edge on chanel0(cap1.0)&nbsp; &nbsp; </span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;T1IR|=<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span>&lt;&lt;<span style="color: #cc66cc;">4</span><span style="color: #66cc66;">&#41;</span>;<span style="color: #808080; font-style: italic;">//reset Interupt cap1.0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;tempy=T1CR1;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;T1CCR= 0x00000030;<span style="color: #808080; font-style: italic;">//enable falling edge interupt,and disable rising edge on chanel1(cap1.1)&nbsp; &nbsp; </span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;T1IR|=<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span>&lt;&lt;<span style="color: #cc66cc;">5</span><span style="color: #66cc66;">&#41;</span>;<span style="color: #808080; font-style: italic;">//reset Interupt cap1.1</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #66cc66;">&#125;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">else</span> &nbsp;<span style="color: #808080; font-style: italic;">//falling edge</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span>chanel==<span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;chanel=<span style="color: #cc66cc;">1</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;asisx<span style="color: #66cc66;">&#91;</span>countx++<span style="color: #66cc66;">&#93;</span>=<span style="color: #66cc66;">&#40;</span>T1CR0&gt;tempx<span style="color: #66cc66;">&#41;</span>?<span style="color: #66cc66;">&#40;</span>T1CR0-tempx<span style="color: #66cc66;">&#41;</span>:<span style="color: #66cc66;">&#40;</span>0xFFFFFFFF-tempx+T1CR0<span style="color: #cc66cc;">+1</span><span style="color: #66cc66;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;T1CCR= 0x00000028;<span style="color: #808080; font-style: italic;">//enable rising edge interupt,and disable rising edge on chanel1(cap1.1)&nbsp; &nbsp; &nbsp;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;T1IR|=<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span>&lt;&lt;<span style="color: #cc66cc;">4</span><span style="color: #66cc66;">&#41;</span>;<span style="color: #808080; font-style: italic;">//reset Interupt cap1.0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;chanel=<span style="color: #cc66cc;">0</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;asisy<span style="color: #66cc66;">&#91;</span>county++<span style="color: #66cc66;">&#93;</span>=<span style="color: #66cc66;">&#40;</span>T1CR1&gt;tempy<span style="color: #66cc66;">&#41;</span>?<span style="color: #66cc66;">&#40;</span>T1CR1-tempx<span style="color: #66cc66;">&#41;</span>:<span style="color: #66cc66;">&#40;</span>0xFFFFFFFF-tempy+T1CR1<span style="color: #cc66cc;">+1</span><span style="color: #66cc66;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;T1CCR= 0x00000005;<span style="color: #808080; font-style: italic;">//enable rising edge interupt,and disable rising edge on chanel0(cap1.0)&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; </span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;T1IR|=<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span>&lt;&lt;<span style="color: #cc66cc;">5</span><span style="color: #66cc66;">&#41;</span>;<span style="color: #808080; font-style: italic;">//reset Interupt cap1.1</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />VICVectAddr = 0x00000000;&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #808080; font-style: italic;">// Reset Global Interrupt and return</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp;<br /><span style="color: #66cc66;">&#125;</span><br /><span style="color: #808080; font-style: italic;">//==============end interrupt===========</span><br /><span style="color: #808080; font-style: italic;">//read adc</span><br /><span style="color: #993333;">unsigned</span> <span style="color: #993333;">long</span> <span style="color: #993333;">int</span> read_adc<span style="color: #66cc66;">&#40;</span><span style="color: #993333;">unsigned</span> <span style="color: #993333;">int</span> num_adc<span style="color: #66cc66;">&#41;</span><br /><span style="color: #66cc66;">&#123;</span>&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #808080; font-style: italic;">//ADC Clock = VBP(PCLK) / 7</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//Busrt = 1 = Conversion Continue</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//CLKS = 000 = 10Bit : 11 Cycle Clock Conversion </span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//PDN = 1 = Active ADC Module</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//EDGE = 0 = Conversion on Falling Edge </span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//START = 001 = Start Conversion Now</span><br /><span style="color: #993333;">unsigned</span> <span style="color: #993333;">int</span> val;<br /><span style="color: #993333;">unsigned</span> <span style="color: #993333;">long</span> <span style="color: #993333;">int</span> temp;<br />&nbsp; ADCR &nbsp;= 0x00210D00 |<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span>&lt;&lt;num_adc<span style="color: #66cc66;">&#41;</span>;<br />&nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ADCR &nbsp;|= 0x01000000; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//Bat dau chuyen doi</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">do</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; val=&nbsp; ADDR;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span> &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">while</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>val &amp; 0x80000000<span style="color: #66cc66;">&#41;</span> == <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span>;&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// Wait ADC Conversion Complete and clear DONE bit&nbsp; &nbsp; &nbsp; </span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; val = <span style="color: #66cc66;">&#40;</span>val &gt;&gt; <span style="color: #cc66cc;">6</span><span style="color: #66cc66;">&#41;</span> &amp; 0x03FF;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; temp=val;<br />&nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//temp=temp*3.3/1023/100.0;</span><br /><span style="color: #b1b100;">return</span> <span style="color: #66cc66;">&#40;</span>temp<span style="color: #66cc66;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp;<span style="color: #66cc66;">&#125;</span><br /><br /><span style="color: #808080; font-style: italic;">//========end function=================</span><br /><span style="color: #993333;">void</span> delay<span style="color: #66cc66;">&#40;</span><span style="color: #993333;">unsigned</span> <span style="color: #993333;">long</span> <span style="color: #993333;">int</span> count1<span style="color: #66cc66;">&#41;</span><br /><span style="color: #66cc66;">&#123;</span><br />&nbsp; <span style="color: #b1b100;">while</span><span style="color: #66cc66;">&#40;</span>count1 &gt; <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>count1--;<span style="color: #66cc66;">&#125;</span>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// Loop Decrease Counter&nbsp; &nbsp; &nbsp; &nbsp; </span><br /><span style="color: #66cc66;">&#125;</span><br /><span style="color: #808080; font-style: italic;">//xuat port</span><br /><span style="color: #993333;">void</span> outs<span style="color: #66cc66;">&#40;</span><span style="color: #993333;">unsigned</span> <span style="color: #993333;">int</span> datlong, <span style="color: #993333;">float</span> *p<span style="color: #66cc66;">&#41;</span><br /><span style="color: #66cc66;">&#123;</span><br /><span style="color: #993333;">unsigned</span> <span style="color: #993333;">int</span> t;<br /><span style="color: #993333;">float</span> d;<br /><span style="color: #993333;">unsigned</span> <span style="color: #993333;">char</span> k;<br />k=<span style="color: #cc66cc;">1</span>;<br /><span style="color: #b1b100;">for</span><span style="color: #66cc66;">&#40;</span>t=<span style="color: #cc66cc;">0</span>;t&lt;datlong<span style="color: #cc66cc;">-1</span>;t++<span style="color: #66cc66;">&#41;</span><br /><span style="color: #66cc66;">&#123;</span><br /><br />p++;<br />d=<span style="color: #66cc66;">&#40;</span>*p-offsetx<span style="color: #66cc66;">&#41;</span>*<span style="color: #cc66cc;">3.300</span>/unit_x/<span style="color: #cc66cc;">1024.000</span>/<span style="color: #cc66cc;">1.017</span>;<br /><a href="http://www.opengroup.org/onlinepubs/009695399/functions/printf.html"><span style="color: #000066;">printf</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;%1.3f;&quot;</span>,d<span style="color: #66cc66;">&#41;</span>;<br /><span style="color: #66cc66;">&#125;</span><br /><span style="color: #66cc66;">&#125;</span><br /><span style="color: #808080; font-style: italic;">//IIR filter designed by matlab&nbsp;order =4</span><br /><span style="color: #808080; font-style: italic;">//thoi gian thuc hien 5-&gt;8us cho/1mau</span><br /><span style="color: #993333;">void</span> Low_pass_filter<span style="color: #66cc66;">&#40;</span><span style="color: #993333;">float</span> *NUM,<span style="color: #993333;">float</span> *DEN,<span style="color: #993333;">float</span> *W,<span style="color: #993333;">float</span> data_update<span style="color: #66cc66;">&#41;</span><br /><span style="color: #66cc66;">&#123;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #993333;">unsigned</span> <span style="color: #993333;">char</span> i;<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">for</span><span style="color: #66cc66;">&#40;</span>i=<span style="color: #cc66cc;">4</span>;i&gt;<span style="color: #cc66cc;">0</span>;i--<span style="color: #66cc66;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; *<span style="color: #66cc66;">&#40;</span>W+i<span style="color: #66cc66;">&#41;</span>=*<span style="color: #66cc66;">&#40;</span>W+i<span style="color: #cc66cc;">-1</span><span style="color: #66cc66;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; *W=data_update-DEN<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#93;</span>*W<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#93;</span>-DEN<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#93;</span>*W<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#93;</span>-DEN<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">3</span><span style="color: #66cc66;">&#93;</span>*W<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">3</span><span style="color: #66cc66;">&#93;</span>-DEN<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">4</span><span style="color: #66cc66;">&#93;</span>*W<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">4</span><span style="color: #66cc66;">&#93;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; temp=NUM<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span>*W<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span>+NUM<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#93;</span>*W<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#93;</span>+NUM<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#93;</span>*W<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#93;</span>+NUM<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">3</span><span style="color: #66cc66;">&#93;</span>*W<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">3</span><span style="color: #66cc66;">&#93;</span>+NUM<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">4</span><span style="color: #66cc66;">&#93;</span>*W<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">4</span><span style="color: #66cc66;">&#93;</span>;<br /><br /><span style="color: #66cc66;">&#125;</span></div></div>]]></description>
<pubDate>Tue, 29 Apr 2008 19:20:26 -0700</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t9136.html</guid>
</item>
						<item>
						<title>Re: help ARM LPC 2214 LPF IIR filter</title>
<link>http://www.8051projects.net/forum-t9136.html</link>
<description><![CDATA[where is the problem??<br /><br />compilation or execution?<br /><br />what does the code does???<br /><br /><br />compiler etc.. plz.. elaborate for quick reply<br />]]></description>
<author>contact@nospam.com (Ajay Bhargav)</author>
<pubDate>Wed, 30 Apr 2008 00:19:09 -0700</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t9136.html</guid>
</item>
				</channel>
				</rss>