CN1084296A - Monolithic processor controlled hard disk recording method and device thereof - Google Patents

Monolithic processor controlled hard disk recording method and device thereof Download PDF

Info

Publication number
CN1084296A
CN1084296A CN 93118541 CN93118541A CN1084296A CN 1084296 A CN1084296 A CN 1084296A CN 93118541 CN93118541 CN 93118541 CN 93118541 A CN93118541 A CN 93118541A CN 1084296 A CN1084296 A CN 1084296A
Authority
CN
China
Prior art keywords
hard disk
data
chip microcomputer
ram
chip
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 93118541
Other languages
Chinese (zh)
Other versions
CN1036298C (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.)
Tsinghua University
Original Assignee
Tsinghua University
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 Tsinghua University filed Critical Tsinghua University
Priority to CN 93118541 priority Critical patent/CN1036298C/en
Publication of CN1084296A publication Critical patent/CN1084296A/en
Application granted granted Critical
Publication of CN1036298C publication Critical patent/CN1036298C/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Signal Processing For Digital Recording And Reproducing (AREA)

Abstract

The invention belongs to technical field of data processing, the present invention proposes method and the device that a kind of Single-chip Controlling hard disk carries out data recording.The byte of data that is characterized in gathering, deposit among the RAM of single-chip microcomputer to a byte, be filled with data after, pass through special purpose interface write-once hard disk again, all processes is monitored by EPROM.Its device is by single-chip microcomputer, and special purpose interface and IDE hard disk are formed.The hard disk recording method that utilizes the present invention to propose can form special-purpose portable large capacity datalogger, and its hardware configuration is simple, and is chip used few, low in energy consumption, is convenient to safeguard.Be specially adapted to occasions such as medical science, seismic monitoring and field work.

Description

