Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] help on some compiler error problems. [hi-tech C]

Status
Not open for further replies.

romel_emperado

Advanced Member level 2
Joined
Jul 23, 2009
Messages
606
Helped
45
Reputation
132
Reaction score
65
Trophy points
1,318
Location
philippines
Activity points
6,061
hello, i've worked this project yesterday using PIC18f2550 with Hi-tech C v9.64 and it builds pretty well with no error and it's working.. this in not my work I just want to edit this project to port it to other device.

today Im using PIC18f4550 with Hi-tech C v9.66 compiler and I got many errors.. I need your help because Im lack of programming knowledge and I don't want to get it into worse outcome.. I dont believe it's a systax error because it buils well in lower version and working in simulation.

I already commented out the config fuses of the device and this error is not register related errors..

these are the errors:

PHP:
Error   [983] C:\Documents and Settings\mel\Desktop\PIC184550\materials\PIC18 Petit FAT File System\src_picc18\pff.h; 103.6 storage class redeclared
Error   [984] C:\Documents and Settings\mel\Desktop\PIC184550\materials\PIC18 Petit FAT File System\src_picc18\pff.h; 103.6 type redeclared
Error   [1098] C:\Documents and Settings\mel\Desktop\PIC184550\materials\PIC18 Petit FAT File System\src_picc18\pff.h; 103.6 conflicting declarations for variable "DIR" (C:\Program Files\HI-TECH Software\PICC-18\PRO\9.66\include\pic18f2550.h:449)
Error   [194] C:\Documents and Settings\mel\Desktop\PIC184550\materials\PIC18 Petit FAT File System\src_picc18\pff.h; 142.24 ")" expected
Warning [349] C:\Documents and Settings\mel\Desktop\PIC184550\materials\PIC18 Petit FAT File System\src_picc18\pff.h; 142.39 non-prototyped function declaration for "pf_opendir"
Error   [313] C:\Documents and Settings\mel\Desktop\PIC184550\materials\PIC18 Petit FAT File System\src_picc18\pff.h; 142.39 function body expected
Error   [194] C:\Documents and Settings\mel\Desktop\PIC184550\materials\PIC18 Petit FAT File System\src_picc18\pff.h; 143.24 ")" expected
Warning [349] C:\Documents and Settings\mel\Desktop\PIC184550\materials\PIC18 Petit FAT File System\src_picc18\pff.h; 143.36 non-prototyped function declaration for "pf_readdir"
Error   [313] C:\Documents and Settings\mel\Desktop\PIC184550\materials\PIC18 Petit FAT File System\src_picc18\pff.h; 143.36 function body expected
Warning [374] C:\Documents and Settings\mel\Desktop\PIC184550\materials\PIC18 Petit FAT File System\src_picc18\main.c; 18.5 missing basic type; int assumed
Error   [984] C:\Documents and Settings\mel\Desktop\PIC184550\materials\PIC18 Petit FAT File System\src_picc18\main.c; 18.5 type redeclared
Error   [1098] C:\Documents and Settings\mel\Desktop\PIC184550\materials\PIC18 Petit FAT File System\src_picc18\main.c; 18.5 conflicting declarations for variable "DIR" (C:\Documents and Settings\mel\Desktop\PIC184550\materials\PIC18 Petit FAT File System\src_picc18\pff.h:103)
Error   [372] C:\Documents and Settings\mel\Desktop\PIC184550\materials\PIC18 Petit FAT File System\src_picc18\main.c; 18.5 "," expected

I will attached the whole project I am working and the original project.
 

Attachments

  • romel.rar
    127.9 KB · Views: 87
  • PIC18 Petit FAT File System.rar
    318.9 KB · Views: 139

Im not familiar with the variable types they are using and I don't have idea how to fix those errors..

romel.rar is just a duplicate code from the other attached file. I just commented out the config fuses and build it with hitech v9.66 using PIC18f4550.

---------- Post added at 10:32 ---------- Previous post was at 10:01 ----------

the compiler is always pointing this out.

main.c
PHP:
DIR Dir;			/* Directory object */


DIR
is defined in the
pff.h file
PHP:
/* Directory object structure */

