SDFS on 18F46K22


Closed Thread
Results 1 to 10 of 10

Hybrid View

  1. #1


    Did you find this post helpful? Yes | No

    Default Re: SDFS on 18F46K22

    hardSPI to false works it reports OK...

    so, am i right in thinking it's the configuration of the hardware SPI on the 46K22?

    I'm going to grab a 4550, and copy the test program and set it for the 4550 to see if it's a register issue.
    Any more help appreciated.

  2. #2


    Did you find this post helpful? Yes | No

    Default Re: SDFS on 18F46K22

    after tinkering and remembering why i moved away from the 4550 (LCD problems)
    I got the card to initialise in both software and hardware mode on the 4550...

    I'm wondering if the 46K22 is too fast at 64MHZ? simple answer is to slow it down in the config...

    I have noticed on the 4550 the SPI LED pullups behave completely diferently between softwar and hardware modes...

  3. #3


    Did you find this post helpful? Yes | No

    Default Re: SDFS on 18F46K22

    right, i dropped the 46K22 to 8MHz and the hardwareSPI now works...
    so... now we need to work out a way of slowing the SPI bus down for initialisation...

    EDIT: works at 16MHz
    EDIT2: works at 32MHz with PLL enabled (8MHz x 4)
    Last edited by comwarrior; - 13th July 2012 at 16:08.

  4. #4


    Did you find this post helpful? Yes | No

    Default Re: SDFS on 18F46K22

    ok, i have tried everything to get the SPI to work at 64MHz...
    I tried using SSP1ADD for the baud rate generator and it locks up the chip if you use a value above 170 ish...
    I tried using TMR2 with it's highest per and post scalers... same effect...

    I looked at the datasheet for the baud rate generator, it give a table for speeds...
    It give values for OSC upto 32MHz but not 64MHz...

    It looks like the 46K22 has an issue running stuff at 64MHz because so far I've had to write work arounds for ADC and HWPWM to operate at 64MHz... BUT the EUARTS seem to be ok at 64MHz so, i don't get it... did microchip not test this chip properly at 64MHz or something...
    Luckily, i think i can get away with 32MHz...

    thanks for all the help

  5. #5
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,612


    Did you find this post helpful? Yes | No

    Default Re: SDFS on 18F46K22

    Have you tried dividing down the SPI clock? SSPxCON1 register allows you to select three different ratios.

    /Henrik.

  6. #6


    Did you find this post helpful? Yes | No

    Default Re: SDFS on 18F46K22

    yes, it was already set to divide by 64... tried setting it to use the ADDress register, and selecting TMR2...
    According to the LED's theirs nothing coming out of the SPI ports at 64MHz, it's like it doesn't even initialised the ports at all..

Members who have read this thread : 0

You do not have permission to view the list of names.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts