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.
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.
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.
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,
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.
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).
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.
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.
thanks for mentioning this. The server got moved. I have fixed the link. The server's address now is "www.klayout.org".
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 !
sorry for the dumb question, but what is a DataMatrix pattern?
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.
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?
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.
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.
I have an application where I need to generate up to a few thousand unique QR codes all with a unique position on the layout.
I am able to generate and place unique text(with a text size) where I need it. After placing the text, I can convert it to polygon. Instead of selecting all of the text and converting it to polygon through 'Convert to PCell>basic.text', is there an easy method to select all of the text and convert it to a QR code with the pixel size being the text size?
Any help would be appreciated.
sorry, I noticed your message just now.
The procedure is basically the same as for text. But the parameters you need to set are different ones:
text(string) for the text to show
layer(LayerInfo) for the layer to place the QR code on
pixel_size(double) the size of the pixels in micrometer
bias(double) a positive or negative per-side bias to apply (in micrometers) - default is 0 (no bias)
format(int) the format type (0: Bytes, 1: Numeric, 2: Alphanumeric) - controls the character set. "Bytes" is raw bytes and is the default choice.
ecc_level: (int) error correction level (0: Auto, 1: L, 2: M, 3: Q, 4: H) - 1 to 4 are increasing level of error correction. A higher value means less payload. 0 (Auto) is the default and probably the best choice.
inverse: (bool) If true, the pattern is inverted
Hope this helps.