chrisw1990
- Joined Oct 22, 2011
- 551
but the pic doesnt know that yetThat is more or less given by the schematics. It can only be the internal one
but the pic doesnt know that yetThat is more or less given by the schematics. It can only be the internal one
i would configure them all just to be on the safe side.i realised that i havent yet set the configuration bits.. can i ask you a quick question.. do i need to configure bits which i need or do i have to configure every bits??
what are the internal bits?? i know few bits which i need to configure. can it be possible for you to point me the bits which i will need to configure for my programme?That is more or less given by the schematics. It can only be the internal one
sorry but i dont have that file on the location you gave me. this might be because i downloaded a trail version. if possible could you upload that file for me please!!Take a look at the "18f4520.html" file in the "C:\Program Files\HI-TECH Software\PICC-18\9.80\docs" that will give you some directions. If you are in doubt on a function do not turn it on. That is my thumb rule![]()
If not the OP had confirmed that he use HI-Tech C. I would of course not have given such advice (DoH!).obviously this is part of Hi-Tech compiler. If you use other C compiler you may not have such file. All information about configuring target MCU should be in the datasheet for that MCU. configuring oscillator is one of top priorities and each datasheet will have that covered in detail.
Ok let Us cheat somewhat. Go to the MPLAB toolbar select configure, then select configuration bits. Leave everything that has to do with code protection as is. Do NOT enable watchdog timer. If you are unsure of any function just disable it.sorry but i dont have that file on the location you gave me. this might be because i downloaded a trail version. if possible could you upload that file for me please!!
i told you.. look at that part of the datasheet i told you in a previous post, and it will tell you all the config bits, then what you have to do, is define them like i showed you, #pragma config... and if you look at the datasheet and use google, you can figure out what each bit doeswhat are the internal bits?? i know few bits which i need to configure. can it be possible for you to point me the bits which i will need to configure for my programme?
thank you for your help but i have already configured the bits in the configure bits setting. however i havent written them on the programme as chrisw1990 showed on example. even if i have configured as you mentioned, do i still have to write them in my code as chrisw1990 mentioned??Ok let Us cheat somewhat. Go to the MPLAB toolbar select configure, then select configuration bits. Leave everything that has to do with code protection as is. Do NOT enable watchdog timer. If you are unsure of any function just disable it.
No doing it one place is good enough. However it is poor very poor for documentation not place this in the code, and also a general bad practice. And I also noticed that in the MPLAB (not MPLABX) project you posted the bits was not set in any place. But I take your word for that this issue is taken care of nowthank you for your help but i have already configured the bits in the configure bits setting. however i havent written them on the programme as chrisw1990 showed on example. even if i have configured as you mentioned, do i still have to write them in my code as chrisw1990 mentioned??
sorry, i must have missed this, i cannot find the configuration bits in mplab x..thank you for your help but i have already configured the bits in the configure bits setting. however i havent written them on the programme as chrisw1990 showed on example. even if i have configured as you mentioned, do i still have to write them in my code as chrisw1990 mentioned??
as i mentioned at the beginning, i was having problem programming the pic.. using pickit 3 you suggested me to build a ICSP circuit which i am trying to do now. however i also got picstart plus programming kit. i used this kit on my previous project and i was able to programme my pic using picstart plus kit. but i did my last project in assembly language and now i am using c language. therefore do u know if i will be able to programme my pic using picstart plus kit??Harami, why are you using mplab x? not 8.84?
<edit>
see uploaded workspace, uses 8.84 with C18 compiler free version.
when you have put your config settings in, compile it and run it, should pulse your RB0
i am using mplab 8.84 and i programmed my pic using Pucstart plus kit. however when i tested my circuit, it did not worked. i found out some errors on the circuit diagram therefore i have corrected it. can u please have a look at the attachment. also i hope you have tested my programme at some stage and you should know if it works or not. so do you think my programme and this circuit diagram should give me an positive result??what i think is happening harami, is that the mplab x you are using is not functioning right because its buggy. i had a look at it a while back and decided it has a long way to go. i think you would be best to use the mplab 8.84. especially as most people on here know 8.84 not X
yes, arrow represent power. i wanted to ask about the button because when i tested my circuit, the voltmeter showed 0V when i supply the power to the circuit however when i disconnect the button from the circuit, voltmeter shows 5V. so have i connected the button wrongly?i guess arrow represent supply voltage. where is power to pic? why is button wired directly across power?