A few questions about logic level/voltage shifting
rwgast_logicdesign
Posts: 1,464
Ok so ive been working with a propeller based logic analyzer (propalyzer) for a while. And yesterday I also recived a bus pirate which i ordered for a specific reason and was sad to find out that it is advertived in a little bit of a shady.. I need to use both of these tools in onrder to repair a cell phone, which apparently operates at 2.5v logic not 3.3. The bus pirates UART sniffing turns out to only be good down to 3.3vs reguardless of what some advertisers of the productwould have you belive. I specifically ordered the tool instead of using a prop plug hoping it would scale the voltages level to whatever i needed.
What I was hoping is that first and formost maybe someone could explain to me how i might use some common components to fit inline with a probe so i can boost the cell phones logic voltage from 2.5 to 3.3 so it will be able to be read by my propalyzer setup and the bus pirate. I have various resistors/caps bjt3904/3906 transistors 1n4001 diodes just common stuff im hoping can boost the voltage up without ordering something special this is just a quick hack to getthings working!
The second question I have is i have been looking into building a dedicated logic analyzer based on the propeller, i would like it to be able to shift voltages from 5v to 1.2v to the propellers 3.3v logic. Ive been googling around and havent found a shifter ic or circuit capable of doing this... Does anyone have any suggestions on how to implement something like this?
What I was hoping is that first and formost maybe someone could explain to me how i might use some common components to fit inline with a probe so i can boost the cell phones logic voltage from 2.5 to 3.3 so it will be able to be read by my propalyzer setup and the bus pirate. I have various resistors/caps bjt3904/3906 transistors 1n4001 diodes just common stuff im hoping can boost the voltage up without ordering something special this is just a quick hack to getthings working!
The second question I have is i have been looking into building a dedicated logic analyzer based on the propeller, i would like it to be able to shift voltages from 5v to 1.2v to the propellers 3.3v logic. Ive been googling around and havent found a shifter ic or circuit capable of doing this... Does anyone have any suggestions on how to implement something like this?
Comments
These come in quad packages, so it would only take two to make one Byte. But if you require 32 bits, you would have to use eight of them.
The LMV339 only goes down to 2.7 volts for operating voltage. But the threshold can be set lower than that.
Actually, a standard LM339 might also work quite well. This is a regular voltage comparator and can operate at near 2 volts. The actuall operating voltages is not the true issue, where you set the trigger point is. So by setting the trigger point for transition from 0 to 1 at the appropriate point that can be less than 2 volts, you could have the output tied to +5 pull up and get 0 to +5 logic. With a 3.3V pull up you would get +3.3v logic.
The configuration is possible because of open collector outputs.
Going the other direction is more demanding. There are level shifting chips and I suspect these may give the best results at 1.2v logic is quite low. "The Art of Electronics" has become a bit out-dated as its discussion of logic levels does not cover these devices.
-Phil
The comparators have 2 inputs. The + input would be used for the signal you want to see, and the - input would go to a dac or similar circuit that provides the threshold voltage for the logic level you are analyzing. For instance if you want to analyze 1.2V logic you could set the threshold level to 0.6V and any input signal below that level would result in a 0 out from the comparator, any signal higher than 0.6V results in a 1 out.
-Phil
Yep, they can be a bear to work with, and you definitely do not want to try to use them on a proto or perf board. On the other hand, with a good board layout and a small amount of positive feedback they can output a nice clean signal with any logic level as input, and do so into the 10's of MHz range or higher.
I do believe you are right about them requiring some positive feedback to avoid oscillation. This feedback creates hystersis. But I have been having trouble finding a good tutorial online for how to do calculate the amount of hystersis. All I have is examples with a few resistor values plugged in but no math.
Phil's suggestion is to just connected it up and see if you have adequate input. That may be the easiest solution in this context - test bench and hacking. The comparators are there if building an actual tool is required.
The Prop, running at 3.3V will still see 2.5V inputs as a "high".
-Phil
As far as the whole analog comparators goes i dont know to much about them but can put the research in if it is my best option for this. There are a few things that concern me about the technique though, first of ive got the analyzer capable of 112mhz of bandwith so are these comparators fast enough for that? And secondly are you guys saying you have to set the threshold levels so id need to change the hi and low defenitions for each logic voltage? Like id probably have to put a system on the board to say hey im probing at 1.25 logic then code in <.7=Low for that logic level, then id have to hit a button or whatever to go 5v logic and say <2.5=Low? Is this the same system that is used if you bought an analyzer that says it can do 3-5v logic?
If you read the 'Art of Electronics' you will find that different logic familys trigger a high at different points. I believe that CMOS triggers at 50% of the power voltage. So if a device is powered at 3.3VDC and using CMOS, the High is recognized at the transistion to above 1.65 logic. With 5.0 VDC devices, you are cutting it closer at 2.7 logic may not quite reach a true 2.7VDC for a high.
Since Power = V x I, I don't think you will damage any device that is running at a higher voltage by trying to interface the lower supply voltage logic. It just has less power and less voltage range to work with. So it is worth trying direct connection of either device.
But going the other way, there are hazards of applying excessive Power to the lower voltage device. At the very least, a protective resistor should be considered.