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.
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 } }