Hi
I am new to C, only worked in basic before.
It would be realy nice to add some buttons to the LCD and to read the status of them from PC software.
But there is not any free pins that is easy to connect to so i would like to start to connect the PGD and PGC to two buttons.
TRISB=0xC0;
if (PORTBbits.RB6=1) {
TCPPutROMString(MySocket, (ROM BYTE*) "S1:ON");
TCPFlush(MySocket);
}else{
TCPPutROMString(MySocket, (ROM BYTE*) "S1:OFF");
TCPFlush(MySocket);
}
if (PORTBbits.RB7=1) {
TCPPutROMString(MySocket, (ROM BYTE*) "S2:ON");
TCPFlush(MySocket);
}else{
TCPPutROMString(MySocket, (ROM BYTE*) "S2:OFF");
TCPFlush(MySocket);
}
But I must have done somthing wrong while I only get S1:ON in respons when it is grounded and when it is connected to 3,3v