<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: PIC Lesson: Interrupt</title>
	<atom:link href="http://shahrulnizam.com/pic-lesson-interrupt/feed/" rel="self" type="application/rss+xml" />
	<link>http://shahrulnizam.com/pic-lesson-interrupt/</link>
	<description></description>
	<lastBuildDate>Sun, 20 May 2012 06:21:33 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: Shahrul</title>
		<link>http://shahrulnizam.com/pic-lesson-interrupt/comment-page-1/#comment-8623</link>
		<dc:creator>Shahrul</dc:creator>
		<pubDate>Tue, 24 Apr 2012 00:55:08 +0000</pubDate>
		<guid isPermaLink="false">http://shahrulnizam.com/?p=1575#comment-8623</guid>
		<description>w/salam, rizuan. Itu kena bayar.</description>
		<content:encoded><![CDATA[<p>w/salam, rizuan. Itu kena bayar.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rizuan</title>
		<link>http://shahrulnizam.com/pic-lesson-interrupt/comment-page-1/#comment-8622</link>
		<dc:creator>rizuan</dc:creator>
		<pubDate>Mon, 23 Apr 2012 16:34:34 +0000</pubDate>
		<guid isPermaLink="false">http://shahrulnizam.com/?p=1575#comment-8622</guid>
		<description>salam..
abg shahrul blh bg idea x mcm mn nk bt intrrupt antara GSM dan GPS
sy nk hntrkn data dari GPS menerusi GSM modem k fon sy</description>
		<content:encoded><![CDATA[<p>salam..<br />
abg shahrul blh bg idea x mcm mn nk bt intrrupt antara GSM dan GPS<br />
sy nk hntrkn data dari GPS menerusi GSM modem k fon sy</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shahrul</title>
		<link>http://shahrulnizam.com/pic-lesson-interrupt/comment-page-1/#comment-7061</link>
		<dc:creator>Shahrul</dc:creator>
		<pubDate>Wed, 07 Dec 2011 16:43:34 +0000</pubDate>
		<guid isPermaLink="false">http://shahrulnizam.com/?p=1575#comment-7061</guid>
		<description>ws, taufiq. Program interrupt jadikan seringkas yg mungkin.</description>
		<content:encoded><![CDATA[<p>ws, taufiq. Program interrupt jadikan seringkas yg mungkin.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: taufiq</title>
		<link>http://shahrulnizam.com/pic-lesson-interrupt/comment-page-1/#comment-7055</link>
		<dc:creator>taufiq</dc:creator>
		<pubDate>Wed, 07 Dec 2011 06:05:25 +0000</pubDate>
		<guid isPermaLink="false">http://shahrulnizam.com/?p=1575#comment-7055</guid>
		<description>salam...sy ade gune ccp1 interrupt utk capture pulse serendah 20 - 160hz...then sy kira freq pulse tersebut n display ke lcd...skrg ni calculation sy buat dlm interrpt..skrg program sy x bleh display ke lcd kerana berlaku stack overflow...sy ade bace measuremnt bleh buat kat backgrd(main) la...tp mcm mane nak trigger dr interrupt tu ke main untuk measurement..ccp1 interrpt flag hanya set bila ia detect rising edge of pulse...jd sy nak mntak cadangan n solution dr pengalaman saudara mengenai masalah ni...</description>
		<content:encoded><![CDATA[<p>salam&#8230;sy ade gune ccp1 interrupt utk capture pulse serendah 20 &#8211; 160hz&#8230;then sy kira freq pulse tersebut n display ke lcd&#8230;skrg ni calculation sy buat dlm interrpt..skrg program sy x bleh display ke lcd kerana berlaku stack overflow&#8230;sy ade bace measuremnt bleh buat kat backgrd(main) la&#8230;tp mcm mane nak trigger dr interrupt tu ke main untuk measurement..ccp1 interrpt flag hanya set bila ia detect rising edge of pulse&#8230;jd sy nak mntak cadangan n solution dr pengalaman saudara mengenai masalah ni&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shahrul</title>
		<link>http://shahrulnizam.com/pic-lesson-interrupt/comment-page-1/#comment-6276</link>
		<dc:creator>Shahrul</dc:creator>
		<pubDate>Sun, 11 Sep 2011 18:51:46 +0000</pubDate>
		<guid isPermaLink="false">http://shahrulnizam.com/?p=1575#comment-6276</guid>
		<description>Interrupt can&#039;t put delay.</description>
		<content:encoded><![CDATA[<p>Interrupt can&#8217;t put delay.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: LKS</title>
		<link>http://shahrulnizam.com/pic-lesson-interrupt/comment-page-1/#comment-6275</link>
		<dc:creator>LKS</dc:creator>
		<pubDate>Sun, 11 Sep 2011 13:07:15 +0000</pubDate>
		<guid isPermaLink="false">http://shahrulnizam.com/?p=1575#comment-6275</guid>
		<description>can interrupt run with delay command ? will delay command causing the problem ?

my coding

#include 
#include &quot;SLCD.h&quot;

char di[10];
int INT[3],a;
void pic_init(void);
void timer_init(void);
void convert(int no, char base);
void display(char number);

static void interrupt isr(void)
{
if(TMR0IF==1)
{
	TMR0IF=0;
	if(INT[0]=0;i--) display(di[i]);
	}
}

void pic_init()
{
TRISB=0x00;
PORTB=0x00;
TRISC=0x00;
PORTC=0x00;
T0CON=0b11000100;			
T1CON=0b00000000;			
T2CON=0b00000000;			
INTCON=0b11100000;			//Enable Global, Periperal, TMR0 Interrupt
PIE1=0b00000011;			//Enable TMR1, TMR2 Interrupt
PIE2=0b00000000;
}

void timer_init(void)
{

PR2=200;
TMR0=0;
TMR1H=0;
TMR1L=0;
TMR2=0;


INTCON=0b11100000;			//Enable Global, Periperal, TMR0 Interrupt
PIE1=0b00000011;			//Enable TMR1, TMR2 Interrupt
PIE2=0b00000000;
}

void convert(int no, char base)
{char i;
for(i=0;i&lt;=9;i++) di[i]=0;
i=0;
do{
	di[i]=no%base;
	no=no/base;
	i=i+1;}
while(no!=0);
}

void display(char number)
{switch(number){
case 0:{slcd_putstr(&quot;0&quot;);break;}
case 1:{slcd_putstr(&quot;1&quot;);break;}
case 2:{slcd_putstr(&quot;2&quot;);break;}
case 3:{slcd_putstr(&quot;3&quot;);break;}
case 4:{slcd_putstr(&quot;4&quot;);break;}
case 5:{slcd_putstr(&quot;5&quot;);break;}
case 6:{slcd_putstr(&quot;6&quot;);break;}
case 7:{slcd_putstr(&quot;7&quot;);break;}
case 8:{slcd_putstr(&quot;8&quot;);break;}
case 9:{slcd_putstr(&quot;9&quot;);break;}
case 10:{slcd_putstr(&quot;A&quot;);break;}
case 11:{slcd_putstr(&quot;B&quot;);break;}
case 12:{slcd_putstr(&quot;C&quot;);break;}
case 13:{slcd_putstr(&quot;D&quot;);break;}
case 14:{slcd_putstr(&quot;E&quot;);break;}
case 15:{slcd_putstr(&quot;F&quot;);break;}
default:{slcd_putstr(&quot;?&quot;);break;}
}}</description>
		<content:encoded><![CDATA[<p>can interrupt run with delay command ? will delay command causing the problem ?</p>
<p>my coding</p>
<p>#include<br />
#include &#8220;SLCD.h&#8221;</p>
<p>char di[10];<br />
int INT[3],a;<br />
void pic_init(void);<br />
void timer_init(void);<br />
void convert(int no, char base);<br />
void display(char number);</p>
<p>static void interrupt isr(void)<br />
{<br />
if(TMR0IF==1)<br />
{<br />
	TMR0IF=0;<br />
	if(INT[0]=0;i&#8211;) display(di[i]);<br />
	}<br />
}</p>
<p>void pic_init()<br />
{<br />
TRISB=0&#215;00;<br />
PORTB=0&#215;00;<br />
TRISC=0&#215;00;<br />
PORTC=0&#215;00;<br />
T0CON=0b11000100;<br />
T1CON=0b00000000;<br />
T2CON=0b00000000;<br />
INTCON=0b11100000;			//Enable Global, Periperal, TMR0 Interrupt<br />
PIE1=0b00000011;			//Enable TMR1, TMR2 Interrupt<br />
PIE2=0b00000000;<br />
}</p>
<p>void timer_init(void)<br />
{</p>
<p>PR2=200;<br />
TMR0=0;<br />
TMR1H=0;<br />
TMR1L=0;<br />
TMR2=0;</p>
<p>INTCON=0b11100000;			//Enable Global, Periperal, TMR0 Interrupt<br />
PIE1=0b00000011;			//Enable TMR1, TMR2 Interrupt<br />
PIE2=0b00000000;<br />
}</p>
<p>void convert(int no, char base)<br />
{char i;<br />
for(i=0;i&lt;=9;i++) di[i]=0;<br />
i=0;<br />
do{<br />
	di[i]=no%base;<br />
	no=no/base;<br />
	i=i+1;}<br />
while(no!=0);<br />
}</p>
<p>void display(char number)<br />
{switch(number){<br />
case 0:{slcd_putstr(&quot;0&quot;);break;}<br />
case 1:{slcd_putstr(&quot;1&quot;);break;}<br />
case 2:{slcd_putstr(&quot;2&quot;);break;}<br />
case 3:{slcd_putstr(&quot;3&quot;);break;}<br />
case 4:{slcd_putstr(&quot;4&quot;);break;}<br />
case 5:{slcd_putstr(&quot;5&quot;);break;}<br />
case 6:{slcd_putstr(&quot;6&quot;);break;}<br />
case 7:{slcd_putstr(&quot;7&quot;);break;}<br />
case 8:{slcd_putstr(&quot;8&quot;);break;}<br />
case 9:{slcd_putstr(&quot;9&quot;);break;}<br />
case 10:{slcd_putstr(&quot;A&quot;);break;}<br />
case 11:{slcd_putstr(&quot;B&quot;);break;}<br />
case 12:{slcd_putstr(&quot;C&quot;);break;}<br />
case 13:{slcd_putstr(&quot;D&quot;);break;}<br />
case 14:{slcd_putstr(&quot;E&quot;);break;}<br />
case 15:{slcd_putstr(&quot;F&quot;);break;}<br />
default:{slcd_putstr(&quot;?&quot;);break;}<br />
}}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shahrul</title>
		<link>http://shahrulnizam.com/pic-lesson-interrupt/comment-page-1/#comment-6274</link>
		<dc:creator>Shahrul</dc:creator>
		<pubDate>Sun, 11 Sep 2011 10:34:37 +0000</pubDate>
		<guid isPermaLink="false">http://shahrulnizam.com/?p=1575#comment-6274</guid>
		<description>LKS, make sure interrupt program as short as possible. It will problem when interrupt program is long and it maybe occur another interrupt in the interrupt.</description>
		<content:encoded><![CDATA[<p>LKS, make sure interrupt program as short as possible. It will problem when interrupt program is long and it maybe occur another interrupt in the interrupt.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: LKS</title>
		<link>http://shahrulnizam.com/pic-lesson-interrupt/comment-page-1/#comment-6273</link>
		<dc:creator>LKS</dc:creator>
		<pubDate>Sun, 11 Sep 2011 06:05:30 +0000</pubDate>
		<guid isPermaLink="false">http://shahrulnizam.com/?p=1575#comment-6273</guid>
		<description>I cannot run 3 timers simultaneously, only 1 at a time..otherwise the serial SPI LCD will hang.. Using 18F4550 on 20MHz</description>
		<content:encoded><![CDATA[<p>I cannot run 3 timers simultaneously, only 1 at a time..otherwise the serial SPI LCD will hang.. Using 18F4550 on 20MHz</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shahrul</title>
		<link>http://shahrulnizam.com/pic-lesson-interrupt/comment-page-1/#comment-2153</link>
		<dc:creator>Shahrul</dc:creator>
		<pubDate>Fri, 05 Nov 2010 07:53:06 +0000</pubDate>
		<guid isPermaLink="false">http://shahrulnizam.com/?p=1575#comment-2153</guid>
		<description>ws, x de. Read analog sensor, tgk  &lt;a target=&quot;_blank&quot; href=&quot;http://shahrulnizam.com/pic-lesson-adc-module/&quot;  rel=&quot;nofollow&quot;&gt;ADC Module&lt;/a&gt; dan hantar RF dengan UART tgk &lt;a target=&quot;_blank&quot; href=&quot;http://shahrulnizam.com/pic-lesson-uart-module/&quot; rel=&quot;nofollow&quot;&gt;UART Module&lt;/a&gt;.</description>
		<content:encoded><![CDATA[<p>ws, x de. Read analog sensor, tgk  <a target="_blank" href="http://shahrulnizam.com/pic-lesson-adc-module/"  rel="nofollow">ADC Module</a> dan hantar RF dengan UART tgk <a target="_blank" href="http://shahrulnizam.com/pic-lesson-uart-module/" rel="nofollow">UART Module</a>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: fatimah</title>
		<link>http://shahrulnizam.com/pic-lesson-interrupt/comment-page-1/#comment-2151</link>
		<dc:creator>fatimah</dc:creator>
		<pubDate>Fri, 05 Nov 2010 05:31:31 +0000</pubDate>
		<guid isPermaLink="false">http://shahrulnizam.com/?p=1575#comment-2151</guid>
		<description>salam, nak tanya, ada tak contoh 2 programming untuk projeck mcm ni....

read sensor and transmit through RF module</description>
		<content:encoded><![CDATA[<p>salam, nak tanya, ada tak contoh 2 programming untuk projeck mcm ni&#8230;.</p>
<p>read sensor and transmit through RF module</p>
]]></content:encoded>
	</item>
</channel>
</rss>

