Re: Need help getting started.
This ought to get you started if you are using PBP 3.
Code:
#IF __PROCESSOR__ = "16F690"
#config
cfg1 = _INTRC_OSC_NOCLKOUT ; Internal oscillator
cfg1&= _WDT_OFF ; Watch Dog Timer disabled
cfg1&= _PWRTE_OFF ; Power-up Timer disabled
cfg1&= _MCLRE_ON ; Master Clear Reset enabled
cfg1&= _CP_OFF ; Program Code Protection is disabled
cfg1&= _CPD_OFF ; Data Code Protection is disabled
cfg1&= _BOD_OFF ; Brown-out Detect disabled
cfg1&= _IESO_OFF ; Internal External Switchover mode is disabled
cfg1&= _FCMEN_OFF ; Fail-safe Clock Monitor is disabled
__CONFIG cfg1 ; Set the configuration bits
#ENDCONFIG
#else
#MSG "Wrong microcontroller selected!"
#endif
DEFINE OSC 4
ANSEL = %00000000
;CMCON0 = %00000111
;CMCON1 = %00000010
PORTC = 0
ANSELH=0
ADCON0 = 0
ADCON1 = 0
BTW I use those same demo boards.
Last edited by Archangel; - 31st December 2014 at 19:45.
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