CN1450466A - Method for setting master-slave USB interface in MP3 player - Google Patents

Method for setting master-slave USB interface in MP3 player Download PDF

Info

Publication number
CN1450466A
CN1450466A CN 03114256 CN03114256A CN1450466A CN 1450466 A CN1450466 A CN 1450466A CN 03114256 CN03114256 CN 03114256 CN 03114256 A CN03114256 A CN 03114256A CN 1450466 A CN1450466 A CN 1450466A
Authority
CN
China
Prior art keywords
usb
player
mcu
circuit
system program
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.)
Granted
Application number
CN 03114256
Other languages
Chinese (zh)
Other versions
CN1188788C (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.)
Individual
Original Assignee
Individual
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 Individual filed Critical Individual
Priority to CNB031142567A priority Critical patent/CN1188788C/en
Publication of CN1450466A publication Critical patent/CN1450466A/en
Application granted granted Critical
Publication of CN1188788C publication Critical patent/CN1188788C/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Power Sources (AREA)

Abstract

The invention is a method for setting principal and subordinate USB interface in MP3 player, the steps include: sets a system circuit board in the MP3 player, the mentioned includes MCU which has function of USB control and MP3 decoding; especially the method also includes: adds a USB principal control chip on the system circuit board, the system examines that if the player connects any USB appliance or not, if yes, judges that it is from the USB plug end or the socket end; if it is the socket end, the system procedure tests the type of the opposite appliance and receives the operation injections from the buttons to carry on correspondent operation.

Description

