/***********************************************************************
*
* This program is free software. It comes without any warranty, to
* the extent permitted by applicable law. You can redistribute it
* and/or modify it under the terms of the Do What The Fuck You Want
* To Public License, Version 2, as published by Sam Hocevar. See
* http://sam.zoy.org/wtfpl/COPYING for more details.
*
***********************************************************************
*
* DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
* Version 2, December 2004
*
* Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
*
* Everyone is permitted to copy and distribute verbatim or modified
* copies of this license document, and changing it is allowed as long
* as the name is changed.
*
* DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
* TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
*
* 0. You just DO WHAT THE FUCK YOU WANT TO.
**********************************************************************/
#define __12f675
#include "pic12f675.h"
unsigned int at 0x2007 __CONFIG =
_CP_OFF &
_WDT_OFF &
_BODEN_OFF &
_PWRTE_OFF &
_MCLRE_OFF;
#define nop() _asm nop _endasm
static long int i,j;
static void langsam() {
j = j + 500;
if (j > 20000) j = 0;
for (i=0;i<(j+1);i++) nop();
}
void main() {
j = 1;
GPIO = 0x00; // 0000 0000
CMCON = 0x07; // 0000 0111
ANSEL = 0x00; // 0000 0000
TRISIO = 0x3E; // 0011 1110
while(1) { /* Loop forever */
GPIO0 = 1;
langsam();
GPIO0 = 0;
langsam();
}
}