matrixofdynamism
Advanced Member level 2
When using any of the built in peripherals like the ADC or SPI e.t.c specific pins are already designed to be used as input or output for specific functions. e.g using spi_write shall drive the SDO and SCK pins on the PIC. However, should the I/O direction of the involved pins always be set before these functions are called? i.e should I explicitly set the pin numbers corresponding to SDO and SCK as output before I call the spi_write function? The spi_write is found in the CCS PIC C Compiler but I am sure that similar functions also exists in other tools.