CN104298152B - Near-field communication modulation depth adaptive method and device - Google Patents

Near-field communication modulation depth adaptive method and device Download PDF

Info

Publication number
CN104298152B
CN104298152B CN201410512906.1A CN201410512906A CN104298152B CN 104298152 B CN104298152 B CN 104298152B CN 201410512906 A CN201410512906 A CN 201410512906A CN 104298152 B CN104298152 B CN 104298152B
Authority
CN
China
Prior art keywords
value
depositor
data
chip
tables
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.)
Active
Application number
CN201410512906.1A
Other languages
Chinese (zh)
Other versions
CN104298152A (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.)
Feitian Technologies Co Ltd
Original Assignee
Feitian Technologies 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 Feitian Technologies Co Ltd filed Critical Feitian Technologies Co Ltd
Priority to CN201410512906.1A priority Critical patent/CN104298152B/en
Publication of CN104298152A publication Critical patent/CN104298152A/en
Application granted granted Critical
Publication of CN104298152B publication Critical patent/CN104298152B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • H04B5/70

Abstract

The invention discloses a near-field communication modulation depth adaptive method and device and relates to the field of communication. The device comprises a master control chip, a non-contact chip and a first storage zone. The master control chip can control the non-contact chip to output the modulation-free amplitude according to a value of a first register; a numerical value is acquired from a data table or through calculation and written in a second register according to the data table stored in the first storage zone in advance and the measured value of the modulation-free amplitude, the non-contact chip is controlled to output the modulated amplitude according to the value of the second register, and the modulation depth is adaptively adjusted through control over the modulated amplitude. By the adoption of the technical scheme, the modulation depth can be kept within a reasonable range and the stability of data transmission in non-contact communication is improved.

Description

