6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Tue Nov 12, 2024 8:55 am

All times are UTC




Post new topic Reply to topic  [ 148 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7, 8 ... 10  Next
Author Message
PostPosted: Mon Oct 13, 2003 1:16 am 
Offline

Joined: Sat Jan 04, 2003 10:03 pm
Posts: 1706
greener wrote:
I think I understand that the PIC would tell the counter to start counting, the counter would actually drive part of the address bits for RAM, but don't you need something move the counter? Do you just use an oscillator to drive it? Something like 20MHz would be close. (Sorry about the terminology.)


Gating an external oscillator is of course one approach (it's probably the approach I'd take). The PIC could also drive the counter directlyThe oscillator can be derived from the PIC's clock input if necessary (lower resolution on the screen, but less parts).

Quote:
Can I reference it by chapters of interest or will I just confuse myself? I don't have a good history with books over 300 pages, unless it's liesure reading... :)


Any given chapter will of course depend on the information found in the preceeding chapters to some extent -- e.g., chapter 1 discusses Ohm's law (a critical piece of knowledge for all electronics, digital included), chapter 2 uses Ohm's law to discuss something else (I forget which, exactly), etc.

However, that being said, each chapter discusses something different. The chapter on amplifiers, for example, is more or less self-contained and distinct from the chapter on oscillators, for example, even though an oscillator basically is an amplifier.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon Oct 13, 2003 1:30 am 
Offline

Joined: Tue Sep 30, 2003 5:46 pm
Posts: 30
Location: Central Wisconsin
candle wrote:
to all my knowledge vga rgb input is 0.7Vp-p, some monitors can handle 1Vp-p ant this is it.


I've actually looked around a bit, and couldn't find anything. But, tonight, I found this which states:

Quote:
The signal levels in RED, GREEN and BLUE signal are 0.7V peak to peak video signals terminated to 75 ohm load in video card and monitor ends. All other signals are TTL level signal (around 0..0.7V means logic 0 and 3..5V means logic 1).


Interestingly, the article that I came across PIC'Spectrum (pg 26, 3rd column) states something different:

Quote:
The horizontal and vertical synchronization signals are TTL compatible, so there’s no problem there. For the R, G, and B lines (0–2 V/75 W), a 150-W series resistor does an adequate 5-V to 2-V/75-W adaptation, thanks to the high power capacity of the PIC outputs (20 mA/line, 100 mA total for ports A and B).


Amazingly, I'm sure this means something to you guys. I haven't got a grasp of much outside of 0v = off and 5v = on! :wink:

So, am I going to blow up my monitor?!

candle wrote:
i'm thinking now about 2 chips of sram (2x32k) wich are multiplexed, if one is used to write data in, other is used to draw screen


Are you planning on mapping one chip into the physical RAM, or will both of these chips be off of the system bus?


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon Oct 13, 2003 2:15 am 
Offline

Joined: Sat Jan 04, 2003 10:03 pm
Posts: 1706
greener wrote:
Quote:
The horizontal and vertical synchronization signals are TTL compatible, so there’s no problem there. For the R, G, and B lines (0–2 V/75 W), a 150-W series resistor does an adequate 5-V to 2-V/75-W adaptation, thanks to the high power capacity of the PIC outputs (20 mA/line, 100 mA total for ports A and B).


Impedance is, like resistance, an opposition to current flow. Resistance affects both AC and DC signals, while impedance affects only AC signals.

The monitor is designed to have a 75 ohm impedance. This means that, as far as you (as an engineer) are concerned, the monitor looks like three 75 ohm resistors to ground.

Also, don't use W as a unit of measurement for resistance -- internationally, it means Watts, which is a measure of power. Instead, in the absence of using the Omega character, use the European schematic notation for resistance, like this:

Code:
4700 ohms  ==>  4.7KOhms (American standard) ==> 4K7R  (European Standard)
1500000 ohms ==> 1.5MOhms ==> 1M5R
2003 ohms ==> 2003 ohms ==> 2K003R
75 ohms ==> 75 ohms ==> 75R (R indicates resistance)


Note several things occur: an internationally recognized letter serves as the decimal point, which not only tells you how big the resistance is, but it also eliminates ambiguity between using "." and "," (3.14159 in America is 3,14159 in many European countries). Also, the last "R" tells you it's resistance.

2V seems awfully large to me. I would not generate a signal that powerful. But let me explain to you how their logic works.