typedef struct _DIR_ 
{
	WORD	index;		/* Current read/write index number */
	BYTE*	fn;			/* Pointer to the SFN (in/out) {file[8],ext[3],status[1]} */
	CLUST	sclust;		/* Table start cluster (0:Static table) */
	CLUST	clust;		/* Current cluster */
	DWORD	sect;		/* Current sector */
} DIR;

and also other error because of that DIR and pointed out this line in pff.h
PHP:
FRESULT pf_opendir (DIR*, const char*);			/* Open a directory */


---------- Post added at 10:50 ---------- Previous post was at 10:32 ----------

I think I've found the error..

there is a variable name DIR in PIC18f4550.h that is why compiler returns an error.
PHP:
Error   [1098] C:\Documents and Settings\mel\Desktop\romel\pff.h; 104.6 conflicting declarations for variable "DIR" (C:\Program Files\HI-TECH Software\PICC-18\PRO\9.66\include\pic18f4550.h:525)

I looked inside that file and found this..


PHP:
/ Register: USTAT
extern volatile unsigned char           USTAT               @ 0xF6C;
// bit and bitfield definitions
extern volatile bit PPBI                @ ((unsigned)&USTAT*8)+1;
extern volatile bit DIR                 @ ((unsigned)&USTAT*8)+2;
extern volatile bit ENDP0               @ ((unsigned)&USTAT*8)+3;
extern volatile bit ENDP1               @ ((unsigned)&USTAT*8)+4;
extern volatile bit ENDP2               @ ((unsigned)&USTAT*8)+5;
extern volatile bit ENDP3               @ ((unsigned)&USTAT*8)+6;
extern union {
    struct {
        volatile unsigned                     : 1;
        volatile unsigned PPBI                : 1;
        volatile unsigned DIR                 : 1;
        volatile unsigned ENDP                : 4;
    };
    struct {
        volatile unsigned : 3;
        volatile unsigned ENDP0               : 1;
        volatile unsigned ENDP1               : 1;
        volatile unsigned ENDP2               : 1;
        volatile unsigned ENDP3               : 1;
    };
} USTATbits @ 0xF6C;

there is already a DIR name .. I htink it would be fixed if I will rename my variable to other name.. I will try
 
Last edited:

Part of the problem is the header pic18f2550.h has a "DIR" defined as well:


...
// Register: USTAT
extern volatile unsigned char USTAT @ 0xF6C;
// bit and bitfield definitions
extern volatile bit PPBI @ ((unsigned)&USTAT*8)+1;
extern volatile bit DIR @ ((unsigned)&USTAT*8)+2;
extern volatile bit ENDP0 @ ((unsigned)&USTAT*8)+3;
extern volatile bit ENDP1 @ ((unsigned)&USTAT*8)+4;
extern volatile bit ENDP2 @ ((unsigned)&USTAT*8)+5;
extern volatile bit ENDP3 @ ((unsigned)&USTAT*8)+6;
...

I'm still hunting the errors down.

BigDog
 
wow!! hehe It builds with no error... it's all about conflicting variable inside PIC18f4550.h and my structure name... !!!! now solved!

---------- Post added at 10:54 ---------- Previous post was at 10:53 ----------

Part of the problem is the header pic18f2550.h has a "DIR" defined as well:




I'm still hunting the errors down.

BigDog

I just spotted the culprit! hehe..

---------- Post added at 10:56 ---------- Previous post was at 10:54 ----------

the conflicting variable is in the USB Status and Control register

REGISTER 17-3: USTAT: USB STATUS REGISTER bit2
page 170 of the datasheet

---------- Post added at 11:05 ---------- Previous post was at 10:56 ----------

I will marked this now as solved..

Thanks bigdogguro for the help... thanks so much..
 
I have the same issue...i use a PIC18F4550 as well and i was wondering if you can help me?
 

What issue are you referring, compiling the FATFS routines in HiTech C?

Can you elaborate? Post any compiler messages?

BigDog

yep. i use HI-TECH V9.63 and i try to find a FATFS working demo for a PIC18F4550 i was having the same error as romel_emperado in his first post. I have edited the PIC18f4550.h by replacing all "DIR" by "DIRT" and my error was gone :)

but my code actually not working... I was wondering now if a compatibility issue with my SDHC 8G&4G can be the problem...
 

but my code actually not working... I was wondering now if a compatibility issue with my SDHC 8G&4G can be the problem...