Near-field communication modulation depth adaptive approach and device
Technical field
The present invention relates to the communications field, more particularly, to a kind of near-field communication modulation depth adaptive approach and device.
Background technology
With the development of near field communication (NFC), non-contact communication technology receives more and more attention, especially In mobile payment field.In contactless communication, modulation depth is an important measurement index of the stability of data communication, institute Meaning modulation depth be usually the difference of unmodulated amplitude and the brewed amplitude of communication field to unmodulated amplitude and brewed amplitude it The ratio of sum, is represented with percent.In contactless communication, the modulator approach commonly using at present is the modulation methods of fixed antenna impedance Method, that is, the non-equipment such as read write line that connects is according to the fixing peak swing of fixing antenna impedance output and minimum amplitude.But adjust Depth processed can present larger difference because read write line is different from the distance of distance during card-to-card communication, in order to ensure read write line and card During communication, this index of modulation depth reaches a rational numerical value, and finding a kind of adaptive method of modulation depth becomes current Urgent problem.
Content of the invention
For solving problems of the prior art, the present invention proposes a kind of near-field communication modulation depth adaptive approach And device.
The technical solution used in the present invention is: the near-field communication modulation depth adaptive approach that the present invention provides, comprising:
Step s1: the value of the first depositor on contactless chip is written as the first preset value, institute by the main control chip of device State contactless chip and amplitude is exported according to the value of the first depositor;
Step s2: the main control chip of device sends measurement amplitude order, described contactless chip measurement to contactless chip Current amplitude value;
Step s3: the main control chip of device obtains current amplitude value from contactless chip;
Step s4: the main control chip of device obtains tables of data from the first memory block;
Step s5: the main control chip searching data table of device, judge immediate with described current amplitude value in tables of data Whether numerical value be located at the border row of tables of data, is then execution step s6, otherwise execution step s7;
Step s6: the main control chip of device obtains the immediate numerical value of described and described current amplitude value in tables of data Numerical value, and this numerical value is written to the second depositor on contactless chip, then execution step s8;
Step s7: the main control chip of device obtains the immediate two values with described current amplitude value from tables of data, And obtain the respective numerical value of this two values, according to preset formula to four numerical value getting and described current amplitude Value is calculated, and result of calculation is written to the second depositor on contactless chip, execution step s8;
Step s8: the contactless chip of device exports amplitude according to the value of the second depositor, and sends data with this amplitude.
The near-field communication modulation depth self-reacting device that the present invention provides, including main control chip, contactless chip and first Memory block;
Described main control chip includes control module, judge module, acquisition module, computing module, searching modul and write mould Block;
Described control module is used for sending measurement amplitude order control described contactless chip survey to described contactless chip Amount current amplitude value, for controlling described contactless chip to export amplitude according to the value of the first depositor, described non-for controlling Contact chip exports amplitude and with this amplitude transmission data according to the value of the second depositor;
Described judge module is used for judging the immediate numerical value with current amplitude value that described searching modul finds whether Border row positioned at tables of data;
Described acquisition module is used for obtaining current amplitude value from contactless chip;For obtaining number from described first memory block According to table;For when described judge module judge described with the immediate numerical value of current amplitude value positioned at the border row of tables of data when, Obtain numerical value in tables of data for the described immediate numerical value;For judging described and current amplitude when described judge module When being worth the border row that immediate numerical value is not located at tables of data, obtain immediate with described current amplitude value from tables of data Two values, and obtain the respective numerical value of this two values;
Described computing module be used for according to preset formula, described acquisition module is got with described current amplitude value Close two values and the respective numerical value of this two values, and this five numerical value of described current amplitude value are calculated Obtain result of calculation;
Described searching modul is used for searching the immediate numerical value with described current amplitude value in tables of data;
Said write module is used for for the value of the first depositor on contactless chip being written as the first preset value;For working as State judge module judge described with the immediate numerical value of current amplitude value positioned at the border row of tables of data when, by described acquisition module Numerical value in tables of data for the described immediate numerical value getting writes the second depositor;For when described judge module When judging the described border row being not located at tables of data with the immediate numerical value of current amplitude value, described computing module is calculated The result of calculation arriving writes the second depositor;
Described contactless chip includes the first depositor and the second depositor;
Described first depositor is used for depositing first preset value corresponding with unmodulated amplitude, and described second depositor is used for Deposit and the numerical value corresponding to brewed amplitude;
Described first memory block, for data table memory.
Using having the beneficial effect that technique scheme reaches: using this scheme so that the antenna part of read write line Circuit design is eased, the technical scheme being provided by the present invention so that modulation depth maintains in rational scope, Improve data transmission stability in non-switched letter, the technology providing using the present invention, in research and development of products, can shorten product and adjust The examination time, accelerate the research and development process of product.
Brief description
Fig. 1 is the flow chart of the near-field communication modulation depth adaptive approach that the embodiment of the present invention 1 provides;
Fig. 2 is the flow chart of the near-field communication modulation depth adaptive approach that the embodiment of the present invention 2 provides;
Fig. 3 is the structured flowchart of the near-field communication modulation depth self-reacting device that the embodiment of the present invention 3 provides;
Fig. 4 is the composition structured flowchart of the control module shown in Fig. 3;
Fig. 5 is the composition structured flowchart of the judge module shown in Fig. 3.
Specific embodiment
For making the object, technical solutions and advantages of the present invention clearer, below in conjunction with accompanying drawing to embodiment party of the present invention Formula is described in further detail.
Embodiment 1
As shown in figure 1, a kind of near-field communication modulation depth adaptive approach that the present embodiment provides, comprising:
Step s1: the value of the first depositor on contactless chip is written as the first preset value, institute by the main control chip of device State contactless chip and amplitude is exported according to the value of the first depositor;
Specific in the present embodiment, described device includes main control chip, contactless chip and the first memory block.
Preferably, the first preset value is taken as 0x50 or 0x00.
Specific in the present embodiment, the difference of modulation depth=unmodulated amplitude and brewed amplitude to unmodulated amplitude with The ratio of modulated amplitude sum, the amplitude of this step output is unmodulated amplitude.
Step s2: the main control chip of device sends measurement amplitude order, described contactless chip measurement to contactless chip Current amplitude value;
Preferably, the main control chip of device passes through to send its measurement current amplitude of order control to contactless chip.
Step s3: the main control chip of device obtains current amplitude value from contactless chip;
Preferably, the value of the 5th depositor on the main control chip reading contactless chip of device gets current amplitude Value.
Step s4: the main control chip of device obtains tables of data from the first memory block;
In the present embodiment, described tables of data is made up of two column data.
Further, can also be stored with the first memory block multiple tables of data, and the main control chip of device fills according to current The configuration information put chooses corresponding tables of data.
Step s5: the main control chip searching data table of device, judge immediate with described current amplitude value in tables of data Whether numerical value be located at the border row of tables of data, is then execution step s6, otherwise execution step s7;
Specific in the present embodiment, judge closest with described current amplitude value in the middle of the numerical value of wherein string of tables of data Numerical value whether be located at the first row or last column of tables of data, be then execution step s6, otherwise execution step s7.
Step s6: the main control chip of device obtains this numerical value in tables of data for the immediate numerical value, and is write Enter the second depositor on contactless chip, then execution step s8;
Step s7: the main control chip of device obtains the immediate two values with described current amplitude value from tables of data, And obtain the respective numerical value of this two values, according to preset formula, four numerical value getting and current amplitude value are entered Row calculates, and result of calculation is written to the second depositor on contactless chip, execution step s8;
Specifically, preset formula described in this step is: y1+ ((y1-y2) * (current amplitude value-x2))/(x1-x2), its In, x2 represents the number being more than or equal to current amplitude value in described immediate two values, and x1 represents described immediate two The number of little Yu current amplitude value in individual numerical value, y2 is the numerical value of x2, and y1 is the numerical value of x1.
Step s8: the contactless chip of device exports amplitude according to the value of the second depositor, and sends data with this amplitude.
Specific in the present embodiment, the amplitude that the value according to the second depositor exports is right in the computing formula of modulation depth The brewed amplitude answered.
Further, can also include before step s1:
Step s0: device power-up initializing;
Described device also includes initialization module.This step is realized by described initialization module.
Step s1: the main control chip of device determines whether to be sent out data by contactless chip, is then to execute step Rapid s1, otherwise continues executing with this step;
Accordingly, return execution step s1 after having executed above-mentioned steps s8.
The near-field communication modulation depth adaptive approach being provided by the present embodiment, by exporting to contactless chip Modulated amplitude is controlled, so that the value of modulation depth reaches and is the most reasonably worth, thus ensureing stablizing of data transfer Property.
Embodiment 2
As shown in Fig. 2 a kind of near-field communication modulation depth adaptive approach that the present embodiment provides, in this way in read-write Introduce as a example application on device, its application scenarios is that read write line sends data to card, the adaptive approach that the present embodiment provides Operating main body be read write line, this read write line includes main control chip, contactless chip, the first memory block and initialization module.This Contactless chip in embodiment preferably employs 3911 chips, this chip includes the first depositor, the second depositor, the 3rd Depositor, the 4th depositor and the 5th depositor;The method comprises the following steps:
Step 101: read write line power-up initializing;
This step is realized especially by the initialization module of read write line.
Specific in the present embodiment, the operating main body starting from step 102 is specially the main control chip of read write line.
Step 102: determine whether to send data by 3911 chips to card, be then execution step 103, otherwise continue Execution step 102;
Step 103: control 3911 chips to export unmodulated amplitude by the value of the first depositor is written as the first preset value, Open field by the value of the 3rd depositor is written as the second preset value;
In the present embodiment, the first preset value is 0x00, and the first depositor is am modulation depth control Register, the 3rd depositor is as3911_reg_op_control.The scope of the value of the second preset value is 0x 00-0x Ff, in the present embodiment, the second preset value is preferably taken as 0x50, opens field by the second preset value is write the 3rd depositor.
Step 104: modulation system is judged according to default flag bit, if tabling look-up modulation mode then execution step 105, if Automatic Modulation mode then execution step 119;
Step 105: open event triggering interruption by the value of the 4th depositor is written as the 3rd preset value, set to enumerator Put initial value;
In the present embodiment, the 4th depositor is as3911_irq_mask_dct, and the value of the 3rd preset value is preferably 0x8000, this step is specific to open event triggering interruption by the 3rd preset value is write the 4th depositor.
It is preferably provided with main control chip in the present embodiment to be up to 3 times to 3911 sending times sending order.Preferably employ The initial value of enumerator is set to 3, stat commands sending times are come by successively decreasing of the count value of enumerator.In the same manner, enumerator Initial value can also be 0 or other numerical value, by the count value of enumerator incremental come stat commands sending times.
Step 106: send measurement amplitude order to 3911 chips and control 3911 chip measurement current amplitude values, more New count The value of device;
In the present embodiment, main control chip is cmd_measure_ to the measurement amplitude order that 3911 chips send Amplitude, bid value is taken as 0x13, and the value of described refresh counter is preferably and subtracts 1 by the value of enumerator.In the same manner, work as counting When the initial value of device is 0, the value of described refresh counter is specially and adds 1 by the value of enumerator.
In the present embodiment, modulation depth=(a-b)/(a+b), wherein, a and b represents unmodulated amplitude and brewed respectively Amplitude, the current amplitude that in this step, 3911 chips measure is unmodulated amplitude.
Step 107: receive the response byte that 3911 chips return, by removing the value close event triggering of the 4th depositor Interrupt;
Specific in the present embodiment, the response byte of the 3911 chips returns that main control chip receives is the shape of 2 bytes State word, such as 0,x00 00 or 0x 90 00.
Step 108: judge whether order runs succeeded according to described response byte, be then execution step 110, otherwise execute Step 109;
Specifically, main control chip judges whether described response byte is preset byte, is, represents that main control chip becomes power control Make 3911 chips to measure current amplitude and the current amplitude measuring value xi is written with the 5th depositor, continue executing with step Rapid 110;Otherwise execution step 109.
For example, the value of preset byte is 0,x90 00.The current amplitude measuring value 0x6e is written to by 3911 chips Five depositors.
Step 109: judge whether the value of enumerator is equal to pre-set count values, be then by counter O reset, report an error, exit, Otherwise return execution step 106;
Preferably, described pre-set count values are 0.
Step 110: current amplitude value xi is read by the value reading the 5th depositor;
In the present embodiment, the 5th depositor is as3911_reg_ad_result, and main control chip reads from this depositor Current amplitude value xi arriving is 0x6e.
Step 111: obtain the tables of data prestoring, initial value is set to the first variable;
Specific in the present embodiment, tables of data that this step obtains is the two column data tables that tables of data total length is 5, I.e. tables of data is made up of 5 row data, and every data line comprises one group of x and y value, and the x value in data below table arranges from small to large, Shown in table specific as follows:
x y
0x66 0x71
0x9a 0x7d
0xbf 0x85
0xcc 0x8b
0xd3 0x8b
Described first variable is used for pointing to the x value in tables of data, and the such as first variable is represented with index, and its initial value is 1, Then the x value in tables of data pointed by the first variable is 0x66.
Step 112: judge xi whether more than the x value in the tables of data pointed by the first variable, be then execution step 113, Otherwise execution step 115;
Step 113: judge that whether the first variable is equal to the total length of tables of data, be then execution step 116, otherwise execute step Rapid 114;
Specific in the present embodiment, the total length of tables of data is 5, judges whether the first current variable is equal to 5.
Step 114: update the first variable, return to step 112;
Specific in the present embodiment, the first variable Jia 1 certainly.
Step 115: judge that whether the first variable is equal to initial value, be then execution step 116, otherwise execution step 117;
Step 116: the second depositor will be write with the y value gone together of x value in the tables of data pointed by the first variable, then Execution step 118;
Specific in the present embodiment, when the value of the first variable reaches the total length 5 of tables of data, by tables of data last Y value in row is that 0x8b writes the second depositor.When the first variable is initial value 1,0x71 is write the second depositor.
In the present embodiment, the second depositor is as3911_reg_rfo_am_on_level.
Step 117: obtain the x value in tables of data pointed by the first variable and y value x1 gone together with it and y1 represents, obtain Take the first variable subtract 1 pointed by x value in tables of data and y value x2 gone together with it and y2 represent, according to y1+ ((y1-y2) * (xi-x2))/(x1-x2) is calculated, and result of calculation is write the second depositor, execution step 118;
Specific in the present embodiment, xi=0x6e, corresponding first variable is 2, the x1=0x9a getting, y1= 0x7d, x2=0x66, y2=0x71, carry out calculated calculating according to formula y1+ ((y1-y2) * (xi-x2))/(x1-x2) Result is 0x72, and this result of calculation is write the second depositor.
Step 118: control 3911 chips to export brewed amplitude, and data is sent to card with this amplitude, be then back to Step 102.
Step 119: open event triggering interruption by the value of the 4th depositor is written as the 3rd preset value, set to enumerator Put initial value;
In the present embodiment, the 4th depositor is as3911_irq_mask_dct, and the value of the 3rd preset value is preferably 0x8000, this step is specific to open event triggering interruption by the 3rd preset value is write the 4th depositor.
It is preferably provided with main control chip in the present embodiment to be up to 3 times to 3911 sending times sending order, it is preferred to use The initial value of enumerator is set to 3, stat commands sending times are come by successively decreasing of the counting of enumerator.In the same manner, enumerator Initial value can also be 0 or other numerical value, by the counting of enumerator incremental come stat commands sending times.
Step 120: send depth modulation order to 3911 chips and control 3911 chip execution automatic depth modulation, update meter The value of number device;
In the present embodiment, main control chip is cmd_calibrate_ to the depth modulation order that 3911 chips send Modulation, order value is 0x17.The value of described refresh counter is preferably and subtracts 1 by the value of enumerator.In the same manner, work as counting When the value initial value of device is 0, the value of described refresh counter is specially and adds 1 by the value of enumerator.
Step 121: receive the response byte that 3911 chips return, by removing the value close event triggering of the 4th depositor Interrupt;
Specific in the present embodiment, the response byte of the 3911 chips returns that main control chip receives is the shape of 2 bytes State word, such as 0,x00 00 or 0,x90 00.
Step 122: judge whether order runs succeeded according to described response byte, be then execution step 124, otherwise execute Step 123;
Specifically, main control chip judges whether described response byte is preset byte, is, represents that main control chip becomes power control Make 3911 chips and complete automatic depth modulation, execution step 124;Otherwise execution step 123.
For example, the value of preset byte is 0,x90 00.
Step 123: judge whether the value of enumerator is equal to pre-set count values, be then by counter O reset, report an error, exit, Otherwise return execution step 120;
Preferably, described pre-set count values are 0.
Step 124: send data by 3911 chips to card, be then back to execution step 102;
Specific in the present embodiment, main control chip passes through to send depth modulation order to 3911 chips, can control 3911 Chip exports brewed amplitude, thus improving the stability of read write line and card-to-card communication.
Embodiment 3
As shown in figure 3, a kind of near-field communication modulation depth self-reacting device that the present embodiment provides, comprising: main control chip 1st, contactless chip 2 and the first memory block 3;
Described main control chip 1 includes judge module 101, control module 102, searching modul 103, acquisition module 104, write Module 105 and computing module 106;
Described control module 102 is used for sending the measurement amplitude order described noncontact core of control to described contactless chip 2 Piece measures current amplitude value, for controlling described contactless chip 2 to export amplitude according to the value of the first depositor 201, for controlling Make described contactless chip 2 and send data according to the value output amplitude of the second depositor 202 and with this amplitude;
Described judge module 101 is used for judging that the immediate numerical value with current amplitude value that searching modul 103 finds is The no border row positioned at tables of data;
Described acquisition module 104 is used for obtaining current amplitude value from contactless chip 2;For obtaining from the first memory block 3 Tables of data;For when judge module 101 judge described with the immediate numerical value of current amplitude value positioned at the border row of tables of data when, Obtain numerical value in tables of data for the described immediate numerical value;For judging described and current amplitude when judge module 101 When being worth the border row that immediate numerical value is not located at tables of data, obtain immediate with described current amplitude value from tables of data Two values, and obtain the respective numerical value of described immediate two values;
Described computing module 106 be used for according to preset formula, acquisition module 104 being got with described current amplitude value Immediate two values, the respective numerical value of described immediate two values getting, and described current amplitude It is worth this five numerical value to carry out being calculated result of calculation;
Described searching modul 103 is used for searching the immediate numerical value with described current amplitude value in tables of data;
Said write module 105 is used for for the value of the first depositor 201 on contactless chip 2 being written as the first preset value; For when numerical value immediate with described current amplitude value is positioned at the border row of tables of data, acquisition module 104 being got Numerical value in tables of data for the described immediate numerical value writes the second depositor 202;For working as and described current amplitude value When immediate numerical value is not located at the border row of tables of data, the result of calculation that computing module 106 computing is obtained writes second Depositor 202;
Described contactless chip 2 includes the first depositor 201 and the second depositor 202;
Described first depositor 201 is used for depositing first preset value corresponding with unmodulated amplitude, described second depositor 202 are used for depositing and the numerical value corresponding to brewed amplitude;
First memory block 3, for data table memory;
Further, said apparatus also include initialization module 4, for device being carried out with initialization behaviour when electricity on device Make.Above-mentioned judge module 101 can be also used for whether judgment means will be sent out data by described contactless chip 2.
Described contactless chip 2 also includes the 3rd depositor 203, and said write module 105 is additionally operable to described noncontact The value of the 3rd depositor 203 on chip 2 is written as the second preset value.
Described contactless chip 2 also includes the 4th depositor 204, and said write module 105 is additionally operable to described noncontact The value of the 4th depositor 204 on chip 2 is written as the 3rd preset value.
As shown in figure 4, the control module 102 in the present embodiment includes transmitting element 1021, receiving unit 1022 and removes Unit 1023, described transmitting element 1021 is used for sending measurement amplitude order to contactless chip 2, and described receiving unit 1022 is used In receiving the response byte that described contactless chip 2 returns, described clearing cell 1023 is used for connecing when described receiving unit 1022 When receiving described response byte, remove the value of the 4th depositor 204 on described contactless chip 2.
Described control module 102 also includes the first judging unit 1024, for being received according to described receiving unit 1022 Described response byte judge order whether run succeeded.
Described control module 102 also includes the first arranging unit 1025, for sending order in described transmitting element 1021 Initial value is set to enumerator before, for the value of refresh counter after sending order in described transmitting element 1021, described the One judging unit 1024 is additionally operable to judge whether the value of enumerator is equal to pre-set count values, and described clearing cell 1023 is additionally operable to work as When described first judging unit 1024 judges that the value of described enumerator is equal to pre-set count values, by counter O reset.
Described contactless chip 2 also includes the 5th depositor 205, and described 5th depositor 205 is used for depositing described non-connect The current amplitude value that tactile chip 2 measures;Described acquisition module 104 includes reading unit, and described reading unit is used for from described 5th depositor 205 reads described current amplitude value.
Further, described control module 102 also includes the second arranging unit 1026, as shown in Figure 5 described judge module 101 include the second judging unit 1011, the 3rd judging unit 1012 and the 4th judging unit 1013.
Described second arranging unit 1026 is used for arranging initial value to the first variable, for judging when the 3rd judging unit 1012 First variable updates the first variable when being not equal to the total length of tables of data;
Whether described second judging unit 1011 is used for judging described current amplitude value more than the number pointed by the first variable According to the x value in table;
Described 3rd judging unit 1012 is used for when the judged result of the second judging unit 1011 is and is judging the first change Whether amount is equal to the total length of tables of data;
Described 4th judging unit 1013 is used for when the judged result of the second judging unit 1011 is no judging the first change Whether amount is equal to initial value;
Accordingly, said write module 105 is specifically for when described 3rd judging unit 1012 and the 4th judging unit 1013 judged result is will to write the second depositor with the y value gone together of x value in the tables of data pointed by the first variable when being 202, by when the judged result of described 4th judging unit 1013 is no by described computing module 106 according to preset formula based on The result of calculation obtaining writes the second depositor 202.
Preset formula described in the present embodiment is y1+ ((y1-y2) * (current amplitude value-x2))/(x1-x2), wherein, x1 Represent larger number in immediate two values compared with described current amplitude value, x2 represents compared with described current amplitude value Less number in immediate two values, y2 is the numerical value of x2, and y1 is the numerical value of x1.
Further in the present embodiment, described judge module 101 is additionally operable to will be executed according to default flag bit judgment means Modulation system, described control module 102 be additionally operable to when judging modulation system to be executed as tabling look-up modulation mode control institute State contactless chip 2 measurement current amplitude value, for controlling institute when judging modulation system to be executed as automatic Modulation mode State contactless chip 2 execution automatic depth modulation.
Fixing modulation depth is used, in order to adapt to the various external worlds in near-field communication in the design of traditional read write line The impact of factor, therefore also has higher requirement to the antenna part circuit design of read write line, selecting in circuit components Also there is degree of precision to require, be modulated the Automatic adjusument of depth using the implementation that the present invention provides, can very great Cheng The impact of extraneous factor in near-field communication is overcome on degree so that the antenna part circuit design of read write line and components and parts selection On all can be relatively simple.
The above, the only present invention preferably specific embodiment, but protection scope of the present invention is not limited thereto, Any those familiar with the art in technical scope disclosed by the invention, the change or replacement that can readily occur in, All should be included within the scope of the present invention.Therefore, protection scope of the present invention should be with scope of the claims It is defined.

