Board for atomatic creation of EAN

Hello everyone,

I would like to create a board that can automatically generate EAN. As we know, an EAN consists of 13 digits. The last digit is a check digit. Our EAN block has 8 identical digits, followed by 4 digits from 0001 to 9999, together that’s 12 digits. So the check digit is still missing.

Is there a way to calculate the check digit automatically?