Searching \ for 'ISR is never called' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/index.htm?key=isr+never+called
Search entire site for: 'ISR is never called'.

Truncated match.
PICList Thread
'ISR is never called'
2000\03\31@034944 by Saurabh Sinha

picon face
part 0 520 bytes content-type:application/octet-stream;Another problem, with my filter program, the ISR never gets called! Its
supposed to be called every 1/300 s, at which PORTB is to be read.

[I have used a intial TMR0 value of 47 and a prescaler of 16 to get the
1/300 s delay.]

Any ideas??

Thanks for your replies. [past & future]

Regards,

Saurabh

Content-Type: application/octet-stream;
       name="latest.asm"
Content-Disposition: attachment;
       filename="latest.asm"

Attachment converted: growth:latest.asm (????/----) (00008E12)

2000\03\31@043814 by Michael Rigby-Jones

flavicon
face
part 0 9705 bytes
<P><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">I suspect most of your problems stem from a mistake in your initialisation:</FONT>
<BR><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">Initialize</FONT>
<BR><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ;-------CHANGING TO BANK 1 ----------</FONT>
<BR><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BSF&nbsp;&nbsp;&nbsp;&nbsp; STATUS, RP0&nbsp;&nbsp;&nbsp;&nbsp; ; Select Bank 1</FONT>
</P>

<P><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ;*****&nbsp; SET UP PORTS AS INPUTS OR OUTPUTS&nbsp; *****</FONT>
<BR><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CLRF&nbsp;&nbsp;&nbsp; PORTA&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; Initialize PORTA by setting output data latches</FONT>
</P>

<P><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">Incorrect!!&nbsp; You are in bank 1 and cannot access PORTA from here.</FONT>
</P>

<P><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MOVLW&nbsp;&nbsp; 0000h&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; Value used to initialize data direction</FONT>
<BR><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MOVWF&nbsp;&nbsp; TRISA&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; ALL 5-pins set as output</FONT>
</P>

<P><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">This is fine.</FONT>
</P>

<P><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CLRF&nbsp;&nbsp;&nbsp; PORTB&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; Initialize PORTB by setting output data latches</FONT>
</P>

<P><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">Again, incorrect.&nbsp; PORTB is in bank 0.</FONT>
</P>

<P><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MOVLW&nbsp;&nbsp; 0001h&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; Value used to initialize data direction</FONT>
<BR><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MOVWF&nbsp;&nbsp; TRISB&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; ALL 8-pins set as input</FONT>
</P>

<P><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">All 8 pins are not set as inputs.&nbsp; You have only set pin 0 as input, the rest as outputs.</FONT>
</P>

<P><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ;*****&nbsp; ASSIGN TO TMR0&nbsp; ****</FONT>
<BR><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bcf&nbsp;&nbsp;&nbsp;&nbsp; OPTION_REG,PSA&nbsp; ; PSA = 0</FONT>
<BR><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ;Set Prescaler to 16&nbsp;&nbsp;&nbsp; [011=PS2|PS1|PS0]</FONT>
<BR><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bsf&nbsp;&nbsp;&nbsp;&nbsp; OPTION_REG, PS0 </FONT>
<BR><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bsf&nbsp;&nbsp;&nbsp;&nbsp; OPTION_REG, PS1</FONT>
<BR><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bcf&nbsp;&nbsp;&nbsp;&nbsp; OPTION_REG, PS2</FONT>
</P>

<P><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ;-------CHANGING TO BANK 0 (default) ----------</FONT>
<BR><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BCF&nbsp;&nbsp;&nbsp;&nbsp; STATUS, RP0&nbsp;&nbsp;&nbsp;&nbsp; ; Select Bank 0</FONT>
</P>
<BR>

<P><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">As you are using a 16F84 you might like to consider using the TRIS instruction to save having to set banks.</FONT>
</P>

<P><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">e.g.</FONT>
</P>

<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT COLOR="#0000FF" SIZE=2 FACE="Arial">movlw&nbsp;&nbsp; 00h</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT COLOR="#0000FF" SIZE=2 FACE="Arial">tris&nbsp;&nbsp;&nbsp; PORTA&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; set all PORTA as all outputs</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT COLOR="#0000FF" SIZE=2 FACE="Arial">movlw&nbsp;&nbsp; FFh</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT COLOR="#0000FF" SIZE=2 FACE="Arial">tris&nbsp;&nbsp;&nbsp; PORTB&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; set all PORTB as all inputs</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT COLOR="#0000FF" SIZE=2 FACE="Arial">clrf&nbsp;&nbsp;&nbsp; PORTA</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT COLOR="#0000FF" SIZE=2 FACE="Arial">clrf&nbsp;&nbsp;&nbsp; PORTB</FONT>
</P>

<P><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">Hope this helps</FONT>
</P>

<P><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">Mike Rigby-Jones</FONT>
</P>

<P><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">&nbsp;</FONT>
</P>
<UL>
<P><FONT SIZE=1 FACE="Arial">{Original Message removed}

2000\03\31@143901 by Robert Boardman

flavicon
picon face
Just a guess but i can't see clrwdt instruction anywhere and you've got the
wdt switched on


----- Original Message -----
From: Saurabh Sinha <spam_OUTssinhaTakeThisOuTspamIEEE.ORG>
To: <.....PICLISTKILLspamspam@spam@MITVMA.MIT.EDU>
Sent: Friday, March 31, 2000 09:44
Subject: ISR is never called


{Quote hidden}

More... (looser matching)
- Last day of these posts
- In 2000 , 2001 only
- Today
- New search...