how to get 3.3 V on digital output pins

Hello,
In my application, i am using arduino mega 2560.
Application is like this…
Over the serial communication i am getting some numeric data, which i am converting in binary and writing it on IO ports.
For powering and serial communication, i am using USB cable, which gives me around 4.8 v (Approx 5 v).
I want 3.3 v , on output pins as i have total 5 port on which i want to write.
One option i have found is using ULN2803 IC, But for 5 ports i need total 5 IC which will make the board little bulky.
Is there any option available,by which i can get the 3.3 v on output pin.
I have read some where if we power up the arduino by 3.3v power supply, then it will generate 3.3 v on output pins.
Please suggest some solution for serial communication and 3.3v on output pins.

Thank you

You can't get 3.3v on an I/O pin for a 5v Arduino.

You can't power a Mega from 3.3v because its oscillator runs at 16MHz and that is too fast for 3.3v.

You could make a voltage divider with a pair of resistors (for each I/O pin) to drop the 5v to 3.3v.

You have not told us why you need a 3.3v output - it is much easier to help when we know.

...R

If you really need 3.3V outputs, then your best bet is to use 7HC4050 powered from 3,3V. It is designed to accept higher voltage inputs and to output at the VCC level it is powered from.

https://www.digikey.com/products/en/integrated-circuits-ics/logic-buffers-drivers-receivers-transceivers/704?k=cd74hc4050&k=&pkeyword=cd74hc4050&pv69=80&sf=0&quantity=&ColumnSort=0&page=1&stock=1&pageSize=25

Hello Robin,
Thanks for your reply.
Arduino out pins are connected with the input pins of another controller, which works on 3.3v ,having active low configuration via internal pull up resistor.
When my output from arduino is high (it should be 3.3 v) the another controller will read as 0 and when it is low it will read 1.
I can not make changes to the controller side , only thing which i can do is to generate the output of 3.3v from arduino.

i was reading about USB to TTL converter, Which can give you the 3.3 v output for power up the arduino and RX TX pin.
Can this works for me ??

Hello Cross road,
Is there any other option available, apart from the chip which converts 5 volts to 3.3 volt,Because ULN IC doing the same thing.

suyash_barodiya:
Arduino out pins are connected with the input pins of another controller, which works on 3.3v ,having active low configuration via internal pull up resistor.

If the other device keeps its I/O pin HIGH when nothing is connected to it then all you need is a diode between the Mega's pin and the other device's pin oriented in such a way as to block the 5v from reaching the other device. Then when the Mega's pin is LOW it will pull the other pin LOW

...R

"level shifter" is the term for a device converting logic signals at one voltage to another.

A simple series resistor can do the job (esp if ultra high speed operation isn't required) - try
2k2 or so - this doesn't require the receiving end to have a pullup, or use the diode as
described above with a pullup resistor to 3V3 at the receiving side.

Some 3V3 logic families tolerate 5V on their inputs, for instance 74LCX, so can be used as
"glue logic" between different voltages.