Remember that the monitor presents a 75 ohm impedance to the driving circuit. Therefore, it appears to be a 75 ohm resistor to ground (remember, everything in electronics ultimately is referenced from ground). Therefore, the 150R resistor in series with the red, green, or blue signal line will give a total resistance of 225R, from PIC chip to ground. The PIC will therefore supply (5V/225R)=22.22mA of current (22m22A??? I've not yet seen any particular standard for identifying currents or voltages similar to that for resistances. Can someone clarify?). Since all currents in a serial circuit must be equal, we can compute the voltage drop across the 75R resistance: (0.02222A)(75R) = 1.666V. Thus, when the PIC's output voltage is high, the monitor will see 1.666V at its input. When low, obviously, it'll see 0V (or substantially close to it to not matter).

Now, I think that driving the VGA port with 1.6V is awfully dangerous. I prefer 0.7V. So how would I go about designing the series resistor value?

The first step is to determine what current needs to flow through the 75R resistor to develop 0.7V across it. This is done by evaluating 0.7V/75R = 9.33mA. Now that we have this figure, we know we need to drop 4.3V in the series resistor (since 4.3V in the series resistor + 0.7V in the 75R resistor = 5V being supplied to it); therefore, we know the series resistor (from Ohm's law) is 4.3V/0.00933A = 460R.

Quote:
So, am I going to blow up my monitor?!


When driving the input with anything larger than 1V, I think you very much could do that. That seems dangerously high to me.

Even if it doesn't blow up the monitor, it could the monitor's video pre-amps to overdrive, creating what we call "splatter" in the ham radio community. In ham radio, splatter shows up as audio that sounds, unmistakably, like water splattering in your headphones (not EXACTLY like it, but figuratively). On the monitor, splatter will likely show up as annoying "ringing" or "ghosting" effects on the screen. It may even affect the color correctness of surrounding pixels.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon Oct 13, 2003 2:59 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8539
Location: Southern California
> > What op amps and DACs have you tried, what were the problems, and
> > what speed do you need?
>
> Well, I bought the op amp at Radio Shack. It's the LM324 Quad Op Amp.

We put tons of those in our products. They're great as a $.23 quad op amp (which Radio Shack sells for $1.29), but their limitations must be considered. With a gain bandwidth product of only about 1MHz and a slew rate of about 150mV/us, it's woefully inadequate for video. I has a couple of tricks you have to apply even for audio, like biasing the output to avoid crossover distortion with all but the lightest loads, and not trying to drive a cable with it unless you have at least two or three hundred ohms in series in front of the cable so your phase margin doesn't go to pot and turn your seemingly innocent circuit into an oscillator.

The Linear Technology LT1125 is one of the few really good quad op amps in a 14-pin DIP. It has a GBW product over 10MHz, a slew rate of 4.5V/us, is 20dB quieter than the LM324A, doesn't have the crossover distortion problem, has lower input current, less input offset voltage error, and a DC voltage gain about 50 times as high. Of course you pay for it (it's a few dollars each at Digi-Key) and it takes more current, but the current is still much, much lower than something like the LM627 which is also a nice op amp but only comes in singles and is not well suited to single-supply operation.


> The DAC is the DAC0808LCN from National Semiconductor.
>
> I'm sure that half the problem is that I simply don't understand
> everything I'm supposed to do... I've been working with just 5V and
> ground. I also haven't fully read the spec sheet - I think I was messing
> with figure 7 (positive voltage). However, I was just using Vcc = +Vref
> = Vee = 5V. I have a hunch that that is what I messed up with.

That's a nice, fast, inexpensive, easy-to-use, 8-bit D/A converter. Vee has to be negative though. -5V to -12V will do. I've used this D/A several times. It's good for about 1MSPS, but I've never tried it above 60 or 80kSPS since I've only done audio with it. I'll see if I can post a circuit for using it.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon Oct 13, 2003 4:26 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8539
Location: Southern California
Ok, I wrote in my last post that I'd try to post a schematic. Mike has just gotten my pages up, and here's the URL for the D/A schematic:
http://www.6502.org/users/garth/project ... hematic=10
There still seem to be some problems with the new pages, but this schematic did show up correctly for me when I tried it just now. There will be more coming soon. I also made some more updates to the workbench computer after the material was sent to Mike to do these. The schematics are just scans of my pencil drawings in my 3x5" quick-reference binder, but there's so much more stuff I want to put up that as long as these drawings are at least somewhat readable in the scans I decided not to take the time to re-do them neatly on the computer. The op amp in the diagram started out being an LM358 (the dual op amp version of the LM324 you mentioned), but I recently replaced it with an LT1124 (the dual op amp version of the LT1125 I mentioned in my last post).


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon Oct 13, 2003 9:07 am 
Offline

Joined: Sun May 04, 2003 5:03 pm
Posts: 47
Location: Lublin, Poland
you may use THS8134, THS8134A, THS8134B - those are triple 80mips DACs designed to use as video outputs (unfortunatly in TQFP48 package) (TI), TDA8771A - 35mips triple DAC, TFD8712 and TDA8712 (same chip) single 50mips DAC in SOP16 package and... DIP16 also! (PHILIPS)

and one more thing - did you considered using OSD solutions? for example one of LM1269 LM1267 LM1262 LM1237 LM1238 LM1253 - all by National Semiconductors, and all i2c bus controlled, and all capable of giving out/overlaying vga signal

kc5tja: i've got tons of 32k sram chips to waste, so this is no problem for me :]
and about naming conventions... we dont use 22m22A :) just 22.22mA 3u3F is ok 1u6H is also ok, but those seems to be reserved for components values, and do you know any component that has current rating as main parameter? (well EXEPT fuse :D)


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon Oct 13, 2003 3:01 pm 
Offline

