Hi I am using 89C51ED2 for my projects.From SPI I am receiving datas from peripherial.I using inbuilt registers like SPDAT,SPCON.But I can't call my SPI function from interrupt service routine My CODE is void readspi(void){ Enablecs(); SPDAT = addr; while((SPSTA & 0x80) == 0); spivalue = SPDAT; while((SPSTA & 0x80) == 0); Disablecs(); } void Ext0_ISR(void) interrupt 0 using 1{ readspi(); } void main(void){ static unsigned int spivalue; while(1){ } } Please help me to over come this problem
codearchitect for Philips LPC932 free from http://www.esacademy.com generates code for many peripherals. Usually this code can, with minuscule changes, be used on the 89x51xx2 series. Erik PS if you use these processors or the sane SILabs derivatives - or even some others, have a look at the CodeArchitect even if you are not Manoj.