Hi guys , wondering if anyone has config set the normal port c i/o pins 6, 7 for the 18f27k40 , as it appears to not respond ,
the portc pins 6,7 can be used as Usart1 , but i require it to be standard i/o
here what i have that effects port c
Code:
' ------- Port C Settings & directions ----------
ANSELC = %00000000 ' Set Port C Analog bit7-0 = ANC7-0 / 0 = digital ,1= Analog
TRISC = %00000100 ' 1= Digital Input / 0= Digital Outputs ANC7 = spare_tx1 output when IR-TX
IOCCN = %00000000 ' IOC Negative Edge Trigger Select RC7-RC0 0 = diabled 1 = enabled POR = 0
WPUC = %00000000 ' Set Week Pullups on Digital inputs POR =0
INLVLC = %11111111 ' Set Input levels - Schmitt = 1 / TTL = 0 POR = 1
SLRCONC = %11111111 ' Set Slew Rate 1 = Rate Limited 0 = Max rate POR =1
IOCCP = %00000000 ' IOC Positive Edge Trigger Select RC7-RC0 0 = diabled 1 = enabled POR = 0
ODCONC = %00000000 ' Open Drain 0 = Output drives both High and Low signals 1= Output drives Low going signals only POR = 0
PMD4 = %01111111 'Bit7= UART2, Bit6= UART1, Bit5= MSSP2 , Bit4=MSSP1,Bit3-1 =N/A , Bit0= CWG1 ( Comparitor Output shutdown )
Bookmarks