AnsweredAssumed Answered

how to select the mux - functionality

Question asked by sachin@eilabs.co.in on Sep 25, 2012
Latest reply on Oct 10, 2012 by sachin@eilabs.co.in

Dear all ,

iam trying to select the Eppi 0 D18 , D19 , D20 , D21 , D22 , D23  to  port D pins 0 , 1 , 2 , 3 , 4 , 5   ,

 

i know how to set this with direct values , but i was trying wether the following procedure will work or not , so please help me to get through this

 

*pPORTD_MUX &= ~(PORT_x_MUX_0_MASK | PORT_x_MUX_1_MASK | PORT_x_MUX_2_MASK | PORT_x_MUX_3_MASK | PORT_x_MUX_4_MASK | PORT_x_MUX_5_MASK);

184

          *pPORTD_MUX |= (PORT_x_MUX_0_FUNC_4 | PORT_x_MUX_1_FUNC_4 | PORT_x_MUX_2_FUNC_4 | PORT_x_MUX_3_FUNC_4 | PORT_x_MUX_4_FUNC_4 | PORT_x_MUX_5_FUNC_4);

185

          *pPORTD_FER |= PD0 | PD1 | PD2 | PD3 | PD4 | PD5; /* PPI18..23  */   

 

this will work or not libraries included

 

 

 

#include <cdefbf548.h>

#include <ccblkfn.h>

#include <sys/exception.h>

#include<stdio.h>

#include <sysreg.h>

 

Thanks and regards

Sachin patil

Outcomes