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] Problem interfacing mmc with pic on isis

Status
Not open for further replies.

ramoneb

Newbie level 6
Newbie level 6
Joined
Oct 6, 2012
Messages
14
Helped
2
Reputation
6
Reaction score
3
Trophy points
1,283
Activity points
1,375
**broken link removed**


Code:
  sfr sbit Mmc_Chip_Select at RC0_bit;
  sfr sbit Mmc_Chip_Select_Direction at TRISC0_bit;
  int i;
  void main() {
    ADCON1 |= 0x0F;
    CMCON  |= 7;
    trisa = 0x00;
    trisc=0b00000000;
    trisb=0b00000001;

      i=1;
     SPI1_Init_Advanced(_SPI_MASTER_OSC_DIV64, _SPI_DATA_SAMPLE_MIDDLE, _SPI_CLK_IDLE_LOW, _SPI_LOW_2_HIGH);


    porta=0b00000001;

    while(i==1)
    {
    i=Mmc_Init();

  }   porta=0b00000000;
  }

where is the problem ?
 

Re: interfacing mmc with pic on isis

according to your code the led must be off when the sd card is detected
i already have the same problem , i can't help you
 
Re: interfacing mmc with pic on isis

Level shifting the MMC/SD interface to 3.3v is certainly required in physical hardware and maybe required in simulation as well.

The MMC/SD interface is by no means 5v tolerant.


BigDog
 

Re: interfacing mmc with pic on isis

An ATTiny2313 can operate within a voltage range of 2.7V to 5.5V.

The video you're referring to gives no indication of the actual operating voltage of the ATTiny2313
within the simulation, therefore it proves/disproves nothing in regards to this matter.


BigDog
 
Re: interfacing mmc with pic on isis

thank you BigDog for your help, we will try to make it work with 3.3 V tomorrow, and I will Report back our progress.
 

Re: interfacing mmc with pic on isis

Hi,
the problem was:
I had to connect SDO of MMC with SDI of PIC and SDO of pic with SDI of MMC.
there is no problem with voltage in Simulation.
Thank you
 
Re: interfacing mmc with pic on isis

the problem was:
I had to connect SDO of MMC with SDI of PIC and SDO of pic with SDI of MMC.
there is no problem with voltage in Simulation.

It is good info to know for future issues.

Of course in hind sight the clear indicator of switched lines is the logic contention indicator (yellow indicator) next to the MMC DO pin.

.... connect SDO of MMC with SDI of PIC and SDO of pic with SDI of MMC.

If this is the case, then the labels on the MMC are in reference to the SPI Master device (PIC) rather then the Slave device.

Therefore, a more proper designation for the MMC lines would be Master Data Input (MDI) and Master Data Output (MDO), rather than Slave Data Input (SDI) and Slave Data Output (SDO).

MISO - SDO - (M)DI

MOSI - SDI - (M)DO
 
Re: interfacing mmc with pic on isis

how we will choose the clocking for pic16f877a ,how to set the corresponding polarity and edge of pic clock .CKE AND CKP
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top