How to create QRcode page4

top page   previous page   next page

top page > QRcode > How to create QRcode > page4: Data allocation.

2.4 Data allocation

In QRcode,1 module means 1 bit. Result data in previous section are encoded to binary representation, and we allocate these encoded data. In addition when RS block number (see table5) is 2 or higher, we should allocate data in interleaved. In example data, for 1-H has 1 RS block,we skipped how to interleave.

We allocate fixed pattern which is "finding pattern" and "timing pattern" in advance.

Rule for allocation

1. Now we think coordinate which has i lines j columns, and upper left corner is (0,0).
For example, in version 1 this has modules from (0,0) to (20,20).

2. Start module is lower right corner.
In example data (1-H), start module is (20,20), and we put a data (0 or 1).

3. Direction of movement (upper or lower) is kept. Direction is upper in first.

4. We think 2 modules width.
If we are in right module of 2 modules width....
If left module is blank (not fixed pattern or version information etc), we move left module and put data.
If left module is not blank, we move in direction which is kept, and put data

If we are in left module....
We check that blank module is in direction which is kept. If blank module is, we put data in right module in priority to left module of 2 modules width.
If blank module is not,we move to a left module, and put data there.Then we turn
direction which is kept.

Example

If we have data "01234567 89ABCDEF GHIJKLMN" (We really have 0 or 1 in QRcode...) and we put this data in 6*4 matrix...

DCBA
FE98
HG76
JI54
LK32
NM10





(^first direction)


In same data, fixed pattern "*" is existed in 4*2 center...

9876
A**5
B**4
C**3
D**2
FE10





(^first direction)




Below figure is put finder pattern,timing pattern and code words in example data.

soon after putting


next page : Mask pattern.

previous page    [1] [2] [3] [4] [5] [6] [7]   next page