Blink few simple led using XC8 Compiler and external 20MHz Crystal oscillator on pic18F4550. Learn about the basics things need to be kept under consideration to avoid issues with __delay_ms or __delay_us in xc8 Compiler.
Read this post on rakeshmondal.info