Barcode Interface
Barcode Interface
Barcode Interface
The best barcode scanners are so accurate that they make only one
mistake in something like 70 million pieces of scanned information!
Codes
❑ UPC- Universal
Product Coding
❑ EAN-European
Article Number
❑ Numbers to be coded
consist of-
❑ Prefix(1 digit for UPC, 2
for EAN)
❑ Manufacturer number (5
digits)
❑ Item reference (5 digits)
❑ Check digit (1 digit)
13
Codes
❑ UPC-A is 12 digit number
❑ The scan able area of every UPC-A barcode follows the pattern
SLLLLLLMRRRRRRE,
-where S (start), M (middle), and E (end) guard patterns are
represented the same way on every UPC-A barcode and the L
(left) and R (right) sections collectively represent the 12
numerical digits that make each UPC-A unique.
❑ The total width for a digit is always 7 modules; consequently,
❑ UPC-A 12-digit number requires a total of 7×12 = 84 modules.
❑ A complete UPC-A is 95 modules wide: 84 modules for the digits,
combined with 11 modules for the S (start), M (middle), and E
(end) guard patterns.
14
Codes
❑ Codes used on either side of the center line are different so that
the direction of scan can be determined
❑ A scanner can determine whether it is scanning a symbol from
left-to-right or from right-to-left (the symbol is upside-down).
❑ After seeing a S (start) or E (end) guard pattern (they are the
same, bar-space-bar, whichever direction they are read), the
scanner will first see odd parity digits, if scanning left-to-right,
or even parity digits, if scanning right-to-left.
❑ With the parity/direction information, an upside-down symbol
will not confuse the scanner.
❖ When confronted with an upside-down symbol, the scanner may
simply ignore it or recognize the digits and put them in the right
order.
14
Codes
❑ For UPC
❑ Left hand digits are encoded using ‘Left Hand A’
❑ For EAN
hand digits are encoded using mixture of ‘Left
❑ Left
Hand A’ and ‘Left Hand B’
❑ The first digit determines which coding to use for each
of the remaining six digits.
15
Codes
❑ For UPC
❑ Left hand digits are encoded using ‘Left Hand A’
❑ For EAN
❑ Left hand digits are encoded using mixture of ‘Left Hand A’
and ‘Left Hand B’
❑ The first digit determines which coding to use
for each of the remaining six digits.
17
Example-1
Code: 9 780340 606 582 Total digit 13 EAN
9 (Table 7.2) A B B A B A
First 6 digits after 9
7 8 0 3 4 0
Left Hand Left Hand Left Hand Left Hand Left Hand Left Hand
A B B A B A
0111011 0001001 0100111 0111101 0011101 0001101
Last 6 digits
6 0 6 5 8 2
Right Hand Right Hand Right Hand Right Hand Right Hand Right Hand
1010000 1110010 1010000 1001110 1001000 1101100
17
Example-2
Code: 012345 678905 Total digit 12 UPC
First 6 digits
0 1 2 3 4 5
Left Hand Left Hand Left Hand Left Hand Left Hand Left Hand
A A A A A A
0001101 0011001 0010011 0111101 0100011 0110001
Last 6 digits
6 7 8 9 0 5
Right Hand Right Hand Right Hand Right Hand Right Hand Right Hand
1010000 1000100 1001000 1110100 1110010 1001110
18
1.7+0+4+6+6+8=31
2. 31 x 3=93
3. 9+8+3+0+0+5=25
3. 25+93=118
4. 118+X=120 (next highest number multiple of 10)
X=120-118=2