Claims (22)

1. near-field communication modulation depth adaptive approach, is characterized in that, methods described includes:
Step s1: the value of the first depositor on contactless chip is written as the first preset value by the main control chip of device, described non- Contact chip exports amplitude according to the value of the first depositor;
Step s2: the main control chip of device sends measurement amplitude order to contactless chip, described contactless chip measurement is current Amplitude;
Step s3: the main control chip of device obtains current amplitude value from contactless chip;
Step s4: the main control chip of device obtains tables of data from the first memory block;
Step s5: the main control chip searching data table of device, judge in tables of data the immediate numerical value with described current amplitude value Whether it is located at the border row of tables of data, be then execution step s6, otherwise execution step s7;
Step s6: with described current amplitude value immediate numerical value going together in tables of data described in the main control chip acquisition of device Numerical value, and this numerical value is written to the second depositor on contactless chip, then execution step s8;
Step s7: the main control chip of device obtains the immediate two values with described current amplitude value from tables of data, and Obtain the respective numerical value of this two values, according to preset formula, four numerical value getting and described current amplitude value are entered Row calculates, and result of calculation is written to the second depositor on contactless chip, execution step s8;
Step s8: the contactless chip of device exports amplitude according to the value of the second depositor, and sends data with this amplitude.
2. the method for claim 1, is characterized in that: the main control chip that described step s1 also includes device passes through the 3rd The value of depositor is written as the second preset value and opens field.
3. the method for claim 1, is characterized in that: the main control chip that described step s2 also includes device passes through the 4th The value of depositor is written as the 3rd preset value and opens event triggering interruption.
4. method as claimed in claim 3, is characterized in that: described step s2 is specially the main control chip of device to noncontact core Piece sends measurement amplitude order and controls contactless chip measurement current amplitude value, and receives the response word of contactless chip return Section, and interrupted by removing the value close event triggering of the 4th depositor.
5. method as claimed in claim 4, is characterized in that: described step s2 also includes the main control chip of device according to described sound Answer byte to judge whether measurement amplitude order runs succeeded, be then execution step s3, otherwise report an error, exit.
6. method as claimed in claim 4, is characterized in that: the main control chip of described device sends measurement to contactless chip and shakes Also include before width order arranging initial value to enumerator, after sending described measurement amplitude order, also include refresh counter Value, also includes when judging that measurement amplitude order executes unsuccessfully judging whether the value of described enumerator is equal to pre-set count values, It is then by counter O reset, reports an error, exit;Otherwise again send measurement amplitude order to contactless chip.
7. the method for claim 1, is characterized in that: the main control chip that described step s3 is specially device is non-by reading The value of the 5th depositor on contact chip reads current amplitude value.
8. the method for claim 1, is characterized in that: described step s5 to step s7 particularly as follows:
Step a1: initial value is set to the first variable;
Step a2: judge that described current amplitude value, whether more than the x value in the tables of data pointed by the first variable, is then to execute step Rapid a3, otherwise execution step a5;
Step a3: judge that whether the first variable is equal to the total length of tables of data, be then execution step a6, otherwise execution step a4;
Step a4: update the first variable, be then back to step a2;
Step a5: judge that whether the first variable is equal to described initial value, be then execution step a6, otherwise execution step a7;
Step a6: described second depositor will be write with the y value gone together of x value in the tables of data pointed by the first variable, then Execution step s8;
Step a7: obtain the x value in the tables of data pointed by the first variable and the y value gone together with it, represented with x1 and y1 respectively, Obtain the first variable subtract 1 pointed by tables of data in x value and the y value gone together with it, represented with x2 and y2 respectively, according to default Formula is calculated, and result of calculation is write the second depositor, then execution step s8.
9. method as claimed in claim 8, is characterized in that: described preset formula be y1+ ((y1-y2) * (current amplitude value- x2))/(x1-x2).
10. the method for claim 1, is characterized in that: also include before described step s2 the main control chip of device according to Default flag bit judges modulation system, if tabling look-up modulation mode then execution step s2, if automatic Modulation mode then device Main control chip controls contactless chip execution automatic depth modulation.
11. the method for claim 1, is characterized in that: also include before described step s1,
Step s0: device power-up initializing;
Step s1: the main control chip of device determines whether to be sent out data by contactless chip, is then execution step s1, Otherwise continue executing with this step;
Accordingly, return execution step s1 after having executed described step s8.
12. near-field communication modulation depth self-reacting devices, is characterized in that: described device include main control chip, contactless chip and First memory block;
Described main control chip includes control module, judge module, acquisition module, computing module, searching modul and writing module;
Described control module is used for sending the described contactless chip of measurement amplitude order control and measuring to described contactless chip working as Front amplitude, for controlling described contactless chip to export amplitude according to the value of the first depositor, for controlling described noncontact Chip exports amplitude and with this amplitude transmission data according to the value of the second depositor;
Described judge module is used for judging whether the immediate numerical value with current amplitude value that described searching modul finds is located at The border row of tables of data;
Described acquisition module is used for obtaining current amplitude value from contactless chip;For obtaining data from described first memory block Table;For when described judge module judges the described border row being located at tables of data with the immediate numerical value of current amplitude value, obtaining Take numerical value in tables of data for the described immediate numerical value;For judging described and current amplitude value when described judge module When immediate numerical value is not located at the border row of tables of data, obtain and described current amplitude value immediate two from tables of data Individual numerical value, and obtain the respective numerical value of this two values;
Described computing module is closest with described current amplitude value for got to described acquisition module according to preset formula Two values and the respective numerical value of this two values, and this five numerical value of described current amplitude value are calculated Result of calculation;
Described searching modul is used for searching the immediate numerical value with described current amplitude value in tables of data;
Said write module is used for for the value of the first depositor on contactless chip being written as the first preset value;For ought described sentence When disconnected module judges the described border row being located at tables of data with the immediate numerical value of current amplitude value, described acquisition module is obtained To numerical value in tables of data for the described immediate numerical value write the second depositor;For judging when described judge module When the described and immediate numerical value of current amplitude value is not located at the border row of tables of data, will be calculated for described computing module Result of calculation writes the second depositor;
Described contactless chip includes the first depositor and the second depositor;
Described first depositor is used for depositing first preset value corresponding with unmodulated amplitude, and described second depositor is used for depositing With the numerical value corresponding to brewed amplitude;
Described first memory block, for data table memory.
13. devices as claimed in claim 12, is characterized in that: described contactless chip also includes the 3rd depositor, said write Module is additionally operable to for the value of the 3rd depositor on described contactless chip to be written as the second preset value.
14. devices as claimed in claim 12, is characterized in that: described contactless chip also includes the 4th depositor, said write Module is additionally operable to for the value of the 4th depositor on described contactless chip to be written as the 3rd preset value.
15. devices as claimed in claim 14, is characterized in that: described control module includes transmitting element, receiving unit and removing Unit, described transmitting element is used for sending measurement amplitude order to contactless chip, and described receiving unit is used for receiving described non- The response byte that contact chip returns, described clearing cell is used for when described receiving unit receives described response byte, clearly Value except the 4th depositor on described contactless chip.
16. devices as claimed in claim 15, is characterized in that: described control module also includes the first judging unit, described first Judging unit is used for judging whether measurement amplitude order runs succeeded according to the described response byte that described receiving unit receives.
17. devices as claimed in claim 15, is characterized in that: described control module also includes the first arranging unit, described first Arranging unit is used for arranging initial value to enumerator before described transmitting element sends measurement amplitude order, in described transmission Unit sends the value of refresh counter after measurement amplitude order, and whether the first judging unit is additionally operable to judge the value of enumerator etc. In pre-set count values, described clearing cell is additionally operable to judge the value of described enumerator equal to pre-designed when described first judging unit During numerical value, by counter O reset.
18. devices as claimed in claim 12, is characterized in that: described contactless chip also includes the 5th depositor, the described 5th Depositor is used for depositing the current amplitude value that described contactless chip measures;Described acquisition module includes reading unit, described Reading unit is used for reading described current amplitude value from described 5th depositor.
19. devices as claimed in claim 12, is characterized in that: described control module includes the second arranging unit, described judgement mould Block includes the second judging unit, the 3rd judging unit and the 4th judging unit, and described second arranging unit is used for the first variable Setting initial value, for judging that the first variable updates the first variable when being not equal to the total length of tables of data when the 3rd judging unit;Institute State the second judging unit for whether judging described current amplitude value more than the x value in the tables of data pointed by the first variable;Institute State the 3rd judging unit for judging when the judged result of described second judging unit is and is whether the first variable is equal to data The total length of table, described 4th judging unit is used for judging the first variable when the judged result of described second judging unit is no Whether it is equal to initial value;
Said write module is specifically for will be with when the judged result of described 3rd judging unit and the 4th judging unit is and is The y value of the x value colleague in tables of data pointed by the first variable writes the second depositor, for sentencing when described 4th judging unit When disconnected result is no, described computing module is write the second depositor according to the calculated result of calculation of preset formula.
20. devices as claimed in claim 12, is characterized in that: described preset formula be y1+ ((y1-y2) * (current amplitude value- X2))/(x1-x2), wherein, x1 represents larger number in the immediate two values with described current amplitude value, and x2 represents and institute State less number in the immediate two values of current amplitude value, y2 is the numerical value of x2, y1 is the numerical value of x1.
21. devices as claimed in claim 12, is characterized in that: described judge module is additionally operable to according to default flag bit judgment means Modulation system to be executed, described control module is used for judging modulation system to be executed as modulation of tabling look-up when described judge module Control described contactless chip measurement current amplitude value, for judging modulation system to be executed when described judge module during mode Control described contactless chip execution automatic depth modulation during for automatic Modulation mode.
22. devices as claimed in claim 12, is characterized in that: described device also includes initialization module, described initialization module For device being carried out with initialization operation when electricity on device, described judge module is additionally operable to determine whether to non-connect by described Tactile chip is sent out data.
CN201410512906.1A 2014-09-29 2014-09-29 Near-field communication modulation depth adaptive method and device Active CN104298152B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410512906.1A CN104298152B (en) 2014-09-29 2014-09-29 Near-field communication modulation depth adaptive method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410512906.1A CN104298152B (en) 2014-09-29 2014-09-29 Near-field communication modulation depth adaptive method and device

