Hacking the most effective ADC

If you're making a portable you probably need something to watch it on. (Unless you want to guess what's happening in the game, but I wouldn't advise that) Anyway, this forum is your "Hacking a pocket TV/screen" one-stop solution. Share your experiences and knowledge here.

Moderator: Moderators

Post Reply
XBrav
Posts: 20
Joined: Tue Mar 13, 2007 9:50 pm
Location: Calgary, Alberta
Contact:

Hacking the most effective ADC

Post by XBrav »

I was reading in the sticky on how people cannot easily use the PSP screen (Sharp LQ043) for projects. Well I was coming here on a modding question regarding it.

My goal in the end might be perhaps to input analog data, but rather I have a question regarding proper ADC conversion.

While working with the LQ043, it is very simple to directly accept a vertical and horizontal sync input. However, the 8 bit RGB inputs are getting on my nerves.

The PSP screen operates at ~9mHz effectively (~111ns per pixel). It has no time delay between scanning each row, and works on a progressive scan mode instead of interlacing.

I am not so much concerned about breaking down a composite signal, I just want to figure out a way to build a cheap 8 bit ADC with under 100ns propagation delay.

Based on a lot of research, analog RGB is either 0.5Vp-p, min 0V max 1v or 0.35Vp-p, min 0.3V max 1V. Either way, integrating it to accept the 0V-0.3V would result in, at worst, a brighter picture.

So obviously the only method to do this would be an 8 bit ADC for each color channel. Issue is I only have a few options at my feet. The most obvious method would be a Flash ADC, however that would result in a total of ~768 comparators, AKA a hefty price tag and very bulky.

The other option is a mathematical elimination system. Based on the idea of elimination, I would compare the input signal to several voltages:

500mV
250mV
125mV
62.5mV
31.25mV
15.625mV
7.8125mV
3.90625mV

I use the 0V-1V scale here for analysis, however it can be easily adjusted later.

The best way to interpret how this would work is by using it in a crummy version of a basic app:
// For color RED
if RedInput >= 500mV
{
RedInput -= 500mV;
RedBit7 = 1;
}
else
{
RedBit7 = 0;
}
if RedInput >= 250mV
{
RedInput -= 250mV;
RedBit6 = 1;
}
else
{
RedBit7 = 0;
}

etc etc

How does this relate? Say if the input voltage is 675mV.

Since the voltage is greater than or equal to 500, we subtract 500mV from the input and pass it onto the next. That leaves us with 175mV. As well, the 7th bit in the 8 bit string for the screen is set to a one. Had the input been less than 500mV, that bit would've been set to a zero and nothing would've been subtracted.

It keeps going down the process until we get the value for the last bit.

Well this would work great, if the screen would run slower.

My issue is that the propagation delay for using comparators is too long for this.

For instance, if we were to assume the propagation delay is 15ns per gate. There is one comparator to output whether the value is greater than or equal to the reference voltage. That output then goes to another gate (I think I'd be using an op amp, maybe that's my issue) to determine whether or not to subtract the voltage.

The resultant voltage, whether subtracted or not, would be passed onto the next comparator. That equals 2 gates per bit, or 16 gates per channel.

Well if we multiply that out, that's 240ns propagation delay MINIMUM, more than double the time allocation per clock cycle. If we were to operate at this, there would be flickering issues.

So my question to all you electronics guys out there is, is there an effective method other than a flash ADC to do this conversion?

I will gladly provide schematics if anybody is confused.
timmeh87
Senior Member
Posts: 3047
Joined: Mon Nov 14, 2005 10:19 pm
Location: Ontario, Canada

Post by timmeh87 »

Hey man. welcome to the forums. You seem smart (and Canadian) so I already like you.

This sounds to me like a job for micro-controllers. as you already observed, a circuit made out of discreet components is just no good. way to big and complicated and slow.

I only have experience with PICs, so lets say you use one of those. You'd need something thats in the 24f, 30f, or 33f series, as they are the only ones that reach the necessary speeds.

Im looking, for example, at the datasheet for the 33F series, and it supports a clock input of up to 64Mhz. Since an instruction cycle is 4 clock cycles, then thats 16Mhz, or 62.5nS. Which is inside of your required timings (just barely). The best thing about these chips though is that they have like 10 or so ADCs. already built in and ready to interface to in your preferred programming language..

Im wondering though, if the digital signal that the PSP screen takes is just a direct A-D conversion of normal analog RBG? I really know nothing about the topic though.

if It really is though, then perhaps all you need is an ACD IC from digikey. for example, look up digi-key part# ADC08351CILQCT-ND

Its an ACD with a clock input. you give it a clock (up to 42Mhz) and it cranks samples out onto the data lines. You could pair three of these up with a less powerful microcontroller (16F series) and make yourself a mean LCD driver
Image

"Linux is only free if your time is worthless"
gannon
Moderator
Posts: 6974
Joined: Sun Apr 04, 2004 4:48 pm
Location: Near that one big lake
Contact:

Post by gannon »

Other than a complex series of logic gates, I think the best method for this would be a specific programmable ADC.
timmeh87
Senior Member
Posts: 3047
Joined: Mon Nov 14, 2005 10:19 pm
Location: Ontario, Canada

Post by timmeh87 »

PIC + High speed ADC = programmable ADC, no?
Image

"Linux is only free if your time is worthless"
XBrav
Posts: 20
Joined: Tue Mar 13, 2007 9:50 pm
Location: Calgary, Alberta
Contact:

Post by XBrav »

timmeh87 wrote:Im wondering though, if the digital signal that the PSP screen takes is just a direct A-D conversion of normal analog RBG? I really know nothing about the topic though.

if It really is though, then perhaps all you need is an ACD IC from digikey. for example, look up digi-key part# ADC08351CILQCT-ND

Its an ACD with a clock input. you give it a clock (up to 42Mhz) and it cranks samples out onto the data lines. You could pair three of these up with a less powerful microcontroller (16F series) and make yourself a mean LCD driver
Interesting idea... Yeah I had this mean circuit idea for each one to obtain the best results. I had never actually used any ADCs, so I was originally prepared to use comparators lol.

It's really nice to obtain the right voltage levels too. Even with the ADC PIC, are they CMOS or TTL?

As everything operates off of 5V or equivalent, I have two options:

1) Power the unit and all applicable functions via a battery pack regulated by a 7805 regulator, or

2) Power everything off of USB

Last time I checked, USB can supply a total of 500mA per socket, correct? So even one port may be good enough.

To obtain that clock frequency, couldn't I place a 9 mHz crystal in line?

I am actually used to programming a 68HC11 chipset. How awkward would it be to program this into a PIC?
You say it can't be done. I'll damn well show you it can...

Just may not be cheap. Or practical.
Image
Post Reply