You will need to set the TRIS for the port. That will tell what pins are input or out puts.
Try adding this near the top of your code.
That will make PORTB 0 to 3 an input and 4 to 7 an output.Code:TRISB = %00001111
You will need to set the TRIS for the port. That will tell what pins are input or out puts.
Try adding this near the top of your code.
That will make PORTB 0 to 3 an input and 4 to 7 an output.Code:TRISB = %00001111
Dave
Always wear safety glasses while programming.
Bookmarks