A battery-powered hearing aid (1) is programmed via a programming device
(2), the hearing aid (1) having a battery (11) and a line connection (3,
4) for connecting the battery (11) to the programming device (2). The
programming device uses a variable voltage source (5) and an input
comparator (6) with a first and a second input terminal and an output
terminal to output a variable voltage to one input of the input
comparator (6) and determining the voltage of the hearing aid battery
(11) by using the second input of the input comparator (6) of the
programming device (2). By ramping the output of the variable voltage
source (5) used as a reference, the voltage of the battery (11) can be
determined with great accuracy using existing hearing aid programming
circuitry.