1. A circuit connectable to a microcontroller having an address bus, a data bus, a read line and a write line, the circuit comprising: a programmable logic device (PLD) array; at least one input pin connected to said PLD array and connectable to said address bus; at least two databus macrocells, connected to said PLD array and to an external unit and connectable to said data bus, said read line and said write line, which said databus can directly access; and a bit mask register having at least two bits, each associated with one of said at least two macrocells, for selecting which of said macrocells said databus does directly access.