Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

MikroC & SD CARD & PIC18F4520

Status
Not open for further replies.
Are you asking me to change the config bits setting by refering project from mikroC MMC example ?
 

im not asking you to change but I asked you to post your settings so that we can check the settings.. read my links to know what is configuration bits or download the datasheet of your device..

**broken link removed**
 

I'm curious something for the port C for my SD card connections.

For port RC5 & RC2 should be 1, RC4 & RC3 should be 0.
I confirmed this by referring the datasheet.
But in the code example doesn't not show configuration bits except CS - RC2.

1.JPG11.JPG

These diagram configuration bits shown in my project file.
 
Last edited:

configuration bits/fuses is not a PORT .. sorry but Im not a mikroC user.. did yo read my link about how to edit the config fuses in your compiler?

in MPlab IDE using Hi-tech C compiler we set confiuration bits/fuses like this


PHP:
__CONFIG(1,OSC_HS);
__CONFIG(2,PWRT_ON & BOR_OFF & WDT_OFF);
__CONFIG(4,DEBUG_OFF & STVR_OFF);


---------- Post added at 09:32 ---------- Previous post was at 09:25 ----------

__CONFIG(1,OSC_HS); - means external high-spead oscillator

__CONFIG(2,PWRT_ON & BOR_OFF & WDT_OFF); - power up timer off, brownout reset off, watchdog timer off

something like this... you can find this in your compiler
 

I have posted diagram of my project configuration bits. Post replies #44
 

okay I see it now.. it is wrong settings.. :-D

are you using external crystal or builtin oscillator?
 

okay I see it now.. it is wrong settings.. :-D

are you using external crystal or builtin oscillator?

External or Built oscillator ? How'd I know ?
Sorry, I'm not good in microcontroller.
 

okay I see it now.. it is wrong settings.. :-D

are you using external crystal or builtin oscillator? if yes then follow this

check this image


attachment.php
 

Attachments

  • config.JPG
    config.JPG
    82.1 KB · Views: 204

crystal is something like this

**broken link removed**

if you use this configure it for external oscillator
 

OMG..I'm truly sorry that I didnt connect anything in CLKIN of my PIC18f4520.
Can I use internal pic18f4520's oscillator ?
How do I make it ?

***I realized although I didn't connect any oscillators in Proteus, yet still can display correct output.
 
Last edited:

yes.. but Im not sure how to set it in mikroC im not good in microcontroller also I just learned yesterday :roll: :-D :roll: :-D :roll: :-D :roll: :-D :roll: :-D

try EC-PORT on RA6 for internal oscillator :roll: :-D :roll: :-D :roll: :-D :roll: :-D
 

Well, any links for learning these internal oscillator ?
 

use the datasheet..
and this

**broken link removed**

it's different device but you should know the concept from it..
 

I find something weird; in proteus, although there is no oscillator connected to CLKIN, and yet it can initialize successfully.
 

Anyone know how to setup PIC itself 's oscillator correctly for PIC18F4520 from MikroC pro ?
 

did you try my suggestion?

make a blinking led program and do it in actual hardware. make it work.. play with all the settings.. and that is called experimentation for learning...

if manage to blink a LED using internal oscillator then apply it to your sd card project..

It's nice to learn in step by step process you will get the detailed learning :)
 

did you try my suggestion?

make a blinking led program and do it in actual hardware. make it work.. play with all the settings.. and that is called experimentation for learning...

if manage to blink a LED using external oscillator then apply it to your sd card project..

It's nice to learn in step by step process you will get the detailed learning :)

Ok. I want verify the oscillator specs :
1) In order to use Quartz Crystal,Ceramic Resonator,External Oscillator : These required capacitor and external oscillator to operate it.
2) Whereby RC Oscillator : It uses resistors and pic controller itself oscillator to operate it.

Are my understanding for these specs correct ?
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top