Possibly. There have been reports of incompatibilities with some SDHCs. Post the manufacture and model of the SDHCs you are attempting to use in your designs.

Have you tried a smaller capacity SDHC, 2GB or less?


Post or upload your code so that we can review it for possible issues. Also the schematic of your design if available.

BigDog
 
Possibly. There have been reports of incompatibilities with some SDHCs. Post the manufacture and model of the SDHCs you are attempting to use in your designs.

Have you tried a smaller capacity SDHC, 2GB or less?


Post or upload your code so that we can review it for possible issues. Also the schematic of your design if available.

BigDog

just testing out the CK on PORTB1 and a get a pulsating 5Volt... my PIC is powered by a 5V and my SD slot on a 3.3V.. As i can see the SD card is powered by a ~3V and his clock signal should be at ~3V right? what should i do? a voltage divider with a resistor? or there is an option to set the port output voltage on the PIC?

not tested with a smaller SD card...min 4G
 

Here my schematic;
SdCard.png

The base of the code is the one of romel, i have replaced the lcd code by my lcd code and the spi by the builtin spi from HI-TECH

Here is the main.c
Code:
#ifndef MAIN_C
#define MAIN_C

#include	<htc.h>
#include	<stdio.h>
#include	<string.h>

#include	"HardwareProfile.h"
#include	"pff.h"
#include	"lcd.h"

// Config word 1
__CONFIG(1, USBPLL & IESODIS & FCMDIS & HSPLL & PLLPOSTDIV2 & PLLDIV5);
// Config word 2
__CONFIG(2, VREGEN & PWRTDIS & BOREN & BORV20 & WDTDIS & WDTPS32K);
// Config word 3
__CONFIG(3, PBDIGITAL & LPT1DIS & MCLREN);
// Config word 4
__CONFIG(4, XINSTDIS & STVREN & LVPDIS & ICPORTDIS & DEBUGDIS);
// Config word 5, 6 and 7 (protection configuration)
__CONFIG(5, UNPROTECT);
__CONFIG(6, UNPROTECT);
__CONFIG(7, UNPROTECT);

FATFS Fs;			/* File system object */
DIR Dir;			/* Directory object */
FILINFO Fno;		/* File information */

unsigned short rb;		/* Return value. */
unsigned char buff[100];

void delay(void);

static void InitialiseSystem(void)
{
	// Default Digital
	ADCON1 = 0x0F;

	// LCD outputs
	TRISD = 0b00000000;

	// Clear all ports LCD
	PORTD = 0b00000000;

	// LCD Ilitialization
	lcdInit();
}

void main(void)
{
	unsigned char i;
	
	InitialiseSystem();

	while(1){
		delay();
		lcdGoto(0, 0);
		lcdPuts("insert card!");
		if (pf_mount(&Fs) ) continue;	/* Initialize FS */
		lcdClearDisplay();
		lcdPuts("initialized");
		while(1){
			if (pf_opendir(&Dir, "")) break;
			while (!pf_readdir(&Dir, &Fno) && Fno.fname[0]) {
				if( strstr(Fno.fname, ".TXT") ){			// TXT file
					lcdClearDisplay();
					lcdGoto(0, 0);
					lcdPuts(Fno.fname);
					if(pf_open(Fno.fname)) continue;		// open file
					if( strstr(Fno.fname, "BLANK") ){
						lcdGoto(0, 1);
						lcdPuts("writing to a blank file");	// (PFF note: "pf_write" cannot expand file size)
						if(pf_write("sample message to SD/MMC card.\r\n", 0, &rb)) continue;	// write to file
						if(pf_write(0, 0, &rb)) continue;		// Finalize the write process
						lcdPuts("     done.");
					}
					else{
						if(pf_read(buff, 70, &rb)) continue;    // Read data to the buff[]
						lcdGoto(0, 2);
						lcdPuts(buff);	// display txt file content
						for(i=0; i<100; i++) buff[i]=0;			// clear buffer
					}
					delay();
					delay();
					delay();
				}
			}
		}
		
	}
}

void delay(void)
{
	long i=0x3FFFF;
	while(--i);
}

#endif

the modified mmc.c;
Code:
/*-----------------------------------------------------------------------*/
/* PFF - Low level disk control module for ATtiny85     (C)ChaN, 2009    */
/*-----------------------------------------------------------------------*/

