It looks like you're new here. If you want to get involved, click one of these buttons!
Maybe somebody will need this:
This PCell macro will provide a new library "QRCodeLib" with a single PCell "QRCode". The latter is able to produce QR code for a given text. It provides some options to adjust the appearance of the QR code.
Enjoy,
Matthias

Comments
Hi,
You can just drag the file to the Klayout window. KLayout should ask then whether to install the file permanently.
Depending on your Proxy settings you may be even able to drag the link above to KLayout's Window.
Matthias
/Thomas
How do I use it? I have tried so many ways of using it but can't get a QR code drawn so please help me and describe how I get it to work.
/Thomas
Hi,
Are you familiar with the basics of IC layout? The QR code PCell is, as the name implies, as PCell. In order to use it,
Matthias
I am not familiar with the basics in IC design but I am familiar with designing for E-beam, which I am using KLayout for. I have used Pcell mainly for making text into polygons that can be written by E-beam.
Back to teh QR code: I am not getting a QR code by using this PCell. I get an array of 5000x20000 elements. A QR code is a square so I am guessing that I am doing something worng here.
I don't get the Pixel size and the Pixel bias either, I have tried several different settings and I get an array of 5'x20' each time. I am going to use it to create a code that points to our company website.
Br
/Thomas
Hi Thomas,
sorry for that question - I just wanted to make sure you're not somebody mistaking the thing with one of the many
QR code generators out there.
Regarding your problem: could you check that "Array" is not enabled on the first tab of the instance properties sheet? Plus of course enough hierarchy levels must be selected (press "*" to enable all).
Matthias
Yep, the Array was checked so now when I have unchecked it, the QR code script works for me as well.
This is a classical case of learning by doing (mistakes) ;-).
And the pixel size decides the size of the QR code. It now works för me to generate the web site QR codees I need.
/Thomas
Thank you for sharing this QR Code PCell.
I don't know what happened to the original link, but it was copied earlier to E4K. After you install it, look under the Examples menu, PCells submenu.
Hi all,
thanks for mentioning this. The server got moved. I have fixed the link. The server's address now is "www.klayout.org".
Best regards,
Matthias
Thanks for sharing the QR code PCell macro. I am wondering is there a way to generate the DataMatrix pattern as well ? Or how should I change the algorithm based on your baseline code? Another question is that if I have a bunch of coded data, say 1000 rows and I want to translate them into the QR code pattern. How should I use your PCell in my own Macro. Sorry, I am kind of new to KLayout and need to learn how to program from the beginning. I would appreciate if you could point me a direction. Thanks !
Hi,
sorry for the dumb question, but what is a DataMatrix pattern?
Matthias
Thanks for reply. It's a 2D bar code format similar to QR code but with a different algorithm to generate. Datamatrix can be coded with more information within same area. Here are some good comparisons between these two different 2D bar codes.
https://qrworld.wordpress.com/2011/09/26/qr-codes-versus-data-matrix/
https://blog.matthews.com.au/datamatrix-and-qr-codes-why-2d-codes-are-still-relevant-in-2016/
Thank for this information.
Right now, there is no Datamatrix generator - it's entirely different from QR code. I got some basic understanding from the documentation, but no detailed specification. There seems to be technical standard which is not publicly available. I found one open source implementation https://sourceforge.net/projects/datamatrixnet, but that's it.
After all, it does not seem to be a quick project. Do you know of any applications that require datamatrix encoding?
Regards,
Matthias
Sorry for a late reply. Due to the compact size of the pattern, it has been widely used in various industries, like semiconductor, automobile, healthcare, printing etc. The US Electronic Industries Alliance (EIA) recommends using Data Matrix for labeling small electronic components. It can be marked directly onto components using ink-jet, dot-peen marking, laser marking. I will look for any source code as well and let you know if I find anything.
Hello,
I guess the .NET implementation is a good staring point. But I don't have a specification. Technical standards are not freely available and I'm a bit cautious not to violate IP rights. An open source implementation essentially is making a specification public.
If you are able to gain clarity regarding this legal topic, an implementation isn't far away.
Regards,
Matthias