I am using PIC18F4550 with MPBALX IDE V2.26, Xc8 V1.32.
Below are codes for making pin as output & input. Are these codes ok.
I have tried on proteus & it is working. But after few seconds, it throw warning that not in real time due to excessive cpu load.
1. Output
/* output low w& make it output */
LATBbits.LATB0 = 0U;
TRISBbits.TRISB0 = 0U;
/* make low & the high */
LATBbits.LATB0 = 0U;
LATBbits.LATB0 = 0U;
/* keep on inverting */
while(1)
{...
PIC18F4550 pin Input/Output code
Below are codes for making pin as output & input. Are these codes ok.
I have tried on proteus & it is working. But after few seconds, it throw warning that not in real time due to excessive cpu load.
1. Output
/* output low w& make it output */
LATBbits.LATB0 = 0U;
TRISBbits.TRISB0 = 0U;
/* make low & the high */
LATBbits.LATB0 = 0U;
LATBbits.LATB0 = 0U;
/* keep on inverting */
while(1)
{...
PIC18F4550 pin Input/Output code