Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
To set the clock frequency on a MCU in Proteus, right click on the MCU in the design and select "Edit Properties" and simply enter the correct frequency in the "Processor Clock Frequency" form slot.
Proteus does not seem to require any oscillator circuitry in the design as long as the entered value is correct.
To set the configuration bits in MikroC for an internal oscillator, simply click on the "Oscillator Selection" menu and select "INTOSC - RA6 as I/O, RA7 as I/O".
BigDog
// Initialize SPI1 module
SPI1_Init_Advanced(_SPI_MASTER_OSC_DIV64, _SPI_DATA_SAMPLE_MIDDLE, _SPI_CLK_IDLE_LOW, _SPI_LOW_2_HIGH);
The PIC18F4520' MASTER SYNCHRONOUS SERIAL PORT (MSSP) module and MikroC SPI library take care of most of the details of implementing a SPI bus.
The following function call setups up the SPI clock line in the MSSP module.
The MMC library adds FAT File System functionality to the SD interface with SPI bus.
One other issue I should mention, the MikroC's MMC Library only functions correctly with a SD card which has formatted with FAT16. It will not function with FAT12 or FAT32 according to their documentation.
BigDog
The question is whether the default FAT formatting was FAT16 or not.
What did you use to preformat the SD, Windows 7, XP PRO, etc?
You may have to use a SD utility to ensure it is FAT16.
BigDog
What's SD utility ?
And for MikroC oscillator selection menu, didnt shows "INTOSC - RA6 as I/O, RA7 as I/O"; only shows "internal oscillator block on port RA6 and RA7".
From above description, it seem internal block oscillator is different from RC oscillator.
Does my understanding correct ?
Zip up your current MikroC and Proteus project and upload it.
I attempt to troubleshoot here.
BigDog
Zip up your current MikroC and Proteus project and upload it.
I attempt to troubleshoot here.
BigDog