Microchip Code Configurator MCCP SPI Multiple Initialization Config. for SD Card

Discussion in 'Embedded Systems and Microcontrollers' started by Sherri, Aug 5, 2018.

  1. Sherri

    Thread Starter New Member

    Mar 31, 2018
    17
    0
    Hello all!
    I have recently begun the task of working w/ embedded C programming as I was a long time assembly language user w/ PIC16/18 microcontrollers. I like the ease of use and layout of the MCC (Microchip Code Configurator) and find it will be beneficial in my programming in the near future.
    I have been going thru the tutorial on youtube by Student Companion(videos 46-48) which gives a step by step process on setting up XC8 and a PIC18f45k22 microcontroller to use a SD card. I have been using a PIC18f26k22 which is from the same family as used in this tutorial so the transition should be semi smooth.
    The issue that I am facing is when setting up the MSSP1 peripheral in MCC as it has to have two clock speeds for use w/ the SD card. One has to be between 100-400 khz and the other(student companion sets up as)uses 8 mhz for normal operation. In the video they are able to have multiple Initialization configurations and name them with a unique name which I would choose. I can set only one configuration in my MCC version but I can not name it or find out how I would add a second Initialization configuration as they do in the video. The version of mcc that I am using is V3.55.1 (most recent version) and the student companion version in the video is a version from year 2015 but i can not see which version. I do see that the xc8 compiler they are using is v1.34 if that will help.
    Can someone please explain how I would set up multiple initialization configurations and name them using MCC and SPI Master in the MSSP1 peripheral.
    Thank you in advance.
     
  2. Raymond Genovese

    Active Member

    Mar 5, 2016
    997
    555
    When you select the MSSP1 from peripherals, make sure it is the one for Foundation Service Library from Microchip.

    When you get to this screen:
    screen1.jpg

    Click the +

    You can add multiple initialization by clicking the + repeatedly. You can name each one and change speeds, etc... in each initialization.
    screen2.jpg

    Hope this helps.
     
    JohnInTX, nsaspook and MMcLaren like this.
  3. Sherri

    Thread Starter New Member

    Mar 31, 2018
    17
    0
    Raymond,
    Thank you for your kind reply to my question. I was wondering aout what the difference was between the two choices available when I opened the MSSP peripheral in MCC. I was not sure of what the Foundation Service Library was. Your detailed description helped me figure MCC out that much more.

    Thanks,
    Sherri
     
Loading...