Hi I've a function use it to send digits to a DTMF IC. When I copy the body of the function in main ,every thing goes fine. But if I call the function from main the hardware shows no reaction however in debug mode ,tracing through the code results in exactly the same results !!
void SendTone(unsigned char n, unsigned char tone, unsigned char key) { unsigned char xdata *adr; adr = FindDTMFadrs(n);//Ch[n].PeerCh if ( key == ON ) { *adr = tone; ++adr;//points to the control register now *adr =0x05;//turn on the tone generator } else { ++adr;//points to the control register now *adr =0x04;//turn off the tone generator } }