#include	<htc.h>
#include	<stdio.h>
#include	<string.h>

#include	"HardwareProfile.h"
#include 	"diskio.h"
#include	"lcd.h"

#define _WRITE_FUNC	1

/* Definitions for MMC/SDC command */
#define CMD0	(0x40+0)	/* GO_IDLE_STATE */
#define CMD1	(0x40+1)	/* SEND_OP_COND (MMC) */
#define	ACMD41	(0xC0+41)	/* SEND_OP_COND (SDC) */
#define CMD8	(0x40+8)	/* SEND_IF_COND */
#define CMD12	(0x40+12)	/* STOP_TRANSMISSION */
#define CMD16	(0x40+16)	/* SET_BLOCKLEN */
#define CMD17	(0x40+17)	/* READ_SINGLE_BLOCK */
#define CMD24	(0x40+24)	/* WRITE_BLOCK */
#define CMD55	(0x40+55)	/* APP_CMD */
#define CMD58	(0x40+58)	/* READ_OCR */

/*--------------------------------------------------------------------------

   Module Private Functions

---------------------------------------------------------------------------*/
unsigned char CardType;

static void spi_init(void)
{
	SS_LATA		=	1;
	OpenSPI(SPI_FOSC_64, MODE_11, SMPEND);
}

/*-----------------------------------------------------------------------*/
/* Deselect the card and release SPI bus                                 */
/*-----------------------------------------------------------------------*/

static void release_spi (void)
{
	SS_LATA = 1;
	//rcv_spi
	ReadSPI();
}

/*-----------------------------------------------------------------------*/
/* Wait for card ready                                                   */
/*-----------------------------------------------------------------------*/

static unsigned char wait_ready (void)
{
	unsigned char res;
	unsigned short timeout = 0x1FFF;
	
	do
		res = ReadSPI();
	while ((res != 0xFF) && (--timeout));
		lcd_text(0, 3, "Ready");
	return res;
}

/*-----------------------------------------------------------------------*/
/* Send a command packet to MMC                                          */
/*-----------------------------------------------------------------------*/

static unsigned char send_cmd (
	unsigned char cmd,		/* Command unsigned char */
	unsigned long arg		/* Argument */
)
{
	unsigned char n, res;

	/* Select the card and wait for ready */
	SS_LATA = 1;
	SS_LATA = 0;

	if (wait_ready() != 0xFF) {
		return 0xFF;
	}

	if (cmd & 0x80) {	/* ACMD<n> is the command sequence of CMD55-CMD<n> */
		cmd &= 0x7F;
		//res = send_cmd(CMD55, 0);		// PICC18 Compiler error! (recursive function)	
		/* Send command packet */
		WriteSPI(cmd);						/* Start + Command index */
		WriteSPI((unsigned char)(arg >> 24));		/* Argument[31..24] */
		WriteSPI((unsigned char)(arg >> 16));		/* Argument[23..16] */
		WriteSPI((unsigned char)(arg >> 8));			/* Argument[15..8] */
		WriteSPI((unsigned char)arg);				/* Argument[7..0] */
		n = 0x01;							/* Dummy CRC + Stop */
		if (cmd == CMD0) n = 0x95;			/* Valid CRC for CMD0(0) */
		if (cmd == CMD8) n = 0x87;			/* Valid CRC for CMD8(0x1AA) */
		WriteSPI(n);
	
		/* Receive command response */
		if (cmd == CMD12) ReadSPI();		/* Skip a stuff unsigned char when stop reading */
	
		n = 10;								/* Wait for a valid response in timeout of 10 attempts */
		do
			res = ReadSPI();
		while ((res & 0x80) && --n);
		if (res > 1) return res;
	}
	

	/* Send command packet */
	WriteSPI(cmd);						/* Start + Command index */
	WriteSPI((unsigned char)(arg >> 24));		/* Argument[31..24] */
	WriteSPI((unsigned char)(arg >> 16));		/* Argument[23..16] */
	WriteSPI((unsigned char)(arg >> 8));			/* Argument[15..8] */
	WriteSPI((unsigned char)arg);				/* Argument[7..0] */
	n = 0x01;							/* Dummy CRC + Stop */
	if (cmd == CMD0) n = 0x95;			/* Valid CRC for CMD0(0) */
	if (cmd == CMD8) n = 0x87;			/* Valid CRC for CMD8(0x1AA) */
	WriteSPI(n);

	/* Receive command response */
	if (cmd == CMD12) ReadSPI();		/* Skip a stuff unsigned char when stop reading */

	n = 10;								/* Wait for a valid response in timeout of 10 attempts */
	do
		res = ReadSPI();
	while ((res & 0x80) && --n);
	
	return res;			/* Return with the response value */
}

