Hello financecatalyst,
here is an example code setup for MPASM, you will have to comment out the config in your PBP 12F635.inc file to avoid overwriting . . . error.
Code:
'****************************************************************
'* Name : financecatalyst .BAS *
'* Author : [select VIEW...EDITOR OPTIONS] *
'* Notice : Copyright (c) 2009 [select VIEW...EDITOR OPTIONS] *
'* : All Rights Reserved *
'* Date : 1/14/2009 *
'* Version : 1.0 *
'* Notes : *
'* : *
'****************************************************************
@ __config _INTRC_OSC_NOCLKOUT & _WDT_ON & _MCLRE_OFF & _CP_OFF & _BOD_ON & _PWRTE_ON
PortA = %00000000
TrisA = %00000001
CMCON0.0 = 1 'These 3 statements disable analog comparators
CMCON0.1 = 1
CMCON0.2 = 1
VRCON.7 = 0 'This disables voltage reference for comparators
LOOP:
IF PortA.0 = 1 THEN ' True or false check of port status
HIGH PortA.1 ' If true makes port status high
pause 3000 ' Here is your 3 seconds
ELSE ' Goes here if False
LOW PortA.1 ' And makes port status low
ENDIF ' Ends the T/F test
GOTO Loop ' Starts the process over, forever
END
The config statement is where you enable / disable the Power up timer and Brown out detect etc. . .
If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
.
Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
.
There simply is no "Happy Spam" If you do it you will disappear from this forum.
Bookmarks