SD card not initialising using 18F47K42 FC9

Any bugs you encounter with Flowcode should be discussed here.
Post Reply
howard123
Posts: 10
http://meble-kuchenne.info.pl
Joined: Mon Oct 24, 2022 12:27 pm
Location: Cape Town
Has thanked: 1 time

SD card not initialising using 18F47K42 FC9

Post by howard123 »

Morning all

I have been using the PIC18F47K40 and have had the SD card working without a problem. On changing to the PIC18F47K42 the SD card does not pass the initialise component macro.

The code is identical between the two devices mentioned as are the pins, the clock frequency, the initial pre-scaler and the high speed pre-scaler.

The clock at the time of the card initialisation is 8 meg and the pre-scaler is f/64 which gives 125kHz to the card.

I have checked that all other pins used have been correctly allocated and have seen this problem on more than one PIC18F47K42

Any ideas?
Thanks Howard
FC9

medelec35
Matrix Staff
Posts: 1457
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 512 times
Been thanked: 473 times

Re: SD card not initialising using 18F47K42 FC9

Post by medelec35 »

Hello.
Are you referring to a compiler error with just initialise, if so can you post your .fcfx, .c and .msg.txt files please.

Or are you referring to stuck on initialise within your hardware?
Martin

howard123
Posts: 10
Joined: Mon Oct 24, 2022 12:27 pm
Location: Cape Town
Has thanked: 1 time

Re: SD card not initialising using 18F47K42 FC9

Post by howard123 »

Hello Martin

The hardware hangs at the point of initialisation.

I have done a sanity check by going back to the PIC18F47K40 and this does initialise and record in the main loop, using the same SD card.

medelec35
Matrix Staff
Posts: 1457
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 512 times
Been thanked: 473 times

Re: SD card not initialising using 18F47K42 FC9

Post by medelec35 »

In that case can you try software mode instead.
The issue with 18FxxK42 devices is some of the SFR are different to the norm, so they are not currently supported with SPI or I2C.
The rules have been completely rewritten!
Sorry for any inconvenience.
Martin

howard123
Posts: 10
Joined: Mon Oct 24, 2022 12:27 pm
Location: Cape Town
Has thanked: 1 time

Re: SD card not initialising using 18F47K42 FC9

Post by howard123 »

Thanks I will give that a go and let you know if it works.

Post Reply