English Amiga Board


Go Back   English Amiga Board > Support > support.Hardware > Hardware mods

 
 
Thread Tools
Old 06 February 2010, 11:21   #1
Charlie
. . Mouse . .
 
Charlie's Avatar
 
Join Date: Jun 2005
Location: Nowhere
Age: 55
Posts: 1,792
Simple circuit design question:

Hello all,
I've been musing on a small mod for one of my computers but my current abilities for designing circuits are so rudimentary even this is proving too hard...

Here's the situation:
-Video chip takes one of three potential input clocks: 24, 25ish, and 36mhz depending on the intended output - selected by the OS.
-The 36mhz input is shared with the memory clock & I've been, um, overclcoking it a bit.
-The poor video chip isn't coping with the rather higher frequencies I'm driving the memory so in modes that use the shared '36mhz' clock I'm getting lots of graphic corruption.

Plan 'A'
There's a link on the motherboard which if removed will cut the input clock to the video chip so it should be a simple task to plumb in a 36mhz crystal @ that point...
...trouble is the modes that rely on the 24 & 25ish mhz clocks will be driven @ 36mhz too which won't work so well...
...Sound is provided by the video chip so if the OS doesn't know what frequency is being used one gets Pinky & Perky!

Plan 'B'
Knock up a circuit that takes two inputs:
-My 36mhz 'reference' clock.
-The OS selected 24, 25ish, 36++mhz from the computer.
Logic:
-Pass through any frequency less than the 'reference' clock
-Replace any frequency > the 'reference' clock with said 'reference' clock.

Plan 'B' would be MUCH better - can any kind soul point me in the direction of suggested further reading / logic to use?

Many Thanks

P.S.
Another option would be locate the point on the motherboard where frequency selection is made for the 36mhz clock and split it - one to memory & one to video...
...sadly no schematics available.

*Edit*
The video chip in question is very tolerant of 'skew' when changing between driving clocks so a straight switch over without consideration of signal synchronisation is fine.

Last edited by Charlie; 06 February 2010 at 12:42.
Charlie is offline  
Old 07 February 2010, 13:54   #2
Loedown
Precious & fragile things
 
Join Date: Feb 2009
Location: Victoria, Australia
Posts: 1,946
I've read your thread several times and although you've tried very hard to make it easy to understand, I'll be honest, I dont.

A solution can be reached, but it's hazy around what you mean by 'reference clock', does it mean that the OS provides 3 types of clock, depending upon a certain screen mode selection, or do you wish it to be able to switch into your reference clock when it detects a certain frequency range, or something else?

Paul
Loedown is offline  
Old 08 February 2010, 01:17   #3
Secret Vampire
Registered User
 
Join Date: Jul 2006
Location: Birmingham UK
Age: 42
Posts: 214
the 3rd way is probably the least problematic in terms of making it work, but requires being able to trace the clock back to the point where selection is done, which could well be in the middle of a bit of silicon...

Essentially you need to build a frequency counter and some logic to select inputs based on what frequency it's reading, problem is, doing that in discrete logic would be challenging if you don't really know what you're doing (I don't, and I'm challenged).

So the easy way to achieve it would be to use a PIC microcontroller or similar and do it all in software, see http://www.microchip.com/stellent/id...pnote=en011033 then you just need to make the microcontroller toggle one of its output pins when it sees a frequency above a predefined threshold, and use a bit of appropriate logic to switch clock source based on the state of that output.

The fourth way is a kludge fix, forget the pic and attach a switch of some kind in the place of the output pin, switch frequency manually as needed.
Secret Vampire is offline  
Old 08 February 2010, 02:17   #4
Loedown
Precious & fragile things
 
Join Date: Feb 2009
Location: Victoria, Australia
Posts: 1,946
Quote:
Originally Posted by Secret Vampire View Post
the 3rd way is probably the least problematic in terms of making it work, but requires being able to trace the clock back to the point where selection is done, which could well be in the middle of a bit of silicon...

Essentially you need to build a frequency counter and some logic to select inputs based on what frequency it's reading, problem is, doing that in discrete logic would be challenging if you don't really know what you're doing (I don't, and I'm challenged).

So the easy way to achieve it would be to use a PIC microcontroller or similar and do it all in software, see http://www.microchip.com/stellent/id...pnote=en011033 then you just need to make the microcontroller toggle one of its output pins when it sees a frequency above a predefined threshold, and use a bit of appropriate logic to switch clock source based on the state of that output.