The method of principal and subordinate USB interface is set in the MP3 player
Technical field the present invention relates to interconnection or the transmission processing of request method of information between storer, input-output apparatus or central processing unit; The method of principal and subordinate USB interface especially is set in the MP3 player.
The USB of background technology prior art (general serial data bus) interface mobile memory (USB flash disk) and MP3 player be one " from " USB device, be that a USB plug (USB Series " A " Plug) is set itself, insert the USB socket (USB " A " Receptacle) of " master " USB device, this " master " equipment all is microcomputer usually, storage, deleted file or download song have only by microcomputer and just can finish, and make the application of the said equipment be subjected to certain restriction.Number of patent application for example: 00801620 Chinese patent application discloses the technical scheme of a kind of " electronic installation with USB interface " by name, also be with itself as " from " machine, connect with " master " machine (microcomputer), realize the file data download and carry out main frame other operations this machine; Do not relate in device itself and set up the USB main control chip, make the content that itself possesses " master " USB device function.
The summary of the invention the technical problem to be solved in the present invention is to avoid above-mentioned the deficiencies in the prior art part and propose a kind of method that principal and subordinate USB interface is set in the MP3 player.The present invention at first increases by a USB main control chip based on system bus on system circuit board, again the cell voltage of this machine being elevated to 5V uses for main control chip, another measure is that driver is solidificated in the program storage of former MCU (single chip microcomputer), in addition some handshake lines are set between main control chip and MCU and control, also on this machine, set up " master " USB socket so that and other " from " the USB device connection.
The present invention solves the problems of the technologies described above can be by realizing by the following technical solutions: be implemented in the method that principal and subordinate USB interface is set in the MP3 player, its step comprises:
A., one system circuit board is set in the MP3 player, comprises the MCU of band USB control function and MP3 decoding function on the described circuit board, FLASH (flash memory), SDRAM (random access memory), bus, D/A change-over circuit and analog amplify circuit;
B. in the MP3 player, battery pas power source is set, powers to total system;
C. on the MP3 player, earphone socket is set, is used to connect earphone and analog amplify circuit;
D. on the MP3 player, USB plug is set, is used for being connected with the microcomputer USB interface;
E., LCDs is set on the MP3 player to be connected with MCU;
Especially described method step also comprises:
F. on described system circuit board, set up the USB main control chip, USB socket, electric power management circuit, booster circuit and handshake line;
G., the USB main control chip is set to be connected with booster circuit with USB socket, bus, handshake line;
H., MCU is set to be connected with electric power management circuit; Described electric power management circuit connects battery and booster circuit;
I. the system program of controlling each element circuit co-ordination is arranged in the program storage of MCU;
J. after being arranged on start or system reset, system program at first carries out the initialization setting to each element circuit among the MCU;
K. system program checks whether this machine connects with any USB device then, and if any connection, judgement is to insert from the USB plug port, still inserts from the USB socket port;
1. if insert from the USB plug port, then system program changes the driver module from USB over to, realizes other operations to this machine (slave) of file data download and response main frame;
2. if insert from the USB socket port, system program changes main USB driver module over to, detects the type to method, apparatus, and shows the type to method, apparatus on LCDs; Accept that operational order is operated accordingly and display operation process on LCDs;
L. check that through system program this machine does not connect with any USB device, then the system program action button of patrolling and examining the MP3 player has or not and is pressed, this process of patrolling and examining continues for some time, if there is button to be pressed, just carry out the operation of corresponding MP3 player, if there is not button to be pressed, then system program withdraws from from the process of patrolling and examining, and changes holding state over to;
M. after entering holding state, all devices that possess sleep mode all enter park mode, to save the energy content of battery;
N. under holding state, any operation can wake MCU and other devices up, enters corresponding normal operation.
The other side's device type that inserts with the USB socket port comprises: MP3 player, USB mobile memory, digital camera and printer.
The various action names and the process that can show action name, process and conduct " master " equipment of MP3 player on the LCDs respectively.
The handshake line is set to be comprised: the signal wire that the USB main control chip interrupts to the MCU request, the regression line of MCU, the control line of MCU, the special mark signal wire of USB main control chip.
Compared with prior art, adopt the MP3 player of technique scheme manufacturing not only can connect and carry out exchanges data, other operational orders of file in download, song and execution microcomputer with microcomputer; Can also directly link such as MP3 player, digital camera, USB mobile memory and printer apparatus with other, operate accordingly, make application convenient.
Description of drawings Fig. 1 is the present invention is provided with the method for principal and subordinate USB interface in the MP3 player a theory diagram;
Fig. 2 be the embodiment of the invention with other USB " from " equipment connect synoptic diagram;
Fig. 3 is the workflow diagram of the embodiment of the invention.
Embodiment is done further detailed explanation below in conjunction with accompanying drawing to the present invention; According to Fig. 1 as can be known: be implemented in the method that principal and subordinate USB interface is set in the MP3 player, its step comprises:
One system circuit board 10 is set in the MP3 player, comprises the MCU 20 of band USB control function and MP3 decoding function on the described circuit board 10, FLASH 60, and SDRAM 50, bus 40, D/A change-over circuit 110 and analog amplify circuit 120;
Battery 70 is set in the MP3 player does power supply, power to total system;
Earphone socket 130 is set on the MP3 player, is used to connect earphone and analog amplify circuit 120;
USB plug 90 is set on the MP3 player, is used for being connected with the USB interface of microcomputer or other " master " USB device;
LCDs 80 is set on the MP3 player to be connected with MCU 20;
Especially described method step also comprises: set up USB main control chip 30 on described system circuit board 10, USB socket 100, electric power management circuit 75, booster circuit 140 and handshake line 25;
USB main control chip 30 is set to be connected with USB socket 100, bus 40, handshake line 25 and booster circuit 140;
MCU 20 is set to be connected with electric power management circuit 75; Described electric power management circuit 75 connects battery 70 and booster circuit 140;
The system program of controlling each element circuit co-ordination is solidificated in the program storage of MCU 20;
After being arranged on start or system reset, system program at first carries out the initialization setting to each element circuit among the MCU 20;
System program checks whether this machine connects with any USB device then, and if any connection, judgement is to insert from USB plug 90 ports, still inserts with USB socket 100 ports;
1. if insert from USB plug 90 ports, then system program changes the driver module from USB over to, realizes other operations to this machine (slave) of file data download and response main frame;
2. if insert from USB socket 100 ports, system program changes main USB driver module over to, detects the type to method, apparatus 200, and shows the type to method, apparatus 200 on LCDs 80; Accept that operational order is operated accordingly and display operation process on LCDs 80;
Check that through system program this machine does not connect with any USB device, then the system program action button of patrolling and examining the MP3 player has or not and is pressed, this process of patrolling and examining continues for some time, if there is button to be pressed, just carry out the operation of corresponding MP3 player, if there is not button to be pressed, then system program withdraws from from the process of patrolling and examining, and changes holding state over to;
After entering holding state, all devices that possess sleep mode all enter park mode, to save the energy content of battery;
Under holding state, any operation can wake MCU 20 and other devices up, enters corresponding normal operation.
With USB socket 100 ports insert method, apparatus 200 types are comprised: MP3 player, digital camera, USB mobile memory and printer.
The various action names and the process that can show action name, process and conduct " master " equipment of MP3 player on the described LCDs 80 respectively.
Handshake line 25 comprises: the signal wire that USB main control chip 30 interrupts to MCU 20 requests, the regression line of MCU 20, the control line of 20 pairs of USB main control chips 30 of MCU, the special mark signal wire of USB main control chip 30.
As shown in Figure 2: method, apparatus 200 is provided with USB plug 210.During connection, USB plug 210 is inserted the USB socket 100 on this machine system circuit boards 10, to method, apparatus 200 be " from " equipment, this machine is " master " equipment.
The workflow of embodiments of the invention as shown in Figure 3: after having the MP3 player of principal and subordinate USB interface to turn on the power switch start, if earlier with each device initialization--whether detect then has USB device connecting--have--judgement itself be with " from " mode pick out still with " master " if mode inserts--itself with " from " just mode pick out and--accept the various instructions of " master " equipment or upload the file in download song--end---turn back to detection and have or not the USB device connection.
If itself with " master " mode insert and--at first differentiate the other side's device type and--show the other side's device type and--carry out operation--ends--accordingly-turn back to detection and have or not the USB device connection.
Just if there is not USB device connecting---patrol and examine the action button of a period of time MP3 player, will the inquiry user play the MP3 music?---be just operated--end---turned back to detection accordingly and have or not USB device to connect.
Just if do not carry out any operation---the sleep for electricity saving pattern entered.
Entering under the sleep for electricity saving pattern, any operation can waken system, enters the corresponding work state.
Facts have proved that the MP3 player that principal and subordinate USB interface is arranged of implementing manufacturing of the present invention not only can connect with microcomputer and carries out exchanges data, other operational orders of file in download, song and execution microcomputer; Can also directly link such as MP3 player, digital camera, USB mobile memory and printer apparatus with other, operate accordingly, make application convenient.

