6660611-64MB-MMC-and-PIC-Micro-Controller.pdf

(237 KB) Pobierz
64MB MMC and PIC Microcontroller
MMC memory card with PIC16F877 letter of a Multimedia Card (MMC) at each
PIC Mikrocontroller /Lesen over mirror-image interface (MMC 64MB and PIC
Microcontroller) a software related mirror-image interface makes possible the
connection. Connection diagram, theory about mirror-image interface, theory
about MMC, signal diagrams, program in C (CC5X).
+
MMC (Multimedia Card) here
64MB.
- Enormous FLASH - memory.
- Very fast.
-300000 write accesses.
- Vintages without restriction.
- Connection to the SPADES with 4
lines.
The PIC16F877 has:
- Mirror-image interface
- RS232 interface
- of 8 entrances for the similar to/digital
transducer (10Bit)
1281872196.044.png 1281872196.045.png
Pin Contraction Function
Pin Contraction Function
1 /CS
Chip activating
18 RC2
Digitally OUT
2 DATA IN Data input
24 SDO
MIRROR-IMAGE data
output
3 GND
-
-
-
-
4 Vdd
Voltage supply
-
-
-
5 CLK
Clocking line
18 SCL
MIRROR-IMAGE
Clock
6 GND
-
-
-
-
7 DATA OUT Data output
23 SDI
MIRROR-IMAGE data
input
Circuit and connection diagram MMC need as voltage supply 2,7V 3,6V. We
must use an in any case voltage regulator for 3,3V, for example CS5203. PIC
processors can be operated with tensions between 2V and 5,5V. Thus one
could agree with the supply of both units on 3,3V. Then it is also possible to
connect MMC directly with the micro CONTROLLER. Due to considerations that
the AD transducer and serial communication with 5V functions more stably it is
operated, in this circuit of the PIC16F877 nevertheless with 5V. But the micro
CONTROLLER exits SDO, SCL, /CS get in each case a voltage divider, so that
the MMC entrances receive only 3,2V. The entrances of the microprocessor do
not need reinforcement of 3,3V on 5,0V, because the PIC understands 3,3V
anyway as logical "1"
1281872196.046.png 1281872196.047.png 1281872196.001.png 1281872196.002.png 1281872196.003.png 1281872196.004.png 1281872196.005.png 1281872196.006.png 1281872196.007.png
.
How does MIRROR-IMAGE ONE actually function? MIRROR-IMAGE ONE is a
serial synchronous interface. It means synchronous that each bit is
received/sent during a clock pulse
1281872196.008.png
In the picture we see a register, where a byte will receive sent and. There were
2 clock pulses to bit 7 and bit 6 is sent over OUT. And 2 bits (also 7, 6) from new
byte receive. After 8 clock pulses the byte which can be sent is completely
"raus" and the received byte complete in the register. If the PIC works as
master, then it produces the clock pulses, which a Slave equipment needs to be
able to receive in order to push in time its register and thus send correct bits/.
With PIC Microcontrollern it is sufficient to transfer into the SSPBUF register a
byte, thus it begins this byte to send and a new receive. One may select
however not too early (while it pushes data) SSPBUF. Therefore we examine
the BF flag, it are reset during the transmission procedure. MMC one may to
20MHz clocks (CLK).
The MIRROR-IMAGE interface of the PIC can be stopped maximally to 5MHz. If
one has however long lines between PIC and MMC, then one must stop the
clock frequency lower, otherwise the signal form gets broken and it to happen
the errors. (with me there is 15cm lines).
The
following diagram shows attitude possibilities for MIRROR-IMAGE interfaces
with PIC's
MMC initializing in mirror-image mode
1281872196.009.png 1281872196.010.png
0 tension 1 sending 80 clock pulses 2 /CS activating, /CS=0, (1 passively) 3
sending CMD0 4 confirmation byte = 0x01? if no ERROR if 5 sends 8 clock
pulses
to 6 sending CMD1 7 confirmation byte = 0x00?wenn no go to 6 if 8 send 8
clock pulses MMC initialization into mirror-image mode finally
Executable program, description of function
This function serves for spending messages. In
order to send an indication serially, these
instructions are used. Function sends b over
MIRROR
SerString("Hallo Welt")
This function serves for spending messages. In
order to send an indication serially, these
instructions are used. Function sends b over
MIRROR
while (!TXIF); //_ Prüfen ob
Register TXREG leer ist
TXREG ='W'; // Buchstabe "W"
seriell senden
This function serves for spending messages. In
order to send an indication serially, these
instructions are used. Function sends b over
MIRROR
a=SPI(b);
Command(0x49,0,512,0xFF );
This function serves for spending messages. In
order to send an indication serially, these
1281872196.011.png 1281872196.012.png 1281872196.013.png 1281872196.014.png 1281872196.015.png 1281872196.016.png 1281872196.017.png 1281872196.018.png 1281872196.019.png 1281872196.020.png 1281872196.021.png 1281872196.022.png 1281872196.023.png 1281872196.024.png 1281872196.025.png 1281872196.026.png 1281872196.027.png 1281872196.028.png 1281872196.029.png 1281872196.030.png 1281872196.031.png 1281872196.032.png 1281872196.033.png 1281872196.034.png 1281872196.035.png 1281872196.036.png 1281872196.037.png 1281872196.038.png 1281872196.039.png 1281872196.040.png 1281872196.041.png 1281872196.042.png 1281872196.043.png
Zgłoś jeśli naruszono regulamin