CN102254202B - Memory stick (MS) card control system and read-write method - Google Patents

Memory stick (MS) card control system and read-write method Download PDF

Info

Publication number
CN102254202B
CN102254202B CN 201110219176 CN201110219176A CN102254202B CN 102254202 B CN102254202 B CN 102254202B CN 201110219176 CN201110219176 CN 201110219176 CN 201110219176 A CN201110219176 A CN 201110219176A CN 102254202 B CN102254202 B CN 102254202B
Authority
CN
China
Prior art keywords
card
waveform
interface
microcontroller
check code
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN 201110219176
Other languages
Chinese (zh)
Other versions
CN102254202A (en
Inventor
孙银明
田勇
王敏
敬饴
胡俊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xinjiang Xintuan Technology Group Co ltd
Original Assignee
IPGoal Microelectronics Sichuan Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by IPGoal Microelectronics Sichuan Co Ltd filed Critical IPGoal Microelectronics Sichuan Co Ltd
Priority to CN 201110219176 priority Critical patent/CN102254202B/en
Publication of CN102254202A publication Critical patent/CN102254202A/en
Application granted granted Critical
Publication of CN102254202B publication Critical patent/CN102254202B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Transfer Systems (AREA)

Abstract

The invention discloses a memory stick (MS) card control system for controlling read-write operation on an MS card. The MS card control system comprises a micro control unit, a micro control unit interface, an MS card waveform generator, a check code circuit and an MS card interface, wherein the micro control unit interface is connected with the micro control unit; the MS card waveform generator is connected with the micro control unit interface and used for generating a command waveform required for controlling the MS card; the check code circuit is connected between the micro control unit interface and the MS card waveform generator and used for generating a check code special for the MS card; the MS card interface is connected with the MS card waveform generator and is in plugging connection with the MS card. The invention also provides an MS card read-write method. By the invention, the application problem of the MS card in low-cost fields is solved.

Description

MS card control system and reading/writing method
Technical field
The present invention relates to a kind of control system and reading/writing method, espespecially a kind of MS card control system and reading/writing method of low-cost and high-performance.
Background technology
MS(Memory Stick) card is a kind of flash memory cards of removable, and a kind of as smart card is widely used on market, from common card reader to digital camera etc., can use the MS card.
Existing MS card control circuit major part is the special knowledge property right core that uses, and is pure hardware design, is characterized in compatible good, and the speed of read-write MS card is fast, supports simultaneously parallel and two kinds of patterns of serial, is also the method for designing of the MS card of main flow.It is very high that but its shortcoming is design cost, is unfavorable for the popularization of low-end market.The method for designing of another MS card is to use GPIO(General Purpose Input Output, universal input/output), simulate by software fully, although this method can reduce design cost, but read or write speed is too slow, and performance is low, and to MCU(Micro Control Unit, microprocessor) requirement is also higher, takies a large amount of MCU resource and the program space.Therefore need considering cost and performance in field cheaply, solve the application problem that MS is stuck in low-cost field.
Summary of the invention
In view of above content, be necessary to provide a kind of MS card control system and reading/writing method of low-cost and high-performance.
A kind of MS card control system, be used for to control the read-write operation to a MS card, described MS card control system comprises that the check code circuit and that the MS card waveform generator, for generation of the needed command waveform of the described MS card of control that a microcontroller, a microcontroller interface that is connected with described microcontroller, are connected with described microcontroller interface is connected between described microcontroller interface and described MS card waveform generator for generation of the check code of described MS card special use is connected with described MS card waveform generator for the MS card interface of the described MS card of pegging graft.
A kind of MS card reading/writing method is used for a MS card is carried out read-write operation, and described MS card reading/writing method comprises the following steps:
One microcontroller reads the reading order of described MS card by a microcontroller interface transmission one;
Described reading order is encoded through a check code circuit, and the check code of described MS calorie requirement is read in generation one;
The waveform that described microcontroller selects described reading order to need by a waveform selected cell in a sets of waveforms unit;
Waveform, the described reading order selected and the check code that reads described MS calorie requirement are combined be sent to a data synthesis unit, produce a command waveform that reads described MS calorie requirement after described data synthesis unit is synthetic with waveform, described reading order and the described check code selected and be sent to a MS card interface by a MS card interface control module;
Described microcontroller reads the data of designated length and corresponding check code from described MS card interface, whether correctly passes through simultaneously described check code circuit checks data, completes the read operation to described MS card;
Described microcontroller writes the order that writes of described MS card by described microcontroller interface transmission one;
The said write order is encoded through described check code circuit, and generation one writes the check code of described MS calorie requirement;
The waveform that described microcontroller selects the said write order to need by described waveform selected cell in described sets of waveforms unit;
Waveform, the said write order selected and the check code that writes described MS calorie requirement are combined be sent to described data synthesis unit, produce a command waveform that writes described MS calorie requirement after described data synthesis unit is synthetic with waveform, said write order and the described check code selected and be sent to described MS card interface by described MS card interface control module; And
Described microcontroller writes the data of designated length to described MS card interface, and the check code of these data is sent to described MS card interface, completes the write operation to described MS card.
Relative prior art, MS card control system of the present invention and reading/writing method design cost are low, simple to operate, and have improved the performance of system, efficiently solve the application problem that MS is stuck in low-cost field.
Description of drawings
Fig. 1 is the system architecture diagram of MS card control of the present invention system better embodiment.
Fig. 2 is the system architecture diagram of MS card waveform generator inside in Fig. 1 of the present invention.
Fig. 3 is the process flow diagram of MS card reading/writing method better embodiment of the present invention.
Embodiment
See also Fig. 1, MS card control of the present invention system better embodiment comprises that MS card waveform generator, that a microcontroller (MCU), a microcontroller interface that is connected with this microcontroller, are connected with this microcontroller interface is connected in check code circuit and the MS card interface that is connected with this MS card waveform generator between this microcontroller interface and this MS card waveform generator.In the present embodiment, this microcontroller is 8,16 or the single-chip microcomputer of 32 of a market mainstream; This microcontroller interface is the bus interface of this MS card control system, is used for connecting this microcontroller, and this microcontroller interface can be according to the difference of microcontroller and difference; This MS card interface is used for connecting a MS card; This MS card waveform generator can produce for the needed command waveform of this MS card of control, and is sent to this MS card interface; This check code circuit is for generation of the check code of this MS card special use, to guarantee the correctness of the transmission of data.
See also Fig. 2, Fig. 2 is the system architecture diagram of this MS card waveform generator inside.This MS card waveform generator comprises a waveform selected cell, a sets of waveforms unit that is connected with this waveform selected cell, data synthesis unit and a MS card interface control module that is connected with this data synthesis unit that is connected with this sets of waveforms unit.This waveform selected cell is used for selecting the specific waveforms of sets of waveforms unit.This sets of waveforms unit is for generation of five kinds of specific waveforms of MS card need of work: waveform A, waveform B, waveform C, waveform D and waveform E, these waveforms split by the MS card control waveform of standard.This data synthesis unit is used for control command, check code and waveform are synthesized the control waveform of MS card, for example: the write operation of MS card is needed combined waveform A, waveform C and three kinds of waveforms of waveform E to add to write order and check code is realized, this waveform selected cell is first selected these the three kinds of waveforms in the sets of waveforms unit, then this data synthesis unit with these three kinds of waveforms with write order and check code and be sent to MS card interface control module after synthetic.This MS card interface control module is used for controlling the interface signal of MS card, comprises line status (BS) signal, serial clock (SCK) signal and data input and output (DIO) signal.
System can realize MS card read-write operation by MS card control of the present invention, and hardware cost is cheap, and performance is improved significantly, and has effectively solved the application problem that MS is stuck in low-cost field.
See also Fig. 3, MS card reading/writing method better embodiment of the present invention comprises the following steps:
Step 1, microcontroller sends one for the reading order that reads the MS card by microcontroller interface.
Step 2, reading order is encoded through the check code circuit, produces the check code of a MS calorie requirement.
Step 3, one or more waveform (referring to waveform A, waveform B, waveform C, waveform D, one or more in waveform E) that microcontroller selects reading order to need by the waveform selected cell in MS card waveform generator in the sets of waveforms unit.
Step 4, waveform, reading order and the check code selected are combined be sent to the data synthesis unit, produce the command waveform of controlling the MS calorie requirement after the data synthesis unit is synthetic with waveform, reading order and the check code selected and be sent to the MS card interface by MS card interface control module.
Step 5, microcontroller read data and the check code of designated length from the MS card interface, whether correctly pass through simultaneously check code circuit checks data, complete the read operation to the MS card.
Step 6, microcontroller sends one for the order that writes that writes the MS card by microcontroller interface.
Step 7 writes order and encodes through the check code circuit, produces the check code of a MS calorie requirement.
Step 8, microcontroller select to write one or more waveform (referring to waveform A, waveform B, waveform C, waveform D, one or more in waveform E) that order needs in the sets of waveforms unit by the waveform selected cell in MS card waveform generator.
Step 9, with the waveform selected, write order and check code and combine and be sent to the data synthesis unit, produce the command waveform of controlling the MS calorie requirement after the data synthesis unit is synthetic with waveform, reading order and the check code selected and be sent to the MS card interface by MS card interface control module.
Step 10, microcontroller write the data of designated length to the MS card interface, data will be calculated through the check code circuit simultaneously, and the check code with these data also sends to the MS card interface at last, completes the write operation to the MS card.
Wherein, different order datas and corresponding waveform combination can realize different MS card operational orders.
In the card reader chip design of a pure hardware MS card operation of use, use this invention, can obviously reduce system cost, and can with Properties Control within limits, conveniently be applied to low-cost field; In a multimedia play system, replace the MS card read-write of original pure software by this invention and control, can increase substantially read or write speed, make broadcast more smooth, can not increase system cost yet; In an acquisition system that there is no a MS card storage, can simply expand MS card read-write control circuit by this invention, for providing more storage card, acquisition system selects.
MS card control system of the present invention and reading/writing method design cost are low, simple to operate, and have improved the performance of system, efficiently solve the application problem that MS is stuck in low-cost field.

Claims (7)

1. MS card control system, be used for controlling the read-write operation to a MS card, it is characterized in that: described MS card control system comprises a microcontroller, one microcontroller interface that is connected with described microcontroller, the one MS card waveform generator for generation of the needed command waveform of the described MS card of control that is connected with described microcontroller interface, one is connected between described microcontroller interface and described MS card waveform generator check code circuit and for generation of the check code of described MS card special use is connected with described MS card waveform generator and is used for pegging graft the MS card interface of described MS card, described MS card waveform generator comprises a waveform selected cell, the one sets of waveforms unit that is connected with described waveform selected cell, one data synthesis unit and a MS card interface control module that is connected with described data synthesis unit that is connected with described sets of waveforms unit, described waveform selected cell is used for selecting according to a control command specific waveforms of sets of waveforms unit, described sets of waveforms unit is for generation of five kinds of specific waveforms of described MS card need of work, described five kinds of specific waveforms are split by the MS card control waveform of standard, described data synthesis unit is with described control command, the specific waveforms of one check code and selection synthesizes the control waveform of described MS card, described MS card interface control module is used for controlling a line state signal of described MS card, one serial clock signal and a data input/output signal.
2. MS card control as claimed in claim 1 system is characterized in that: described microcontroller is one 8,16 or 32 s' single-chip microcomputer.
3. MS card control as claimed in claim 1 system is characterized in that: described microcontroller interface is the bus interface of described MS card control system, and described microcontroller interface is according to the difference of described microcontroller and difference.
4. a MS card reading/writing method, be used for a MS card is carried out read-write operation, and described MS card reading/writing method comprises the following steps:
One microcontroller reads the reading order of described MS card by a microcontroller interface transmission one;
Described reading order is encoded through a check code circuit, and the check code of described MS calorie requirement is read in generation one;
The waveform that described microcontroller selects described reading order to need by a waveform selected cell in a sets of waveforms unit;
Waveform, the described reading order selected and the check code that reads described MS calorie requirement are combined be sent to a data synthesis unit, produce a command waveform that reads described MS calorie requirement after described data synthesis unit is synthetic with waveform, described reading order and the described check code selected and be sent to a MS card interface by a MS card interface control module;
Described microcontroller reads the data of designated length and corresponding check code from described MS card interface, whether correctly passes through simultaneously described check code circuit checks data, completes the read operation to described MS card;
Described microcontroller writes the order that writes of described MS card by described microcontroller interface transmission one;
The said write order is encoded through described check code circuit, and generation one writes the check code of described MS calorie requirement;
The waveform that described microcontroller selects the said write order to need by described waveform selected cell in described sets of waveforms unit;
Waveform, the said write order selected and the check code that writes described MS calorie requirement are combined be sent to described data synthesis unit, produce a command waveform that writes described MS calorie requirement after described data synthesis unit is synthetic with waveform, said write order and the described check code selected and be sent to described MS card interface by described MS card interface control module; And
Described microcontroller writes the data of designated length to described MS card interface, and the check code of these data is sent to described MS card interface, completes the write operation to described MS card.
5. MS card reading/writing method as claimed in claim 4 is characterized in that: described microcontroller is one 8,16 or 32 s' single-chip microcomputer.
6. MS card reading/writing method as claimed in claim 4 is characterized in that: described microcontroller interface is the bus interface of described MS card control system, and described microcontroller interface is according to the difference of described microcontroller and difference.
7. MS card reading/writing method as claimed in claim 4, it is characterized in that: described waveform selected cell is used for selecting according to a control command specific waveforms of described sets of waveforms unit, described sets of waveforms unit is for generation of five kinds of specific waveforms of described MS card need of work, and described five kinds of specific waveforms are split by the MS card control waveform of standard.
CN 201110219176 2011-08-02 2011-08-02 Memory stick (MS) card control system and read-write method Expired - Fee Related CN102254202B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201110219176 CN102254202B (en) 2011-08-02 2011-08-02 Memory stick (MS) card control system and read-write method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201110219176 CN102254202B (en) 2011-08-02 2011-08-02 Memory stick (MS) card control system and read-write method

Publications (2)

Publication Number Publication Date
CN102254202A CN102254202A (en) 2011-11-23
CN102254202B true CN102254202B (en) 2013-06-19

Family

ID=44981452

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201110219176 Expired - Fee Related CN102254202B (en) 2011-08-02 2011-08-02 Memory stick (MS) card control system and read-write method

Country Status (1)

Country Link
CN (1) CN102254202B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN2754157Y (en) * 2004-11-02 2006-01-25 姚立和 Dual-interface storage card with signal isolating device
CN101082958A (en) * 2007-06-27 2007-12-05 凯瑞德电子(深圳)有限公司 General purpose data storing card recognizing/reading and data interchange device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4236440B2 (en) * 2002-10-09 2009-03-11 株式会社ルネサステクノロジ IC card

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN2754157Y (en) * 2004-11-02 2006-01-25 姚立和 Dual-interface storage card with signal isolating device
CN101082958A (en) * 2007-06-27 2007-12-05 凯瑞德电子(深圳)有限公司 General purpose data storing card recognizing/reading and data interchange device

Also Published As

Publication number Publication date
CN102254202A (en) 2011-11-23

Similar Documents

Publication Publication Date Title
CN102087606B (en) FPGA configuration file update device
US7496703B2 (en) Virtual IDE card reader with PCI express interface
US7225289B2 (en) Virtual IDE storage with PCI express interface
CN103034603A (en) Multi-channel flash memory card control device and control method thereof
CN100458697C (en) User program guiding method and system
CN108536623A (en) Multichannel NAND Flash controllers and movable storage device
CN102279820A (en) Data storage device and control method based on SPI interface
CN101739322B (en) Test device and method of embedded system
CN101777033A (en) Storage card extension device
CN101515436A (en) Embedded LED display screen control system
CN202584143U (en) A read-only card reader with multiple interfaces
CN102254202B (en) Memory stick (MS) card control system and read-write method
CN202189379U (en) Ms card control system
CN101866695B (en) Method for Nandflash USB controller to read and write Norflash memory
CN100585627C (en) SD card control circuit and reading/writing method thereof based on the FLASH bus
CN103902298A (en) Instruction set firmware recovery state information setting method and device
CN202995718U (en) OTG (on-the-go) data card reading line
CN201323065Y (en) Compatible computer for USB flash disk
CN201142081Y (en) High efficiency low cost SD card control circuit based on FLASH bus
CN203038662U (en) Touch screen multimedia player based on ARM-Linux
CN104714892A (en) Data access command execution method and flash memory device using the same
CN201160301Y (en) Interface conversion device and television having the same
CN103136556A (en) Standard deviation (SD) composite device and read-write method thereof
CN117406934B (en) Flash memory data access method, electric quantity calculation method, device and storage medium
CN100378638C (en) External MS memory card interface switching device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C56 Change in the name or address of the patentee
CP02 Change in the address of a patent holder

Address after: 610041 Sichuan city of Chengdu province high tech Zone Kyrgyzstan Road 33 block A No. 9

Patentee after: IPGoal Microelectronics (Sichuan) Co.,Ltd.

Address before: 402 room 7, building 610041, incubator Park, hi tech Zone, Sichuan, Chengdu

Patentee before: IPGoal Microelectronics (Sichuan) Co.,Ltd.

TR01 Transfer of patent right

Effective date of registration: 20201217

Address after: Room 705, building 2, No. 515, No. 2 street, Baiyang street, Qiantang New District, Hangzhou City, Zhejiang Province

Patentee after: Zhejiang zhexin Technology Development Co.,Ltd.

Address before: 9 / F, block a, 33 Jitai Road, high tech Zone, Chengdu, Sichuan 610041

Patentee before: IPGoal Microelectronics (Sichuan) Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20210427

Address after: 835221 Electronic Information Industrial Park, Horgos Industrial Park, Yili Kazak Autonomous Prefecture, Xinjiang Uygur Autonomous Region (West of Beijing Road and north of Suzhou Road)

Patentee after: Xinjiang xintuan Technology Group Co.,Ltd.

Address before: Room 705, building 2, No. 515, No. 2 street, Baiyang street, Qiantang New District, Hangzhou City, Zhejiang Province

Patentee before: Zhejiang zhexin Technology Development Co.,Ltd.

TR01 Transfer of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20130619

Termination date: 20210802

CF01 Termination of patent right due to non-payment of annual fee