Claims (4)

1. method that principal and subordinate USB interface is set in the MP3 player, its step comprises:
A., one system circuit board (10) is set in the MP3 player, the MCU (20) that comprises band USB control function and MP3 decoding function on the described circuit board (10), FLASH (60), SDRAM (50), bus (40), D/A change-over circuit (110) and analog amplify circuit (120);
B., battery (70) is set in the MP3 player does power supply, power to total system;
C., earphone socket (130) is set on the MP3 player, is used to connect earphone and analog amplify circuit (120);
D., USB plug (90) is set on the MP3 player, is used for being connected with the microcomputer USB interface;
E., LCDs (80) is set on the MP3 player to be connected with MCU (20);
It is characterized in that:
Described method step also comprises:
F. on described system circuit board (10), set up USB main control chip (30), USB socket (100), electric power management circuit (75), booster circuit (140) and handshake line (25);
G., USB main control chip (30) is set to be connected with USB socket (100), bus (40), handshake line (25) and booster circuit (140);
H., MCU (20) is set to be connected with electric power management circuit (75); Described electric power management circuit (75) connects battery (70) and booster circuit (140);
I. the system program of controlling each element circuit co-ordination is arranged in the program storage of MCU (20);
J. after being arranged on start or system reset, system program at first carries out the initialization setting to each element circuit among the MCU (20);
K. system program checks whether this machine connects with any USB device then, and if any connection, judgement is to insert from USB plug (90) port, still inserts from USB socket (100) port;
1. if insert from USB plug (90) port, then system program changes the driver module from USB over to, realizes other operations to this machine (slave) of file data download and response main frame;
2. if insert from USB socket (100) port, system program changes main USB driver module over to, detects the type to method, apparatus (200), and goes up the type that shows method, apparatus (200) in LCDs (80); Accept that operational order is operated accordingly and go up the display operation process in LCDs (80);
L. check that through system program this machine does not connect with any USB device, then the system program action button of patrolling and examining the MP3 player has or not and is pressed, this process of patrolling and examining continues for some time, if there is button to be pressed, just carry out the operation of corresponding MP3 player, if there is not button to be pressed, then system program withdraws from from the process of patrolling and examining, and changes holding state over to;
M. after entering holding state, all devices that possess sleep mode all enter park mode, to save the energy content of battery;
N. under holding state, any operation can wake MCU (20) and other devices up, enters corresponding normal operation.
2. the method that principal and subordinate USB interface is set in the MP3 player according to claim 1 is characterized in that: described from USB socket (100) port inserts method, apparatus (200) type is comprised: MP3 player, digital camera, USB mobile memory and printer.
3. the method that principal and subordinate USB interface is set in the MP3 player according to claim 1 is characterized in that: the various action names and the process that can show action name, process and conduct " master " equipment of MP3 player on the described LCDs (80) respectively.
4. the method that principal and subordinate USB interface is set in the MP3 player according to claim 1 is characterized in that: the signal wire of described handshake line (25) comprising: the signal wire that USB main control chip (30) interrupts to MCU (20) request, the regression line of MCU, the control line of MCU, the special mark signal wire of USB main control chip (30).
CNB031142567A 2003-04-15 2003-04-15 Method for setting master-slave USB interface in MP3 player Expired - Fee Related CN1188788C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB031142567A CN1188788C (en) 2003-04-15 2003-04-15 Method for setting master-slave USB interface in MP3 player

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB031142567A CN1188788C (en) 2003-04-15 2003-04-15 Method for setting master-slave USB interface in MP3 player

Publications (2)

Publication Number Publication Date
CN1450466A true CN1450466A (en) 2003-10-22
CN1188788C CN1188788C (en) 2005-02-09

Family

ID=28684098

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB031142567A Expired - Fee Related CN1188788C (en) 2003-04-15 2003-04-15 Method for setting master-slave USB interface in MP3 player

Country Status (1)

Country Link
CN (1) CN1188788C (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100399239C (en) * 2003-08-03 2008-07-02 清华大学 Universal bidirectional serial data transmission interface and data transmission method thereof
CN100426850C (en) * 2005-06-22 2008-10-15 厦门华侨电子股份有限公司 TV set setting USB/memory card interface and its software upgrading method
CN101308482B (en) * 2008-07-15 2010-06-02 华硕电脑股份有限公司 Electronic device as switch of host and element
CN102385889A (en) * 2011-09-28 2012-03-21 惠州市德赛视听科技有限公司 Media player and method for realizing intelligent household control by using the same
CN101340554B (en) * 2007-07-02 2012-05-30 三洋电机株式会社 Decrypting processing device, decrypting processing method and digital broadcast receiving device
CN104423276A (en) * 2013-08-23 2015-03-18 苏州宝时得电动工具有限公司 Power management method and power management module

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100399239C (en) * 2003-08-03 2008-07-02 清华大学 Universal bidirectional serial data transmission interface and data transmission method thereof
CN100426850C (en) * 2005-06-22 2008-10-15 厦门华侨电子股份有限公司 TV set setting USB/memory card interface and its software upgrading method
CN101340554B (en) * 2007-07-02 2012-05-30 三洋电机株式会社 Decrypting processing device, decrypting processing method and digital broadcast receiving device
CN101308482B (en) * 2008-07-15 2010-06-02 华硕电脑股份有限公司 Electronic device as switch of host and element
CN102385889A (en) * 2011-09-28 2012-03-21 惠州市德赛视听科技有限公司 Media player and method for realizing intelligent household control by using the same
CN104423276A (en) * 2013-08-23 2015-03-18 苏州宝时得电动工具有限公司 Power management method and power management module

Also Published As

Publication number Publication date
CN1188788C (en) 2005-02-09

Similar Documents

Publication Publication Date Title
CN1133110C (en) Electronic equipment with common connector
CN1949197A (en) Portable equipment based on non-volatile memory and method of realizing power failure protection
CN101042609A (en) Integrated circuit and signal processing apparatus using the same
CN1188788C (en) Method for setting master-slave USB interface in MP3 player
CN1808338A (en) Power management method for built-in camera
CN1874252A (en) Serial-port mapping system for debugging single board
CN201893994U (en) Combined circuit board
CN1317846C (en) Method of realizing internal external network physical partition and its device
CN2689345Y (en) Tester of USB port
CN1725207A (en) Method and system for regulating processor allocation mode
CN1885272A (en) PS/2 interface detection apparatus and method
CN1438582A (en) USB control circuit suitable to computer-to-computer transmission and its operation method
CN102129881A (en) Solid-state storage disc device and system suitable for peripheral component interconnect express interface
CN1624625A (en) Electronic device and battery pack
CN101094464A (en) Device and method for handset to manage files in U disk
CN101526841A (en) Computer system and power saving method
CN2886660Y (en) Computer mainframe with modularized transmission interface and modularized transmission interface and conversion board
CN2798172Y (en) Wireless charging seat for mouse
CN210514981U (en) Switching circuit for subway equipment
CN2898940Y (en) Backup card and electronic device for computer
CN2650204Y (en) Extended computer system
CN2369275Y (en) Primary I/O system spare unit of main board
CN2794107Y (en) Embedded system structure
CN2840187Y (en) Testing clamp hard disc switching device
CN2810065Y (en) Audio & video collection device with video recording subscription function

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
C19 Lapse of patent right due to non-payment of the annual fee
CF01 Termination of patent right due to non-payment of annual fee