Setting pins to specific voltages

I am using Atmel Studio 7 to program my Arduino and am just having an issue setting specific pins to certain voltages. For example, I want to set Pin 4 in PORT C to 2.75 V, how can I do that? I only know how to set them to high (5V) or low (0V).

You can read this: analogWrite and this Arduino RC Circuit: PWM to Analog DC.
This only works on PWM Pins. Alternatively you can use an external DAC.

Or use a processor that has a built in DAC...

" I want to set Pin 4 in PORT C to 2.75 V, how can I do that? I only know how to set them to high (5V) or low (0V)."

If it is always a single discrete voltage for that pin, you might set the pin for 5v and then use an attached pot or voltage divider to supply the desired output voltage.

Google: ‘voltage divider’.

...Just in case it's not clear, the regular Arduino doesn't have true-analog outputs. analogWrite() "fakes it" with PWM. PWM can be low-pass filtered to get analog (although this is often "imperfect").

PWM can control the speed of a motor, dim an incandescent lamp, or it can make an LED appear dim.

The Arduino does have an ADC and a true-analog input.