[SIZE=2];WORLDS SIMPLEST PROGRAM *[/SIZE]
[SIZE=2]; 18-5-2010 *[/SIZE]
[SIZE=2]; *[/SIZE]
[SIZE=2];************************************[/SIZE]
[SIZE=2]list p=12F629[/SIZE]
[SIZE=2]radix dec[/SIZE]
[SIZE=2]include "p12f629.inc"[/SIZE]
[SIZE=2]__CONFIG _MCLRE_OFF & _CP_OFF & _WDT_ON & _INTRC_OSC_NOCLKOUT ;Internal osc.[/SIZE]
[SIZE=2];************************************[/SIZE]
[SIZE=2];Beginning of program[/SIZE]
[SIZE=2];************************************[/SIZE]
[SIZE=2] org 0x00[/SIZE]
[SIZE=2] bsf status, rp0 ;bank 1 [/SIZE]
[SIZE=2] bcf TRISIO,4 ;GP4 output [/SIZE]
[SIZE=2] movlw b'00000111' ;bit3=1=WDT 011= /8 WDT=18mSx8=0.144Sec[/SIZE]
[SIZE=2] movwf option_reg ;must be in bank 1[/SIZE]
[SIZE=2] bcf status, rp0 ;bank 0 [/SIZE]
[SIZE=2] movlw b'00010000' ;to toggle GP4[/SIZE]
[SIZE=2] xorwf GPIO,f[/SIZE]
[SIZE=2] sleep[/SIZE]
[SIZE=2]END[/SIZE]