C haron
stranger
Reged: May 18 2009
Posts: 2
|
|
Hello, I'm using hi-tech c51-lite v9.60 in NI Multisim, and it seems that interrupts are not working. the syntax is different, i cant write
void externalInter0() interrupt 0 {} and writing
interrupt void ISR(){ } like for a pic doesnt seem to do anything.
Please help.
|
Dan Henry
Guru
  
Reged: Oct 16 2003
Posts: 3873
Loc: Colorado
|
|
Quote:
I'm using hi-tech c51-lite v9.60 in NI Multisim, and it seems that interrupts are not working. the syntax is different ...
Different than what? Different than what is described in the compiler manual?
|
C haron
stranger
Reged: May 18 2009
Posts: 2
|
|
hi, im back, thought I got past this issue, but it's still here. I have the lite version, and in the manual I cant find how a simple interrupt example.
this is a small example from keil, and it's how i'm used to write an interrupt can someone write this to work for hi-tech C51 lite
#include
unsigned char ex0_isr_counter = 0;
void ex0_isr (void) interrupt 0 { ex0_isr_counter++; } void main (void) { IT0 = 1; EX0 = 1; EA = 1;
while (1) { } }
this is what I wrote for C51 lite. I'm using Nation Instruments Multisim. I have a clock generator connected to pin P32 and I have a osciloscope conected to P32 and to P10 to see. The clock is ok, pin P10 is allways high.
#include void main(){ IT0 = 1; EX0 = 1; EA = 1; }
interrupt void external0_intr(void){ if(P10==0) P10=1; if(P10==1) P10=0; }
please help
Edited by C haron (Thu Jun 11 2009 02:29 PM)
|