Joined: Sat Jan 04, 2003 10:03 pm
Posts: 1706
candle wrote:
and about naming conventions... we dont use 22m22A :) just 22.22mA 3u3F is ok 1u6H is also ok, but those seems to be reserved for components values, and do you know any component that has current rating as main parameter? (well EXEPT fuse :D)


Motors. :-)

Thanks for the clarification. I was aware that the standard existed for components, but I wasn't sure if the technique was more universally applied. Remember that it was created to eliminate ambiguities when communicating schematic and component data across national borders -- I was wondering if that applied to measurements and specifications as well. I guess it doesn't. :)

I would also like to point out that the component naming standard is wonderful for those of us who like to use morse code! When was the last time you heard the Morse character for a capital Omega? (I don't even think it exists in the international morse code character set.)


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Oct 14, 2003 1:45 am 
Offline

Joined: Tue Sep 30, 2003 5:46 pm
Posts: 30
Location: Central Wisconsin
kc5tja wrote:
I prefer 0.7V. So how would I go about designing the series resistor value?

The first step is to determine what current needs to flow through the 75R resistor to develop 0.7V across it. This is done by evaluating 0.7V/75R = 9.33mA. Now that we have this figure, we know we need to drop 4.3V in the series resistor (since 4.3V in the series resistor + 0.7V in the 75R resistor = 5V being supplied to it); therefore, we know the series resistor (from Ohm's law) is 4.3V/0.00933A = 460R.


Now for the total newbie's question: Do I need to ground at any point, or should I be running the line directly out of the PIC/SRAM (databus) to a 470R (closest I had) to the R/G/B line on the monitor?

Then, for the total newbie question who has seen a tiny glimpse into this world :lol: - Presumably, I could put an R-2R ladder in front of this. Or, figure out how to use the DAC (per other posts), and I'd have multiple values?

I did try the 470R, and the colors did look fine. My only question is if I am missing something! I most definately need to start reading up on this stuff - it sounds like it is basic to the field...


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Oct 14, 2003 9:41 am 
Offline

Joined: Sun May 04, 2003 5:03 pm
Posts: 47
Location: Lublin, Poland
if you use other impedance that assumed 75ohm everything will be just fine for low resolutions (up to 320x200 i think) then will be artefacts - ringing will occure and image won't be sharp - stop worying so much :]


Top
 Profile  
Reply with quote  
 Post subject: Re: PIC video
PostPosted: Sun Oct 19, 2003 5:37 am 
Offline

Joined: Tue Sep 30, 2003 5:46 pm
Posts: 30
Location: Central Wisconsin
I have nothing particular to report except that I did put together a web site documenting what progress I made. Most of the information was retrofitted. I'll keep it up-to-date as I move forward.

http://webpages.charter.net/greener/electronics/

Hope someone finds it interesting!
-Rob


Top
 Profile  
Reply with quote  
 Post subject: Re: PIC video
PostPosted: Sun Oct 19, 2003 3:06 pm 
Offline

Joined: Sat Jan 04, 2003 10:03 pm
Posts: 1706
greener wrote:
I have nothing particular to report except that I did put together a web site documenting what progress I made. Most of the information was retrofitted. I'll keep it up-to-date as I move forward.

http://webpages.charter.net/greener/electronics/

Hope someone finds it interesting!
-Rob


I certainly do. Thanks for the information. :)


Top
 Profile  
Reply with quote  
 Post subject: Re: PIC video
PostPosted: Sun Oct 19, 2003 5:07 pm 
Offline
Site Admin
User avatar

Joined: Fri Aug 30, 2002 1:08 am
Posts: 281
Location: Northern California
greener wrote:
I have nothing particular to report except that I did put together a web site documenting what progress I made. Most of the information was retrofitted. I'll keep it up-to-date as I move forward.

http://webpages.charter.net/greener/electronics/

Hi Rob,

Great work. I've added your pages to the Homebuilt Projects section on 6502.org.

Regards,
Mike

_________________
- Mike Naberezny (mike@naberezny.com) http://6502.org


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Oct 21, 2003 10:23 pm 
Offline

Joined: Wed Dec 18, 2002 3:20 am
Posts: 113
To Greener:

I've been looking over your pages, and find them quite informative, but I do have a couple of questions...

1) On the Video 2 page, it shows the PIC connected to the SRAM, where the databus is shared with pic, sram and off to video - it shows 8 bit out of the pic, but 12 bits total going to the video - where are the extra 4 bits/datalines coming from?