Monolithic processor controlled hard disk recording method and device thereof
The invention belongs to technical field of data processing, particularly the method for data recording, storage and device thereof.
Registering instrument is that simulating signal or the digital signal that will collect write down, store for analyzing, studying.The data recording instrument has been widely used in the various fields such as science and technology, production, military affairs, medical treatment.Existing data recording instrument is divided into following several types substantially:
1, magnetic tape recorder is representative with Japanese TEAC company product, can write down the simulating signal in 1-12 road on a deep bid tape, till tape is write all over.This registering instrument volume is bigger, and price is expensive, and only limit writes down simulating signal.
2, computer data acquisition system constitutes with computer configuration A/D plate, and this system can be to store after the digital signal analog signal conversion, but needs a whole set of computer system, and volume is big, and price is expensive, is unfavorable for collection in worksite.
3, bio signal registering instrument medically commonly used comprises following several:
1) electrocardiograph, electroence phalograph, physiograph etc., this quasi-instrument all are that analog signal record with the short time is on paper.
2) dynamic electrocardiogram register (HOLTER), this instrument adopt tape can write down 24 hours the analog quantity of singly leading electrocardiosignal of 1 people, but its recording quality is subjected to the influence of mechanical vibration.
3) constitute the HOLTER system with the IC chip, but,, be difficult for promoting the use of so can only do the data compression or select record because memory capacity is not enough.
4) with Single-chip Controlling floppy disk composition data register system, but the memory space maximum of floppy disk 2M only at present, so the record amount is little, and volume is big, uses inconvenient.
The objective of the invention is in order to overcome the weak point of above-mentioned register instrument, a kind of recording method and device thereof of Single-chip Controlling hard disk are proposed, this method not only can realize jumbo record and storage, and can become digital signal to write down the analog signal conversion of gathering and store, all right record, limit real-time analysis while gathering, this device not only can be realized long record, and volume is little, is easy to carry.
The method that the Single-chip Controlling hard disk that the present invention proposes carries out data recording may further comprise the steps:
1, extraneous simulating signal constantly deposits among the RAM of single-chip microcomputer through byte ground of byte of single-chip microcomputer serial communication interface through Chip Microcomputer A/D mouth or extraneous digital signal;
2, after RAM is filled with data, single-chip microcomputer passes through special purpose interface write-once hard disk with the batch data among the RAM;
3, the program among the EROM of single-chip microcomputer of being stored in realizes the monitoring to above-mentioned two steps, repeats above-mentioned two steps until the total data record is finished.
The device of realizing said method comprises single-chip microcomputer, and the IDE hard disk connects the special purpose interface of said single-chip microcomputer and hard disk.
The principle of work of data record method of the present invention and device thereof such as Fig. 1. shown in Figure 3.Now be described below respectively in conjunction with figure:
Fig. 1 is monolithic processor controlled hard disk recording method flow process, and at first single-chip microcomputer obtains data continuously from the external world, and these data can be the digital quantities after simulating signal is changed through A/D, also can be the data that other computing machines are sent to this machine serial communication interface.Just it is deposited among the RAM after data of the every acquisition of single-chip microcomputer.The RAM capacity here is 512 bytes at least, generally extends to more than tens KB.After RAM is filled with, single-chip microcomputer just passes through special purpose interface write-once hard disk to the batch data that is buffered among the RAM, because the physical address of hard disk is head, cylinder, sector, it is unit (sector is 512 bytes) that its data transmit with the sector, and can not read or write to a byte of a byte, so metadata cache is indispensable in RAM.Said process is monitored by the program that is solidificated among the EPROM.
Fig. 2 is an implement device structural representation of the present invention.Single-chip microcomputer links to each other with the IDE hard disk by special interface circuit, realizes that the data that are buffered among the single-chip microcomputer RAM deposit hard disk in.Special interface circuit is the critical component of device, and it has two effects: one, finish the conversion of data channel.Because the order that single-chip microcomputer sends to hard disk, parameter, data are sent by system data bus SD, the just in time not corresponding data bus DD that flows into hard disk, conversely, hard disk is sent by the DD bus to the status data that single-chip microcomputer provides, the also just in time not corresponding SD bus that flows into single-chip microcomputer, therefore, between single-chip microcomputer and hard disk, to carry out the conversion of data channel.When for example transmitting order, parameter, state between 16 single-chip microcomputers and the hard disk, must carry out the conversion of height 8 bit data, be the single-chip microcomputer odd address register sends in hard disk order, parameter,, must be transformed into the least-significant byte data line DD of hard disk from the most-significant byte data line SD8-15 outflow of single-chip microcomputer 0~7, the state that the odd address register provides to single-chip microcomputer in the above-mentioned hard disk is from the least-significant byte data line DD of hard disk 0~7Flow out, the most-significant byte data line SD8-15 that must be transformed into single-chip microcomputer gets on.When transmitting data between 8 single-chip microcomputers and the hard disk, must increase by two 8 bit data and latch, so that 16 bit data bidirectional interfaces to be provided.Second effect of special purpose interface is to provide address decoding CS1FK-to hard disk, CS3FX-, because the standard of depositing is addressed to 1f0-1f7 in the IDE hard disk, and 3f6-3f5, it is by CS1FX-, CS3fx, DA 0, DA 1, DA 2Five lines are deciphered in hard disk and are realized, so 16 address wires of single-chip microcomputer must be earlier through address decoding output CS1FX-, CS3FX-.If there is when conflict the address that the normal address and single-chip microcomputer of register take itself in the hard disk, the address decoding in the special purpose interface can be changed.For example IFX is chosen hard disk to change X1FX into and choose, then the 1f0-1f7 register address in the hard disk becomes, X1f0-X1f7, and wherein X is 1-F.
Fig. 3 is the watchdog routine FB(flow block) of apparatus of the present invention.Single-chip microcomputer is cached among the RAM from extraneous image data, again data is write hard disk from RAM, and these processes all must be finished by single-chip microcomputer under the support of monitoring software, and the monitoring software program is the set of the various instructions of single-chip microcomputer.After this program composition is good, be solidificated among the EPROM of single-chip microcomputer.Fig. 3 is the hard disk write operation FB(flow block), and it is the core of whole monitoring software.The data of hard disk transmit and adopt the mode of programmable I/O(PIO), write BIOS.The essential order that the present invention selects for use existing IDE hard disk to support.In order to write dish, i.e. Write Sectors CoollolLR, L=1 represents to add long data, promptly adds 4 byte ECC behind the sector data; R=1 represents to allow retry, has whenever write an interruption behind the sector, Request Processing.Also can select for use Write Multi-ple order to write dish, this order allows not have and interruptedly transmits a plurality of sectors, but existing IDE hard disk is not necessarily supported.Three important parameters of IDE hard disk are: magnetic head number, cylinder number, sector number, they have determined the capacity of hard disk.The parameter that single-chip microcomputer mails to hard disk can not surpass respectively the maximum magnetic head number of hard disk, maximum cylinder number, maximum sector number.When the data of internal memory are write a plurality of sector of hard disk continuously, it generally is to become sector number earlier that the physical address of hard disk changes, the back becomes head number, become cylinder number again, can reduce the number of times that moves around of magnetic head like this, improve writing speed, and consistent with the record format of DOS, be convenient to form the data file with the DOS compatibility, the accident that also is unlikely the data " fragment " that cause hard disk and data is lost and is covered.
This data record method of the present invention can change into simulating signal digital signal and carry out record, and memory capacity is big.Because single-chip microcomputer itself has CPU, limit record, limit real-time analysis can be gathered to the data limit.It realizes that device volume is little, simple in structure, and the hardware and software configuration is few, and low in energy consumption, software program is directly fixed among the EPROM, makes the device reliability height, safeguard easily, and it is on duty to need not the people, and whole device can form special-purpose high capacity portable data instrument.Be particularly suitable for monitoring medically, occasions such as seismic monitoring and field work.
Brief Description Of Drawings:
Fig. 1 is monolithic processor controlled hard disk recording method process flow diagram;
Fig. 2 is an implement device structural representation of the present invention;
Fig. 3 is the watchdog routine block diagram of apparatus of the present invention;
Fig. 4 is a present embodiment general structure schematic diagram;
Fig. 5 is this example decoding scheme;
Fig. 6 is present embodiment data channel change-over circuit figure;
The invention provides a kind of embodiment shown in Fig. 4~6, be described in detail as follows in conjunction with the accompanying drawings:
Fig. 4 is a present embodiment general structure schematic diagram
Single-chip microcomputer in the present embodiment is selected 16 single-chip microcomputer 8097BH of MCS-96 series for use, clock 12MH, in have 8 road bands samplings to keep 10 ADC, the IDE hard disk is selected the CP2044 of Conner company for use, 2.5 inch, capacity 41MB, its parameter is a cylinder number 980, sector spertrack 17, magnetic head is several 5, and read-write (Read/Write), idle (Idle) are arranged, hang up (Standby), sleep (Sleep) four kinds of operator schemes are to reduce power consumption, and metadata cache RAM selects two 62256 for use, and monitoring EPROM selects two 2764 for use.
Because the IDE hard disk is 16 bit data interface, it is when carrying out exchanges data with host CPU, always 16 bit data are incorporated into and are gone out, therefore the host CPU here adopts 16 single-chip microcomputers, to make full use of the high speed data transfer performance of hard disk, correspondingly, require its outside to have reservoir ROM and EPROM all to adopt two groups, finish the most-significant byte storage of odd address and the least-significant byte storage of even address respectively.Because the address wire and the data line of 8097BH single-chip microcomputer are public (AD0-AD15), so adopted finish for two 373 the height 8 bit address lines latch, adopted two 245(U4 and U5) finish the driving of height 8 position datawires, carry out separating of address wire and data line with this.There are 8 groups of identical discrete component groups in the accompanying drawing lower right corner, and they are input interfaces of simulating signal, has also designed reference voltage Vref essential when simulating signal is carried out the A/D conversion among the figure.
The interface circuit of single-chip microcomputer and hard disk is the key of this hardware, at first, it provides address decoding output CS1FX-to hard disk, and CS3FX-is distributed in the hard disk register address in the 100-1FFF in native system, because at this point do not have other I/O or storer again in the scope of location, so for the purpose of hardware simplicity, adopt part decoding that CS1FX-, CS3FX-are provided, the still use normal address of the register address of hard disk, concrete decoding scheme as shown in Figure 5.The special purpose interface of single-chip microcomputer and hard disk also has another vital role, promptly finishes the conversion of data channel, is the conversion of height 8 bit data passages in 16 bit single-chip systems, and the concrete situation that occurs has four kinds, respectively schematically as follows:
1, transmits data between host CPU and the hard disk
2, exchange parameter between the even address port of host CPU and hard disk
3, CPU is to port write command of hard disk odd address and parameter
4, host CPU reads disk state from hard disk odd address port.
Understood the exchanges data situation between 16 single-chip microcomputers and the IDE hard disk, just be not difficult to design above-mentioned data channel change-over circuit, the physical circuit that designs in the present embodiment as shown in Figure 6.The simplest is BHE and the AO control line that utilizes 16 bit CPUs, finishes with three 245.
More than the hardware of present embodiment has been done detailed introduction, its monitoring software is solidificated in the EPROM, promptly two 2764, software is write as with the assembly language of MCS-96, be used for realizing data acquisition, the metadata cache of single-chip microcomputer, data write operations such as hard disk, and its core is the BIOS of hard disk, and promptly the data that how will be buffered among the RAM write hard disk.Because single-chip microcomputer directly by BIOS control hard disk, need not DOS do with, so it can directly be undertaken by physical address (head, cylinder, sector) the operation of hard disk, do not need physical sector and logic sector to reach the conversion of bunch address.In the present embodiment, the data of hard disk transmit and adopt the PIO mode, and only use the essential order of IDE hard disk.Its data readback can be exported with the PWM simulation of 8097BH single-chip microcomputer, also main frame is mail in the serializable communication, also can articulate two hard disks by the AT286 machine, tens data volume just can be poured main frame (the ide interface data transmission rate can reach 4MB/S) several seconds into, and this provides solid support for practicality of the present invention and feasibility.
Because the present invention only relates to single-chip microcomputer and how to control hard disk and carry out data recording, and the main write operation of carrying out hard disk in data recording process, this is general technical matters so the supposition single-chip microcomputer has been finished the collection of data and deposited it in RAM(), when data are filled with in the RAM, just it must be write hard disk, program segment can be the 48KB data volume write-once hard disk in the RAM of 4000H with start address, on continuous 96 sectors that to be recorded in 01 post 1 sector be initial sector (48KB=96 sector=60H sector).
The hard disk recording method that utilizes the present invention to propose can form special-purpose portable large capacity datalogger, and its hardware configuration is simple, and is chip used few, the configuration of no unnecessary hardware and software, thereby volume is little, low in energy consumption, be easy to safeguard that it is on duty to need not the people, total system ratio of performance to price height.
Because the single-chip microcomputer of selecting for use is 16 a single-chip microcomputer, its data territory speed is fast, and includes 10 ADC in 8 roads, and when making the present invention be used for on-the-spot large capacity data acquisition record, the ratio of performance to price is high especially.
In addition, because software write as with the assembly language of MCS-96, and is solidificated in the EPROM, make that the present invention is that numerous viruses of object of attack have natural immunity to DOS.

Claims (2)

1, a kind of Single-chip Controlling hard disk carries out the method for data recording, it is characterized in that may further comprise the steps:
(1), extraneous simulating signal constantly deposits among the RAM of single-chip microcomputer through byte ground of byte of single-chip microcomputer serial communication interface through Chip Microcomputer A/D mouth or extraneous digital signal;
(2), after RAM is filled with data, single-chip microcomputer with the batch data among the RAM by special purpose interface write-once hard disk;
(3), the program among the EROM of unit of being stored in realizes the monitoring to above-mentioned two steps; Repeat above-mentioned two steps until the total data record is finished.
2, adopt the device of the described method of claim 1, it is characterized in that comprising single-chip microcomputer IDE hard disk, connect the special purpose interface of single-chip microcomputer and hard disk.
CN 93118541 1993-10-15 1993-10-15 Hard disk recording method controlled by single chip processor and its appliance Expired - Fee Related CN1036298C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 93118541 CN1036298C (en) 1993-10-15 1993-10-15 Hard disk recording method controlled by single chip processor and its appliance

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 93118541 CN1036298C (en) 1993-10-15 1993-10-15 Hard disk recording method controlled by single chip processor and its appliance

Publications (2)

Publication Number Publication Date
CN1084296A true CN1084296A (en) 1994-03-23
CN1036298C CN1036298C (en) 1997-10-29