/*--------------------------------------------------------------------------

   //Public Functions

---------------------------------------------------------------------------*/

/*-----------------------------------------------------------------------*/
/* Initialize Disk Drive                                                 */
/*-----------------------------------------------------------------------*/

DSTATUS disk_initialize (void)
{
	unsigned char n, cmd, ty, ocr[4];
	unsigned short tmr;

	spi_init();
	
#if _WRITE_FUNC
	if (MMC_SEL) disk_writep(0, 0);		/* Finalize write process if it is in progress */
#endif
	for (n = 100; n; n--) ReadSPI();	/* Dummy clocks */

	ty = 0;
	if (send_cmd(CMD0, 0) == 1) {			/* Enter Idle state */
		if (send_cmd(CMD8, 0x1AA) == 1) {	/* SDv2 */
			for (n = 0; n < 4; n++) ocr[n] = ReadSPI();		/* Get trailing return value of R7 resp */
			if (ocr[2] == 0x01 && ocr[3] == 0xAA) {				/* The card can work at vdd range of 2.7-3.6V */
				for (tmr = 12000; tmr && send_cmd(ACMD41, 1UL << 30); tmr--) ;	/* Wait for leaving idle state (ACMD41 with HCS bit) */
				if (tmr && send_cmd(CMD58, 0) == 0) {		/* Check CCS bit in the OCR */
					for (n = 0; n < 4; n++) ocr[n] = ReadSPI();
					ty = (ocr[0] & 0x40) ? CT_SD2 | CT_BLOCK : CT_SD2;	/* SDv2 (HC or SC) */
				}
			}
		}
		else {							/* SDv1 or MMCv3 */
			
			if (send_cmd(ACMD41, 0) <= 1) 	{
				ty = CT_SD1; cmd = ACMD41;	/* SDv1 */
			} else {	/* Proteus 7.x MMC sim model */
				ty = CT_MMC; cmd = CMD1;	/* MMCv3 */
			}
			for (tmr = 25000; tmr && send_cmd(cmd, 0); tmr--) ;	/* Wait for leaving idle state */
			if (!tmr || send_cmd(CMD16, 512) != 0)			/* Set R/W block length to 512 */
				ty = 0;
		}
	}
	CardType = ty;
	release_spi();

	return ty ? 0 : STA_NOINIT;
}

/*-----------------------------------------------------------------------*/
/* Read partial sector                                                   */
/*-----------------------------------------------------------------------*/

DRESULT disk_readp (
	unsigned char *buff,		/* Pointer to the read buffer (NULL:Read bytes are forwarded to the stream) */
	unsigned long lba,		/* Sector number (LBA) */
	unsigned short ofs,		/* unsigned char offset to read from (0..511) */
	unsigned short cnt		/* Number of bytes to read (ofs + cnt mus be <= 512) */
)
{
	DRESULT res;
	unsigned char rc;
	unsigned short bc;

	if (!(CardType & CT_BLOCK)) lba *= 512;		/* Convert to unsigned char address if needed */

	res = RES_ERROR;
	if (send_cmd(CMD17, lba) == 0) {		/* READ_SINGLE_BLOCK */

		bc = 30000;
		do {							/* Wait for data packet in timeout of 100ms */
			rc = ReadSPI();
		} while (rc == 0xFF && --bc);

		if (rc == 0xFE) {				/* A data packet arrived */
			bc = 514 - ofs - cnt;

			/* Skip leading bytes */
			if (ofs) {
				do ReadSPI(); while (--ofs);
			}

			/* Receive a part of the sector */
			if (buff) {	/* Store data to the memory */
				do
					*buff++ = ReadSPI();
				while (--cnt);
			} else {	/* Forward data to the outgoing stream (depends on the project) */
				//do
					//xmit(rcv_spi());	/* (Console output) */
				//while (--cnt);
			}

			/* Skip trailing bytes and CRC */
			do ReadSPI(); while (--bc);

			res = RES_OK;
		}
	}

	release_spi();

	return res;
}