The fourth way is a kludge fix, forget the pic and attach a switch of some kind in the place of the output pin, switch frequency manually as needed.
PIC usually have a bandwidth of 20MHz, this doesn't take into consideration the extra cycles required for detection and execution.
Loedown is offline  
Old 08 February 2010, 07:53   #5
Secret Vampire
Registered User
 
Join Date: Jul 2006
Location: Birmingham UK
Age: 42
Posts: 214
Quote:
Originally Posted by Loedown View Post
PIC usually have a bandwidth of 20MHz, this doesn't take into consideration the extra cycles required for detection and execution.
I thought that too, but the appnote suggests that using some trickery you can measure up to 50MHz with ±10KHz resolution, which should be fine for the purpose of this exercise.
Secret Vampire is offline  
Old 08 February 2010, 08:14   #6
Loedown
Precious & fragile things
 
Join Date: Feb 2009
Location: Victoria, Australia
Posts: 1,946
The trickery you speak of would be something like a 4040 ripple counter, with the PIC determining which frequency is running by checking it against a timebase.

Paul
Loedown is offline  
Old 08 February 2010, 13:20   #7
Charlie
. . Mouse . .
 
Charlie's Avatar
 
Join Date: Jun 2005
Location: Nowhere
Age: 55
Posts: 1,792
Thanks for the advice chaps - not-so-simple design question, then.

