Digital ballast