Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

5V to 1.8V level conversion

Status
Not open for further replies.

dsc

Member
Hi guys,

anyone knows any ways of converting PIC uC 5V outputs to 1.8V? I've got a low power SRAM chip (23A640) which works with 1.55-1.95V and I'm trying to get it working in SPI mode with a PIC16f877A. The pins on the device are as follows:

- clock, serial data in (data coming from the PIC) and chip select, all coming from the PIC
- power supply which can come from a 1.8V voltage regulator
- serial data out (going from the SRAM to the PIC)

Currently I'm using simple voltage dividers (360ohm/220ohm) for the PIC outputs and power supply and I'm using a transistor to increase the 1.8V on the serial data out pin to 5V, so the PIC can handle that as well. For some reason this doesn't work as it should, so I'm looking for other ways of making the 5V-1.8V / 1.8V-5V conversion.

Thanks in advance for any help.

Regards,
Tom
 
That sounds fine, I presume you're inverting the data from the transistor in software?. If you're not, then you need two transistors, so as to invert it back.
 
Write the Code on the PIC end so that it writes a 0 once at PowerUp to a Port Pin. The 0 is never changed. Wire a pull up resistor from that pin to +1.8V. To toggle the logic level at that pin, alternate between writing a 1 or 0 to the TRIS ENable bit for that pin.

To get a 0, the NFet inside the port logic pulls the pin to ground, sinking the current supplied by the pull-up resistor.
To get a 1, the NFET is turned off because the port is converted to an input, allowing the pull-up resistor to pull the pin to 1.8V and no higher. That will meet the RAM's requirements.
 
Hi guys,

thanks for the ideas, turned out it was the settings for the SPI that caused the problems.

I am indeed inverting the data by doing a XOR with 0xFF.

Regards,
dsc.
 
Status
Not open for further replies.

Latest threads

Back
Top