We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
void main() { SPCR =0xD8; //Enabling SPI int,setting clock EA=1; ES0=1; SPDR=0xFF; //SPI data register while(1);
} unsigned char bdata test; sbit SPIF=test^7; void sr_intr() interrupt 4 { test=SPSR; if(SPIF==1) //Checking the status flag { SPIF=0; SPSR=test; SPDR^=0xFF; }
}
When I am trying to simulate the above in P89V51RD2 SPI data register is not getting loaded with the new values and it is not clearing the status the flag but SPI interrupt was triggering.What could be the problem? Thanks in advance.
Eric, uVision covers simulation for arround 500 different 8051 variants.
I know that, but if you could guarantee that all 'special' SFRs in all derivativers listed were fully covered and fully tested as to the effect of every bit in those, you would be "too good to be true"
The point I make is that no simulator can be guaranteed to truthfully emulate all (unique) SFRs.
A short while ago there was a post here or at 8052 about a SFR in a LPC chip that was not simulated, the poster did never burn a chip because of an unfounded trust in the simulator. When he burned the actual chip all worked.
I have no doubt, Reinhard, that the Keil simulator is the most complete, but I am willing to bet a lot that no none could make a completely verified simulator for the entire '51 spectrum with any reasonable business attitude.
Erik