Quantcast
Channel: Microcontrollers
Viewing all articles
Browse latest Browse all 4923

PIC18F4550 pin Input/Output code

$
0
0
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

Viewing all articles
Browse latest Browse all 4923

Trending Articles