To clarify (just in case there's interest as well as people being helpful):
The 'standard' scheme is as follows:
-VIDC chip handles video (and audio) production.
-As standard it can take any input clock from 1-36mhz (many will o/c to 50-60mhz, mine won't).
-The OS selects an input clock to drive the VIDC based on bandwidth requirements of the mode selected (resolution / bit depth / output frequency).
-The motherboard provides 24mhz (Amiga-type monitors), 25.125mhz (VGA monitors), 36mhz ('modern' monitors).
-The memory clock is shared with the 36mhz VIDC clock. 36/3=12mhz for memory...
...the 'problem' with the design is shared memory & video RAM so higher resolutions take a lot of bus-bandwidth so causing overall (dramatic) slowing of the system in higher resolutions...
...the 'cure' is to clock the memory faster, so increasing the bandwidth available - this works VERY well.
-I can clock the memory from 36mhz/3 up to 60mhz/3=20mhz...
...the trouble is the VIDC shares it's highest input clock with the memory clock & this one won't take 50mhz, let alone 60mhz.

Solutions:
-Don't use the 36mhz modes (those that would now be driven outside the abilities of this VIDC chip) - yuck!
-Don't overclock the memory so much so avoiding the VIDC problems - too slow.
-Find a way of feeding a 36mhz clock to the VIDC in place of the overclocked signal it can't cope with*

*This is of course my preferred solution, but:
-I'd prefer not to tie the VIDC to 36mhz as this would could adversely affect modes expecting other than 36mhz...
...And it WILL adversely affect audio output where the OS believes the VIDC is being driven @ a different frequency...
...Also if the OS believes VIDEO is running at one speed when it's actually going faster that makes games run too fast for my poor fingers.
So:
-I'd like to construct a (small) PCB that will pass through the 24 & 25.125mhz clocks but will not pass >36mhz clocks and will instead supply it's own 36mhz clock. Thus effectively separating the memory clock from the highest video clock.

I'd prefer to do this as a discrete circuit as I know where the relevant mobo headers are, but don't have access to schematics so making alterations to tracks on the motherboard tricky.
I was hoping I could get away with a few NAND gates etc but couldn't see how - I guess from replies (MY THANKS BTW) that the reason I couldn't see how to do that was because it's actually a MUCH more complex proposition.

As an alternate I've already made a 'VIDC enhancer' for an older model that lacks the 36mhz input needed to drive 'modern' monitors & resolutions. It takes an input (controlled in software) for switching between the on-board clock and the 36mhz clock the 'enhancer' provides...
...if I could trace the 'switch line' on the motherboard for activating 36mhz to the VIDC I could cut that so stopping the overclocked crystal from being selected. The above board could then provide 36mhz triggered by that line, transparently.
The trouble is a lack of schematics for the motherboard.

Well, rambling now. Thanks for the help chaps.
Charlie is offline  
Old 08 February 2010, 20:13   #8
Loedown
Precious & fragile things
 
Join Date: Feb 2009
Location: Victoria, Australia
Posts: 1,946
I have a simple solution for you, when the VIDC is being run at 36MHz, use a flip flop to clock the RAM at 18MHz, that way it stays in sync and you get much better transfer rates. As for the switching circuitry to do this, not too hard. I have a job to do this morning, I'll finish that and ponder further.

What's the piece of kit being modified?

Paul
Loedown is offline  
Old 08 February 2010, 20:41   #9
Charlie
. . Mouse . .
 
Charlie's Avatar
 
Join Date: Jun 2005
Location: Nowhere
Age: 55
Posts: 1,792
Quote:
Originally Posted by Loedown View Post
I have a simple solution for you, when the VIDC is being run at 36MHz, use a flip flop to clock the RAM at 18MHz, that way it stays in sync and you get much better transfer rates. As for the switching circuitry to do this, not too hard. I have a job to do this morning, I'll finish that and ponder further.

What's the piece of kit being modified?

Paul
A good idea! Thanks v. much.
Run the memory @ 36/2 rather than 54-60/3, so keeping the 36mhz crystal - hmmm, finding the memory line, cutting that & as you say dividing the clock by 2 to feed into it should be MUCH easier!

The computer? It's an already rather modified Acorn A5000...
...I have to admit I understand these machines much better than Amigas so my A1200 tends to get plug-in stuff while the Acorns get the 'proper' hacking.

More info on this page:
>Link<
'A5000, Custom'
Charlie is offline  
Old 09 February 2010, 14:50   #10
Charlie
. . Mouse . .
 
Charlie's Avatar
 
Join Date: Jun 2005
Location: Nowhere
Age: 55
Posts: 1,792
Ah-ha!
Just in case anyone's interested a kind person's pointed me in the direction of some A5000 schematics & the v. good news is none of the above faffing about will be required.

There's two wholly separate tracks leaving the clock pin from the offending crystal going off to memory & video controllers (via a fair bit of logic, but who cares about that?).

As the two lines separate @ source not within some logic somewhere I can just cut a track & plumb in another crystal - job done.
Charlie is offline  
Old 10 February 2010, 22:34   #11
Charlie
. . Mouse . .
 
Charlie's Avatar
 
Join Date: Jun 2005
Location: Nowhere
Age: 55
Posts: 1,792
Update:

Just in case anyone's interested I worked out how the split the MEMC & 'Fast VIDC' clocks on the A5000.

No need for fancy piggy-back VIDC-Enhancers or clock dividers...

Here's the nub of it as performed on a Mk2 motherboard:
>Link<
Follow the 'A5000 Clock Splitting' link

My thanks for the helpful replies that got me to this point - my A5000 now has a 52mhz crystal supplying memory while a 40mhz one supplies the VIDC as that works better with my monitor.
Charlie is offline  
Old 11 February 2010, 00:28   #12
Loedown
Precious & fragile things
 
Join Date: Feb 2009
Location: Victoria, Australia
Posts: 1,946
Good to hear, Charlie.

It went from an Acorn to an Oak
Loedown is offline  
Old 11 February 2010, 19:16   #13
Charlie
. . Mouse . .
 
Charlie's Avatar
 
Join Date: Jun 2005
Location: Nowhere
Age: 55
Posts: 1,792
Quote:
Originally Posted by Loedown View Post
Good to hear, Charlie.

It went from an Acorn to an Oak
LOL:

Yes, I was so excited I got wood.
Charlie is offline  
Old 12 February 2010, 10:43   #14
Loedown
Precious & fragile things
 
Join Date: Feb 2009
Location: Victoria, Australia
Posts: 1,946
Quote:
Originally Posted by Charlie View Post
LOL:

Yes, I was so excited I got wood.
As long as you got some roots to go with that wood.

When you bloom, watch out for aphids.
Loedown is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple 14 bit audio question... Thorham Coders. General 7 06 June 2010 10:55
Simple Question bpazolli Coders. General 15 22 January 2009 17:16
Simple question Raffaz New to Emulation or Amiga scene 2 10 July 2007 14:08
A simple question but..... why not accept donations? MethodGit project.WHDLoad 6 06 April 2007 21:50
Simple A1200 Question Methanoid support.Hardware 4 29 April 2005 00:34

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 04:24.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.08715 seconds with 15 queries