This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Checking state of DIP swich using interrupts

I came accross this thing today while working on DSK6713, I am not able to check state of DIP switch using interrupts, while I am able to do it with polling. I have attached the relavent part of the codes , using polling and interrupts both. Is there something I am missing or i need to know. I have attached the file in which i am using interrupts. And the code using polling is mentioned below:

#include "DSK6713_AIC23.h" //codec support
Uint32 fs=DSK6713_AIC23_FREQ_8KHZ; //set sampling rate
#define DSK6713_AIC23_INPUT_MIC 0x0015
#define DSK6713_AIC23_INPUT_LINE 0x0011
Uint16 inputsource=DSK6713_AIC23_INPUT_LINE;


void main()
{
comm_poll();
DSK6713_DIP_init();
DSK6713_LED_init();


while(1)
{
if(DSK6713_DIP_get(0) == 0)
DSK6713_LED_on(0);

}
}

Thanks in advance 

  • Hi Arora,

    Whether the code is working good if you configured as poll method like below.

    #include "DSK6713_AIC23.h" //codec support
    Uint32 fs=DSK6713_AIC23_FREQ_8KHZ; //set sampling rate
    #define DSK6713_AIC23_INPUT_MIC 0x0015
    #define DSK6713_AIC23_INPUT_LINE 0x0011
    Uint16 inputsource=DSK6713_AIC23_INPUT_LINE; 
    
    
    void main()
    {
    	DSK6713_init();
    	//comm_intr();
    	DSK6713_DIP_init();
    	DSK6713_LED_init();
    
    	while(1)
    	{
    		if(DSK6713_DIP_get(0) == 0)
    			DSK6713_LED_on(0);
    		else
    			DSK6713_LED_off(0);

            DSK6713_waitusec(200000); } }