Signal generation requires two parameters to be controlled.
To control the amplitude, you have to use DAC which will give Analog voltage on output pin.
To control frequency, you can use keys, keypad etc. for entering the frequency value. Another option is use ADC for this.
The output of ADC controlles the sampling rate and hence you can obtain variable frequency output.
All the best.