#pragma config OSC = INTIO2, WDT = OFF, LVP = OFF
#include <p18f1320.h>
...
void main(void)
{
// speed up the clock to 8MHz, 18F1320
OSCCONbits.IRCF0=1;
OSCCONbits.IRCF1=1;
OSCCONbits.IRCF2=1;
...
}
Ok, will do it. But must I need diodes to protect the inputs of the programmer and the chip also? Usually, which crystal do I need?
And, recommend me an PIC 18F. There seem to be a lot of it, but I don't know which one is perfect for starters.
The BoostC compiler supports the 16F690 and it's free. They also have a forum for if (when) you get stuck and if you search here for BoostC you will find example code.
You need to scan SourceBoost for virus I down load C:\Program Files\SourceBoost\boostlink.pic.exe
[DETECTION] The file contains an executable program that is disguised by a harmless file extension (HIDDENEXT/Crypted)
[NOTE] The file was moved to '4a0f629b.qua'!
Begin scan in 'E:\'
that was at 5.47pm 2/27/09Begin scan in 'C:\Program Files\SourceBoost'
C:\Program Files\SourceBoost\boostlink.pic.exe
[DETECTION] The file contains an executable program that is disguised by a harmless file extension (HIDDENEXT/Crypted)
[NOTE] The file was moved to '4a16ee6a.qua'!
C:\Program Files\SourceBoost>boostlink.pic.exe
BoostLink Optimizing Linker Version 6.91
http://www.sourceboost.com
Copyright(C) 2004-2008 Pavel Baranov
Copyright(C) 2004-2008 David Hobday
Usage: linker.exe [options] files
Options:
-t name target processor
-On optimization level 0-1 (default n=1)
n=0 - no optimization
n=1 - pattern matching and bank switching optimization on
-v verbose mode
-d path directory for project output
-p name project (output) name for multiple .obj file linking
-ld path directory for library search
-rb address ROM base (start) address to use
-rt address ROM top (end) address to use
-swcs s1 s2 s3 Use software call stack. Hardware stack is allocated by
specifying stack depths s1,s2,s3 - these are optional
s1 = main and task routines hardware stack allocation
s2 = ISR hardware stack allocation
s3 = PIC18 low priority ISR hardware stack allocation
-isrnoshadow ISR No use of Shadow registers
-isrnocontext ISR No context Save/restore is added to ISR(PIC18 only)
-icd2 Add NOP at first ROM address for correct ICD2 operation
-hexela Always add extended linear address record to .hex file
-beep Issue sound at the end of link (default off)
Switches for making libraries:
-lib make library file from supplied .obj and .lib files
-p name project (library output file) name
failure
C:\Program Files\SourceBoost>
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?