What are the parameters?
In the meantime goto
program files-microchip-mpasm suite
there you will find an inc file for the chip. At the end of the file all of the config options are listed.
What are the parameters?
In the meantime goto
program files-microchip-mpasm suite
there you will find an inc file for the chip. At the end of the file all of the config options are listed.
Dave
Always wear safety glasses while programming.
Greetings mackrackit,
I've looked in the folder you mentioned and the file is called P18F45K20.INC.
I've looked inside the file and found the OSC ( _FOSC_HS_1H EQU H'F2' ; HS oscillator ) and MCLR ( _MCLRE_OFF_3H EQU H'7F' ; RE3 input pin enabled; MCLR disabled ) lines.
However, i'm trying to place these into the code but i'm not being able to succeed.
Tryed stuff like :
@ __CONFIG _CONFIG1, _FOSC_HS_1H
@ __CONFIG _CONFIG3H, _MCLRE_ON_3H
but dont work
Hmm, not too much to go on here, but..
Have you read the wiki here:
http://www.picbasic.co.uk/forum/cont...o-your-Program ? Especially the end where it says don't forget.....
Thanks scalerobotics,
Got it working,
just a quick question:
The lines remarked in PBP's Inc file are default settings ? This means if i dont add the config lines in the code PBP will set these fuses by it self ( and by remarking them there will be no default settings ).
Is this correct ?
Thanks
Yes, you've got it. You can either edit it in PBP's inc files, and change it chip by chip. Or you can remark them out of PBP's inc files, and put them in your code for each project. They are the default settings. I usually copy them into my project, remark them out of PBP's inc file, and use them as a starting point.
Glad you've got it working.
Walter
I agree with you and that's how i'll do
Thanks Walter
My best regards
Rui
Hi everybody. I got a pickit3 with a p18f45k20 chip. I would like to program in C. I would like to control a dc motor by pressing the button on the demo board or by connecting two switches, on for forward motion and one for reverse. can ANYBODY please help me with an example and please tell me what compiler i need to download etc. ive got mplab.
Or if it is easier to control a servo motor a example will be appriciated aswell. thanks
Bookmarks