Family

ID=4992513

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 93118541 Expired - Fee Related CN1036298C (en) 1993-10-15 1993-10-15 Hard disk recording method controlled by single chip processor and its appliance

Country Status (1)

Country Link
CN (1) CN1036298C (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1327375C (en) * 2003-08-22 2007-07-18 杭州盘古自动化系统有限公司 Device and method for backing data from instrument to CF card
CN100378694C (en) * 2005-01-19 2008-04-02 英业达股份有限公司 Independent hard disk controller
CN107490443A (en) * 2017-04-27 2017-12-19 安徽华脉科技发展有限公司 A kind of multi-functional haptic signal detecting system based on piezoelectric membrane

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1327375C (en) * 2003-08-22 2007-07-18 杭州盘古自动化系统有限公司 Device and method for backing data from instrument to CF card
CN100378694C (en) * 2005-01-19 2008-04-02 英业达股份有限公司 Independent hard disk controller
CN107490443A (en) * 2017-04-27 2017-12-19 安徽华脉科技发展有限公司 A kind of multi-functional haptic signal detecting system based on piezoelectric membrane

Also Published As

Publication number Publication date
CN1036298C (en) 1997-10-29

Similar Documents

Publication Publication Date Title
CN2791752Y (en) High-speed data storage apparatus
Ruemmler et al. An introduction to disk drive modeling
CN103186350B (en) The moving method of mixing storage system and hot spot data block
CA1197021A (en) Roll mode for cached data storage
CN101667205B (en) Method for memorizing real time measure point data for quick review
CN101044513A (en) Timeline random access for multi-format time-based file recording and playback
JP2010079549A (en) Management apparatus and computer system
CN101079075A (en) Portable serial number recorder and implementation method
CN1545030A (en) Data distribution dynamic mapping method based on magnetic disc characteristic
CN201797568U (en) Energy-saving disk array-based video monitoring system
Wu et al. Proactive data migration for improved storage availability in large-scale data centers
CN1731376A (en) A data transmission apparatus and method based on file allocation table (FAT)
EP0465014B1 (en) Method and means for rule based data transfer
CN1084296A (en) Monolithic processor controlled hard disk recording method and device thereof
CN1777018A (en) DSP Chip-based excitation controller communication system and its method for realizing USB protocol
CN101308171B (en) PCI bus electric energy quality transient affair collection card and its collection method
Strange Analysis of long-term UNIX file access patterns for application to automatic file migration strategies
US6408314B1 (en) Method of performing a high-performance sort which gains efficiency by reading input file blocks sequentially
CN1564138A (en) Fast synchronous and high performance journal device and synchronous writing operation method
Na et al. Iplb+-tree for flash memory database systems.
CN101290621B (en) Safe digital card memory search method
TWI241502B (en) Real time data compression apparatus for a data recorder
WO2018112056A1 (en) Efficient database management system utilizing silo and manifest
CN112558858B (en) Method for acquiring access characteristics of super-large-scale application external memory based on dynamic IO perception
Debnath et al. Deferred updates for flash-based storage

Legal Events

Date Code Title Description
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C06 Publication
PB01 Publication
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