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.

Mc6845 No Vsync?

Status
Not open for further replies.

makorihi

New Member
Hello,

I've been having trouble for the past few weeks getting my MC6845P to world correctly. I loaded its 16 registers with data that should follow the timing in this chart that i made to fit VGA standards.

**broken link removed**

H-sync outputs correctly, DE is correct. The only problem is that v-sync is ALWAYS low (and this is a problem). Anybody have thoughts as to why this isn't working? (I'm almost completely sure that the wiring is correct)
 
Look carefully at values of R4 and R7. They are the same.

Are you absolutely sure that you can place the V Sync position right at the very edge of the vertical Total period? Most examples I saw would place the VSync position near the end within this period instead of right at the very edge of it.

With clocked logic, the master logic might be busy resetting the count loop to start all over again and the VSync decoding circuit might not work in this case.

All these is just a wild guess as I have never worked with a CRTC before. Can you reduce the value of R7 and does an experiment to see if this is the problem.

Hope it helps.
 
Thank you for your reply eblc1388,

The thing about R4 is that its one less than the actual vertical total, and that R5 also contributes some scanlines. Since the datasheet says the V-sync pulse is 16x a scanline (or 16x the H-sync pulse like it should be), thats a really small amount that should be able to fit within 1 and 2/14 character lines. Also, in the 80x24 example that they have in the datasheet, their R4 and R7 are the same.

But yes, I also saw that and tested 22h and 19h for R7 and it still gave me that constant low.
 
Well, your VSync problem does not seem to be an isolated case when one tries to use it in VGA mode. The chip was originally designed for CGA. Please read the following quoted message.

----- Original Message -----
From: "Damjan Lampret" <lampret@o... >
To: <cores@o... >
Date: Mon, 7 Feb 2000 18:08:20 +0100
Subject: Re: [oc] Interested in developing CRT controller core

>
>
>
> I've decided to code MC6845 CRTC. This CRTC can be used as a
> building block
> of a video controller core (graphics or text mode) although MC6845
> is used
> in CGA and not EGA/VGA. It is possible to use it in high resolution
> applications though it was designed 22 years ago. ;-)
>
> All internal/external signals are named like in original MC6845
> datasheet.
> At the moment horizontal sync is working and now I'm working on
> vertical sync.

>
> regards, Damjan
 
Hmm, though I still don't understand why it would just simply not work. Although I'm using this for VGA, my resolution is less than 40x40. Doesn't make sense . . .
 
Sorry for the double post if thats not allowed, but I couldn't find the edit button (if there is one).

I FIGURED OUT THE PROBLEM!!!

Basically, the internals of the MC6845 is a bunch of CO (coincidence) chips that compare values constantly. The vertical circuitry is tied to the horizontal circuitry by the horizontal total register, but it seems that the V-sync part of the vertical circuitry is tied ONLY to the END of the horizontal sync pulse, and ONLY increments its count (to compare with other values) if the horizontal sync pulse ENDS (I might be wrong, but this seemed to be the problem). In my timing chart, I planned out the horizontal timing EXACTLY perfectly so that the horizontal sync would happen exactly 4 chars before the end of the horizontal total. But the problem is that the last pulse of the h-sync ends right on the last character, thus on the next clock cycle, where it should have incremented some counts regarding the v-sync (and only the v-sync), it doesn't. I resolved this problem by making the h-sync happen 1 character before where I have it in that table I uploaded.

And as always, once you solve one problem, another arises. Now that the syncs work, the crt actually works and can display its own, built in menus (which need the pulses). Next I need to DAC some values from rom and run them into the RGB lines of the monitor, but thats where I'm having trouble. If I hook up the lines to a function generator, colors show up where they are supposed to. But if I hook it up to the output of a MAX 7224, it drives the output wayyy low (.7v ish) and the CRT comes up with lines of barely any color at all.

Would anybody know what the problem is, how to resolve it and/or what I should actually be doing for the CRT?
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top