/*-----------------------------------------------------------------------*/
/* Write partial sector                                                  */
/*-----------------------------------------------------------------------*/
#if _WRITE_FUNC

DRESULT disk_writep (
	const unsigned char *buff,	/* Pointer to the bytes to be written (NULL:Initiate/Finalize sector write) */
	unsigned long sa			/* Number of bytes to send, Sector number (LBA) or zero */
)
{
	DRESULT res;
	unsigned short bc;
	static unsigned short wc;

	res = RES_ERROR;

	if (buff) {		/* Send data bytes */
		bc = (unsigned short)sa;
		while (bc && wc) {		/* Send data bytes to the card */
			WriteSPI(*buff++);
			wc--; bc--;
		}
		res = RES_OK;
	} else {
		if (sa) {	/* Initiate sector write process */
			if (!(CardType & CT_BLOCK)) sa *= 512;	/* Convert to unsigned char address if needed */
			if (send_cmd(CMD24, sa) == 0) {			/* WRITE_SINGLE_BLOCK */
				WriteSPI(0xFF); WriteSPI(0xFE);		/* Data block header */
				wc = 512;							/* Set unsigned char counter */
				res = RES_OK;
			}
		} else {	/* Finalize sector write process */
			bc = wc + 2;
			while (bc--) WriteSPI(0);	/* Fill left bytes and CRC with zeros */
			if ((ReadSPI() & 0x1F) == 0x05) {	/* Receive data resp and wait for end of write process in timeout of 300ms */
				for (bc = 65000; ReadSPI() != 0xFF && bc; bc--) ;	/* Wait ready */
				if (bc) res = RES_OK;
			}
			release_spi();
		}
	}

	return res;
}
#endif

HardwareProfile.h
Code:
#ifndef HARDWARE_PROFILE_H
#define HARDWARE_PROFILE_H

	// Defines required for the USB stack
    #define self_power          1
    #define USE_USB_BUS_SENSE_IO
	#define USB_BUS_SENSE       1
    #define DEMO_BOARD PICDEM_FS_USB
    #define PICDEM_FS_USB
    #define CLOCK_FREQ 48000000

	// Fosc frequency (48 Mhz)
	#define _XTAL_FREQ 48000000
	
	// Port Controls  (Platform dependent)
	#define SS_TRIA			TRISA5			// sstris = 0
	#define SS_LATA			LATA5			// select = 0 deselect = 1
	#define	MMC_SEL		1	// MMC CS status (true:selected)
 
	// Port "D" LCD Input/Output Pins 
	#define	LCD_RS			RD0
	#define LCD_RW			RD1
	#define LCD_EN			RD2
	#define LCD_RST			RD3
	#define	LCD_DB4			RD4
	#define LCD_DB5			RD5
	#define LCD_DB6			RD6
	#define LCD_DB7			RD7

    // I/O pin definitions
    #define INPUT_PIN 1
    #define OUTPUT_PIN 0
	
#endif

Here my code structure;
diskio.c
lcd.c
main.c
pff.c

diskio.h
HardwareProfile.h
lcd.h
pff.h
diskio.h
 
Last edited:

just testing out the CK on PORTB1 and a get a pulsating 5Volt... my PIC is powered by a 5V and my SD slot on a 3.3V.. As i can see the SD card is powered by a ~3V and his clock signal should be at ~3V right? what should i do? a voltage divider with a resistor? or there is an option to set the port output voltage on the PIC?

Applying 5V signals directly to the SD card is most likely the issue. You may want to test the card with a SD USB reader with a PC to ensure it has not been damage.

I typically use a level translator or bidirectional transceiver like the 74LCX245. A resistive voltage divider may work, but I've not employed that technique.

74LCX245 Low Voltage Bidirectional Transceiver.

Having a few level translators or bidirectional transceivers on hand, comes in handy when designing with devices with several operating voltage levels.

Actually, in the case of SD or MMC Socket breakout boards, I usually keep several on hand with 74LCX245s incorporated in the board.

There are numerous manufactures which sell them with bidirectional transceivers builtin.

Gravitech SD/MMC Card Adapter

Gravitech SD/MMC Card Adapter Schematic

I would suggest correcting the voltage mismatch and then retesting your code.

BigDog
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top