raman00084
Full Member level 6
if i configure a pin as digital input it is not working. if i configure the same pin as output it is working correctly. my device is dspic33ep512mu810 ccs compiler version is 5.045.
Code:
void main()
{
delay_ms(10);
set_pullup(TRUE,PIN_A2);
delay_ms(10);
while(TRUE)
{
delay_ms(10);
if(input(in_1==0))
{
output_high(pin_b7);
delay_ms(100);
output_low(pin_b7);
delay_ms(100);
}
}
}
#include <33EP512MU810.h>
#build (stack=512)
#FUSES NOWDT //No Watch Dog Timer
#FUSES NOCKSNOFSM //Clock Switching is disabled, fail Safe clock monitor is disabled
#FUSES NOBROWNOUT //No brownout reset
#FUSES NOJTAG //JTAG disabled
#FUSES PUT128 //Power On Reset Timer value 128ms
#device ICSP=1
#use delay(clock=96MHz,crystal=12MHz)
#use FIXED_IO( B_outputs=PIN_B7,PIN_B6 )
#define in_1 PIN_A2