Publications (2)

Publication Number Publication Date
CN104298152A CN104298152A (en) 2015-01-21
CN104298152B true CN104298152B (en) 2017-01-25

Family

ID=52317931

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410512906.1A Active CN104298152B (en) 2014-09-29 2014-09-29 Near-field communication modulation depth adaptive method and device

Country Status (1)

Country Link
CN (1) CN104298152B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104899623B (en) * 2015-05-29 2017-09-29 福建联迪商用设备有限公司 A kind of method, system and the equipment of control Non-contact Media Reader modulation depth
CN108446576B (en) * 2018-01-17 2021-02-05 艾体威尔电子技术(北京)有限公司 Terminal modulation depth self-adaption method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101753267A (en) * 2008-12-02 2010-06-23 索尼株式会社 Communication device, communication method, computer program and computer system
CN101909336A (en) * 2009-06-03 2010-12-08 卡西欧计算机株式会社 Use different communication modes to communicate the wireless communication system of handing-over
AT512804A2 (en) * 2012-05-15 2013-11-15 Stefan Ing Ponsold NFC card with low pressure profile

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070026825A1 (en) * 2005-02-24 2007-02-01 Innovision Research & Technology Plc NFC device and apparatus
JP5717412B2 (en) * 2010-11-26 2015-05-13 ルネサスエレクトロニクス株式会社 Semiconductor device for wireless communication
US9384373B2 (en) * 2011-10-26 2016-07-05 Qualcomm Incorporated Adaptive signal scaling in NFC transceivers

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101753267A (en) * 2008-12-02 2010-06-23 索尼株式会社 Communication device, communication method, computer program and computer system
CN101909336A (en) * 2009-06-03 2010-12-08 卡西欧计算机株式会社 Use different communication modes to communicate the wireless communication system of handing-over
AT512804A2 (en) * 2012-05-15 2013-11-15 Stefan Ing Ponsold NFC card with low pressure profile

