Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
05/01/01 12:44
Read: times


 
#11256 - Serial Interrupts
I have the following code:

I am using Franklin C and the Serial Interrupt routine is never invoked, I figured that I must have one of the SFR's set wrong somewhere but I can't find it, and I've spent hours looking at this.

Can some one give me a bit of a shove in the right direction.

(The interrupt is loaded at the right address when I look at the ASM listing and the Interrupt bit is set, it is just never getting called)

Thanks for all your help

Marshall Brown

byte c;
byte GetByte(void)
{
byte c;
c = SBUF;
RI = 0;
return(c);
}

void mySerialint (void) interrupt 4 using 1
{

if(RI == 1)
{
c = GetByte();
PlaceChar (c);
}
}




void main (void)
{

EA = 1;
TMOD = 0x21;
SCON = 0x52;
TCON = 0x79;
TH1 = 0xFD;
ES =1;
ET0 = 1;
TR0 = 0;
while(1);
}

(comments and stuff deleted cause you can't really see how it is going to come out)

List of 4 messages in thread
TopicAuthorDate
Serial Interrupts            01/01/70 00:00      
RE: Serial Interrupts            01/01/70 00:00      
RE: Serial Interrupts            01/01/70 00:00      
RE: Serial Interrupts            01/01/70 00:00      

Back to Subject List