A low cost high resolution pattern generator for electron-beam lithography