Also Published As

Publication number Publication date
CN104298152A (en) 2015-01-21

Similar Documents

Publication Publication Date Title
CN104298152B (en) Near-field communication modulation depth adaptive method and device
CN107367327A (en) Calibration method, device, mobile terminal and the readable storage medium storing program for executing of optical sensor
CN107239106A (en) A kind of recognition methods of power supply adaptor and device
CN102194286A (en) Integrated machine for automatically selling and repurchasing gold and realizing method thereof
CN105894270A (en) Payment method and device
CN203444488U (en) ISO7816 standard IC card and non-contact intelligent card reading module
CN104461902A (en) Financial payment test platform, method and system
CN107071704A (en) The open method and device of the mode of operation of NFC chip
CN103839322B (en) Intelligent card, verification data output method, operation request response method and system
TWM592994U (en) Control system of accessing data
CN101520339A (en) Transferring device of weighing data on electronic weighing instrument and transferring method
CN104408612B (en) The information interacting method of intelligent metering instrument Internet of Things
CN211606520U (en) Security chip based on SIM function
CN203882314U (en) Data interaction system
CN106788919A (en) Self adaptation cut position I/Q data real-time monitoring implementation method in a kind of gridding receiver
CN202486892U (en) Electronic transaction all-in-one machine for agricultural product wholesale market
CN203338379U (en) Card-type read-write equipment based on double-standard audio interface
CN111307195A (en) Universal sensor calibration method, device, equipment and computer readable storage medium
CN101923631B (en) CPLD-based low-frequency ID card real-time simulator
CN204759460U (en) True card manager
CN203929198U (en) A kind of electronic scales of rapid payment
CN109783395A (en) Memory pool access method, exchange chip, memory modules and electronic equipment
CN204719957U (en) Microstrain detecting device wireless transport module
CN107515828A (en) A kind of data read-write method and mobile terminal
CN113286357B (en) Communication method and device between intelligent cards and storage medium

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