' ============================================================================ ' TR1_blinky.bas ' Blinking LED demo using Proton Basic ' ============================================================================ Device 18F2620 ' Select device type XTAL = 40 ' Set clock frequency to 40 MHz CONFIG_START ' Set hardware configuration parameters OSC = HSPLL ' Set 4x PLL on (10 MHz crystal * 4x = 40 MHz) CONFIG_END TRISC.1 = 0 ' Set pin C1 connected to the status LED to be an output main_loop: Low PORTC.1 ' Set pin C1 low (0 volts) LED on DelayMS 200 ' Delay 200 ms High PORTC.1 ' Set pin C1 high (5 volts) LED off DelayMS 200 ' Delay 200 ms GoTo main_loop ' Go to the top of the loop