Skip to content
Electronic and Acoustic Engineering
ISSN 2524-2725 · e‑ISSN 2617-0965 Open Access · CC BY-NC 4.0
Vol. 3 · Issue 1 · 2020 Mar 31, 2020 Electronic Systems and Signals

QR-Code Generator Based on FPGA

YS
Yaroslav Volodymyrovych Sokol Corresponding National Technical University of Ukraine “Igor Sikorsky Kyiv Polytechnic Institute” Ukraine
AV
Anton Yuriiovych Varfolomiiev National Technical University of Ukraine “Igor Sikorsky Kyiv Polytechnic Institute” Ukraine
Pages38 - 42 PublishedMar 31, 2020 LicenseOpen Access
VOL 3 · ISS 1 · 2020 View issue

Abstract

The IP-core for QR-code generation, which supports codes of the first version and the M-type level of correction (allows to recover information from damaged up to 15% code image) is developed. Based on this IP-core and the DE1SoC development board, containing the Cyclone V FPGA chip, the real QR-code generation device was implemented. The device uses the PS/2 interface to enter text data that should be encoded in the QR-code and output the result (generated code) on a VGA monitor as an image. The suggested device has the following structure: the control module, the IP-core for QR-code generation and I/O modules. The control module performs the general device management and implemented as the state machine, which has the following states: reset and memory cleaning, read the text that should be encoded from  the keyboard, create the main part of the QR-code, create correction data, combine the correction data with the main part of the QR-code, transform the result into a 21x21 pixel matrix and displaying the code on the screen. The input module reads the keyboard signals (synchronization and data signals) and converts them into the ASCII codes. To do this, on each falling edge of the synchronization signal the values of the data signal are registered and propagated to the 8-bit bus. Since the keyboard may have a contact bounce, this module additionally filters the received data using the delay filtering. The output module is the VGA controller that simply generates the necessary clock signals for the proper VGA monitor functioning. After the QR-code is generated, its matrix is enlarged and passed to the VGA controller. Also, in parallel with that, the text, which was encoded in the code, is printed on the display. The IP block for QR-code generation consists of three submodules. The first one receives a text in ASCII format (now only 14 characters are supported) and generates the primary sequence of data to be encrypted in the code. The second submodule calculates the correction data using the Reed-Solomon algorithm. To use this algorithm, the additional array is reserved to store the correction data. This array is filled with special information, depending on the level of correction and the code version number. The algorithm also requires tables of the forward and reverse Galois fields, which are precalculated and stored in the submodule’s ROM. The third module generates the matrix itself: it places the alignment patterns, the information of the used type of mask, level of correction, and adds timing patterns. After that, the mask superimposed on the data generated by the previous module, and the result is copied to the matrix code in the required order. 

Keywords

References

  1. "Generator QR codov [Генератор QR кодов]," [Online]. Available: http://qrcoder.ru/. [Accessed 15 03 2020].
  2. "Pochemu nam stoit prismotret'sya k QR-kodam v 2019 godu [Почему нам стоит присмотреться к QR-кодам в 2019 году]," [Online]. Available: https://lifehacker.ru/qr-kody-v-2019-godu/. [Accessed 15 03 2020].
  3. "PLIS (FPGA) i mikrokontroller. V chem raznitsa? [ПЛИС (FPGA) и микроконтроллер. В чем разница?]," [Online]. Available: http://micro-proger.ru/2016/03/17/plis-fpga-i-mikrokontroller-v-chem-raznica/. [Accessed 15 03 2020].
  4. "Verilog Language ," [Online]. Available: https://en.wikipedia.org/wiki/Verilog. [Accessed 15 03 2020].
  5. "ASCII," [Online]. Available: https://en.wikipedia.org/wiki/ASCII. [Accessed 15 03 2020].
  6. "Algoritm generatsii QR-koda [Алгоритм генерации QR-кода]," [Online]. Available: https://habr.com/ru/post/172525/. [Accessed 15 03 2020].
  7. K. Kasperski, "Polinomial'naya arifmetika i polya Galua, ili Informatsiya, voskresshaya iz pepla [Полиноминальная арифметика и поля Галуа, или информация, воскрешая из пепла]," Sistemniy administrator, p. 84–90, 2003. "Wounded QR codes," [Online]. Available: http://datagenetics.com/blog/november12013/index.html. [Accessed 15.03.2020].
  8. "Algoritmy raspoznavaniya graficheskogo markera [Алгоритм
  9. распознавания графического маркера]," [Online]. Available: https://studbooks.net/2238811/informatika/algoritmy_raspoznavaniya_graficheskogo_markera. [Accessed 15.03.2020].
  10. Terasic DE1-SoC User Manual, 2014, p. pp. 30–33.

License

CCBY-NC 4.0
Creative Commons Attribution 4.0 International

This work is openly licensed — share and adapt freely with attribution to the authors and the journal. View license terms ↗

§ 06 — Related

Similar articles in this journal

Related peer-reviewed studies published in this journal.
View all issues

Electronic Assistant for Impaired People

Andrii Andriiovych Pakhomov, Roman Petrovych Sahan

For people with serious visual impairments, a system is proposed that helps to identify obstacles and call for help in an emergency situation. The system is based on a…

#microcontroller #GPS module #GSM module #optical sensor
p. 227781-1 - 227781-4
10.20535/2617-0965.eae.227781

Similar Articles

1-10 of 15

You may also start an advanced similarity search for this article.