;-------------------------------------------------------------------------------
;16F684_blink
;
;Led knipperlicht gebaseerd op:
;  Title: Blink-a-led of the Microchip pic16f684
;  Author: Rob Hamerling, Copyright (c) 2008..2010, all rights reserved.
;
;Aangepast naar eigen noden:
; interne oscillator op 4MHz
; interne MCLR
;-------------------------------------------------------------------------------
include 16f684

pragma target clock    4_000_000       ;oscillator frequency
pragma target OSC      INTOSC_NOCLKOUT ;interne oscillator/osc pinnen beiden IO
pragma target WDT      disabled        ;no watchdog
pragma target MCLR     internal        ;reset internally

enable_digital_io()    ;alle pinnen digitale IO

;LED is via voorschakelweerstand aangesloten op pin A0
alias   led      is pin_A0
pin_A0_direction =  output
;-------------------------------------------------------------------------------
forever loop
  ;LED aan
  led = on
  ;wacht 1 seconde
  _usec_delay(1_000_000)
  ;LED uit
  led = off
  ;wacht 1 seconde
  _usec_delay(1_000_000)
end loop
;-------------------------------------------------------------------------------