thanks everybody for your answers, and sorry for my not-clear-enough question!
Focalist found what i'm looking for, i will try to work this during the week end.
what i want to do is driving a relay based card to control the gain of an audio device, sometime i need to send the pot value, sometimes i need to send a "preset" value.
the card has 6 relays with 1,2,4,8,16 and 32 dB of attenuation
i'll soon let you know how is it going...