Hi macrackit, I do not have any errors, I've been playing with it the whole night last night but no progress...
I also tried the following alias pins configurations from a book..(uising pic18F452) but no luck.
Hmm..I don't understand, CS -> RB3, MOSI -> RC7, SCLK -> RB1 and MISO -> RB0 works fine without a problem, but assigning them to another port/pins giving me trouble.Code:' Alias PIC pins and registers for SD/MMC card SD_WE VAR PORTA.4 ' SD card write protect SD_WE_TRIS VAR TRISA.4 ' SD card write protect direction SDI VAR PORTC.5 ' SPI data in SD #7 SDI_TRIS VAR TRISC.5 ' SPI data in direction SCL VAR PORTC.3 ' SPI clock SD #5 SCL_TRIS VAR TRISC.3 ' SPI clock direction SD_CS VAR PORTC.2 ' SD card chip select SD #1 SD_CS_TRIS VAR TRISC.2 ' SD card chip select direction SD_CD VAR PORTC.0 ' SD card detect SD_CD_TRIS VAR TRISC.0 ' SD card detect direction SDO VAR PORTC.4 ' SPI data out SD #2 SDO_TRIS VAR TRISC.4 ' SPI data out direction
(BTW I'm using Pic18F4550, crystal 20Mhz)
regards,
tacbanon





Bookmarks