' **************************************************************** ' ** File: Hello_uk.bas - Ver. 1.1 ** ' ** Compiler: PIC Basic PRO ** ' ** IDE: MicroCode Studio Plus ** ' ** Compiler version: 2.45 ** ' ** Hardware: CAN PIC ** ' ** GRIFO(R) via Dell'Artigiano 8/6 ** ' ** 40016 S. Giorgio di Piano (BO) ** ' ** Tel. +39 051 892052 Fax. +39 051 893661 ** ' ** http://www.grifo.com http://www.grifo.it ** ' ** by Graziano Gaiba 31.01.2006 ** ' **************************************************************** ' ' Hello_uk.BAS - Rel. 1.1 - 31.01.2006 by Graziano Gaiba ' Program preloaded im mini modules. ' Makes the on-board LEDs blink. ' ' ' ******************** Compiler definitions ********************** ' DEFINE OSC 40 ' Oscillator frequency (4 x 10 MHz through PLL) 'DEFINE HSER_RCSTA 90h ' Enable EUSART serial receiver 'DEFINE HSER_TXSTA 20h ' Enable EUSART serial transmitter 'DEFINE HSER_BAUD 19200 ' Baud Rate ' ' '************************** Main Program ******************************* ' main: ' Set as output LEDs control signals TRISD.0=0 ' LD1 TRISD.1=0 ' LD2 ADCON1=$0f ' Set as digital I/O pins AN0..12 CMCON=$07 ' Disable analog comparator ECCP1CON = 0 ' Disable ECCP module ' Blinks about twice per second for_ever: ' Turn on LEDs PORTD.0=0 PORTD.1=1 pause 200 ' Turn off LEDs PORTD.0=1 PORTD.1=0 pause 200 goto for_ever end