2) How are you connecting the RGB lines into the VGA connector? I know that sounds like a rather dumb question lol, but I've never tried to tie into a VGA connector before, and I'm wondering how you are doing it, especially with 4 bits each color. Do you have any circuit info beyond the breakout?

I personally really appreciate the info you have put up so far, it has been wonderful!


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Oct 22, 2003 2:07 am 
Offline

Joined: Tue Sep 30, 2003 5:46 pm
Posts: 30
Location: Central Wisconsin
Tancor wrote:
1) On the Video 2 page, it shows the PIC connected to the SRAM, where the databus is shared with pic, sram and off to video - it shows 8 bit out of the pic, but 12 bits total going to the video - where are the extra 4 bits/datalines coming from?


I'm pulling them out of the bit bucket! :lol: (Couldn't resist.)

The SRAM will supply a byte for the VGA display, but 8 bits doesn't divide 3 ways nicely, so some bits need to be shared between the RGB values. My nomenclature I've been using is XYRRGGBB... so that leads to XYRR for red, XYGG for green, and XYBB for blue. It also has the unfortunate effect of looking like I'm doin some magic.

My fault - I've been asked this before, too!!

Tancor wrote:
2) How are you connecting the RGB lines into the VGA connector? I know that sounds like a rather dumb question lol, but I've never tried to tie into a VGA connector before, and I'm wondering how you are doing it, especially with 4 bits each color.


Heh, I have a dumb answer. (Really.) A friend and I searched Digikey during lunch for a day or two. It is a HD D-SUB 15 - high density D-Sub 15 pin. And then you gamble a little bit. (I searched tonight on "DB15 HD". Don't forget to choose receptacle/female! I've got an extra male connection if you'd like one. :oops:)

I think this is the one I'm working with right now - 1815F-ND - which is the connector with a lot of holes. You push wires into it and then jam the VGA connector into it. Bad news is that this kind of mashes the pins if you're not careful.

Someday I'll pick up a soldering iron and when I do, I've got a connector like the 4815F-ND which would be better. Both from the fact that wires wouldn't be loose all the time and you wouldn't mash the monitor connector.

I then take the wire ends and connect as appropriate in my breadboard.

Tancor wrote:
Do you have any circuit info beyond the breakout?


As far using all the color values - I'm only using one per color right now. I've played with a R-2R ladder to set the voltage levels appropriately (somewhat successfully) and I've also tried an opamp (without success). I also have picked up some DACs to try at some point. So, I guess the answer is yes, there will be additional stuff beyond the diagram.

Tancor wrote:
I personally really appreciate the info you have put up so far, it has been wonderful!


Thanks! These guys have been great in getting me started, so this is the least I can do.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Oct 22, 2003 3:08 am 
Offline

Joined: Wed Dec 18, 2002 3:20 am
Posts: 113
Quote:
Heh, I have a dumb answer. (Really.) A friend and I searched Digikey during lunch for a day or two. It is a HD D-SUB 15 - high density D-Sub 15 pin. And then you gamble a little bit. (I searched tonight on "DB15 HD". Don't forget to choose receptacle/female! I've got an extra male connection if you'd like one. )


Lol, actually, I was wondering how you are converting the 12 bits / pixel + syncs to the db15 connector. The VGA connector has 1 pin red, 1 pin green, 1 pin blue, (a set of 3 pins for their respecive grounds), extra ground pins, sync pins, and 2 other pins I can't remember off hand what their for....

so, basically, I'm trying to figure out how you are wiring this up to get from your multi-bits down to the single pins per color....

But I notice later on that you wrote...


Quote:
As far using all the color values - I'm only using one per color right now. I've played with a R-2R ladder to set the voltage levels appropriately (somewhat successfully) and I've also tried an opamp (without success). I also have picked up some DACs to try at some point. So, I guess the answer is yes, there will be additional stuff beyond the diagram.


to try to combine the values. I need to find more specs on vga or rgb that talks about setting color values, it's one of those things that has bugged me for a long time.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 148 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7, 8 ... 10  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: