65816 build -- completely stuck -- please help :)
65816 build -- completely stuck -- please help :)
Hi, everyone! This is my first post to this forum. I'm glad to be part of this community!
I am trying my best to get a 65816 system up and running. Unfortunately, I am running into some issues, likely timing related. I could use some pointers. I have posted some background information here: https://www.rehsdonline.com/post/troubl ... ram-part-2.
The short version is that I am unable to get my ROM+RAM working with decoding logic. I'm guessing that I have a timing issue, but I haven't been able to figure it out.
I'd greatly appreciate any assistance you can provide.
Thanks!
Update: This issue has been resolved. Many updates were made based on great advice from members here. Ultimately, my lousy assembly coding was at fault. Credit to Adrien Kohlbecker for catching the issue with my code.
I am trying my best to get a 65816 system up and running. Unfortunately, I am running into some issues, likely timing related. I could use some pointers. I have posted some background information here: https://www.rehsdonline.com/post/troubl ... ram-part-2.
The short version is that I am unable to get my ROM+RAM working with decoding logic. I'm guessing that I have a timing issue, but I haven't been able to figure it out.
I'd greatly appreciate any assistance you can provide.
Thanks!
Update: This issue has been resolved. Many updates were made based on great advice from members here. Ultimately, my lousy assembly coding was at fault. Credit to Adrien Kohlbecker for catching the issue with my code.
Last edited by rehsd on Mon Feb 28, 2022 4:35 am, edited 1 time in total.
- GARTHWILSON
- Forum Moderator
- Posts: 8773
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
Re: 65816 build -- completely stuck -- please help :)
Welcome.
Your linked page comes up for me for one or two seconds and then goes blank. I guess there's something there that doesn't like my older ff browser version on this computer. I hope to have my regular desktop computer setup working again this week. Note that you can attach images here, so it's not necessary to link to outside image hosts.
A couple of topics that might prove helpful are:
Also, go through the 6502 primer. It's not '816-specific, but most of the material there will apply anyway.
Your linked page comes up for me for one or two seconds and then goes blank. I guess there's something there that doesn't like my older ff browser version on this computer. I hope to have my regular desktop computer setup working again this week. Note that you can attach images here, so it's not necessary to link to outside image hosts.
A couple of topics that might prove helpful are:
- Managing the 65816 multiplexed bus
- Jeff Laughton's animated visualizations of timing margins These excellent, drawn-to-scale (unlike most in data sheets) .gif's help understand what timings are constant and what varies with clock speed. Discussion about them is in the forum topic here
Also, go through the 6502 primer. It's not '816-specific, but most of the material there will apply anyway.
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
Re: 65816 build -- completely stuck -- please help :)
rehsd wrote:
Hi, everyone! This is my first post to this forum. I'm glad to be part of this community!
I am trying my best to get a 65816 system up and running. Unfortunately, I am running into some issues, likely timing related. I could use some pointers. I have posted some background information here: https://www.rehsdonline.com/post/troubl ... ram-part-2.
The short version is that I am unable to get my ROM+RAM working with decoding logic. I'm guessing that I have a timing issue, but I haven't been able to figure it out.
I'd greatly appreciate any assistance you can provide.
Thanks!
I am trying my best to get a 65816 system up and running. Unfortunately, I am running into some issues, likely timing related. I could use some pointers. I have posted some background information here: https://www.rehsdonline.com/post/troubl ... ram-part-2.
The short version is that I am unable to get my ROM+RAM working with decoding logic. I'm guessing that I have a timing issue, but I haven't been able to figure it out.
I'd greatly appreciate any assistance you can provide.
Thanks!
Recommendations
- Put VDA and VPA through an OR gate - either a specific OR gate IC or within a GAL/CPLD - and use that as a part of the enable for all of the address decoding. Without this you're going to have some really random stuff happen and it might be the main cause of your issue.
- When writing to RAM, validate it with PHI2 (main clock) so the write enable signal for the RAM is enabled only when PHI2 goes high. Never do this for any 65xx device though (such as the 6522 or 6551) as they expect to be fed the 65816's RWB output. Also, don't do this for the chip selects - they can be enabled as soon as you know VDA & VPA are valid and the address range matches.
- With regards your pull up resistors on the 65816: I suspect 1K is fine, but you could try a 2K2 or 3K3 (I use 3K3 in my designs) as it will do the job, but consume less current.
Also, is there a reason for 10K value on the BE line pullup resistor? I've not seen anyone use a different value to the other 65816 pull ups, which is why I ask.
- RESB might be better with a 3K3 pull up as it can be a little unreliable without it -something I was warned about and I have definitely seen on my 65C02 designs.
Re: 65816 build -- completely stuck -- please help :)
Welcome!
Does your build still look like this (below)? If so, you have <ahem> some tidying up to do! It's not just a matter of the length of all those cables. It also matters (a lot!) how the power and ground pins of your IC's get interconnected. For starters, cables between boards need to include at least one ground conductor (and ideally a power conductor too), attached to the local ground/power at each end. There are other requirements, too.
You mentioned you've been following Adrien Kohlbecker's video series, and he's facing some of the same issues. Have a look at the latest posts in his thread, here.
Given the fact that your project almost works, or works sometimes, it may seem to you as if only a minor tweak is needed. But that's misleading, as extensive changes may be necessary before you achieve solid, reliable operation. A project that works but is flaky can require just as much additional effort as one that's dead in the water. Sorry -- I don't make the rules, I'm just tellin' ya how it is!
This. But I wouldn't worry about pullup values. Ditto with the VPA, VDA thing, as problems in that department tend to be very subtle (not like what you're facing).
BTW your "schematic" is little more than a net list. It may seem clear to the person who created it, but others usually find it opaque -- it takes time to connect the dots. And not everyone will grant you that time. A real schematic with actual lines will increase the quantity and quality of the assistance you can garner here. Just sayin'!
-- Jeff
Does your build still look like this (below)? If so, you have <ahem> some tidying up to do! It's not just a matter of the length of all those cables. It also matters (a lot!) how the power and ground pins of your IC's get interconnected. For starters, cables between boards need to include at least one ground conductor (and ideally a power conductor too), attached to the local ground/power at each end. There are other requirements, too.
You mentioned you've been following Adrien Kohlbecker's video series, and he's facing some of the same issues. Have a look at the latest posts in his thread, here.
Given the fact that your project almost works, or works sometimes, it may seem to you as if only a minor tweak is needed. But that's misleading, as extensive changes may be necessary before you achieve solid, reliable operation. A project that works but is flaky can require just as much additional effort as one that's dead in the water. Sorry -- I don't make the rules, I'm just tellin' ya how it is!
banedon wrote:
- When writing to RAM, validate it with PHI2 (main clock) so the write enable signal for the RAM is enabled only when PHI2 goes high. Never do this for any 65xx device though (such as the 6522 or 6551) as they expect to be fed the 65816's RWB output.
BTW your "schematic" is little more than a net list. It may seem clear to the person who created it, but others usually find it opaque -- it takes time to connect the dots. And not everyone will grant you that time. A real schematic with actual lines will increase the quantity and quality of the assistance you can garner here. Just sayin'!
-- Jeff
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html
https://laughtonelectronics.com/Arcana/ ... mmary.html
Re: 65816 build -- completely stuck -- please help :)
GARTHWILSON wrote:
A couple of topics that might prove helpful are...
Re: 65816 build -- completely stuck -- please help :)
banedon wrote:
Recommendations
- Put VDA and VPA through an OR gate - either a specific OR gate IC or within a GAL/CPLD - and use that as a part of the enable for all of the address decoding. Without this you're going to have some really random stuff happen and it might be the main cause of your issue.
- When writing to RAM, validate it with PHI2 (main clock) so the write enable signal for the RAM is enabled only when PHI2 goes high. Never do this for any 65xx device though (such as the 6522 or 6551) as they expect to be fed the 65816's RWB output. Also, don't do this for the chip selects - they can be enabled as soon as you know VDA & VPA are valid and the address range matches.
- With regards your pull up resistors on the 65816: I suspect 1K is fine, but you could try a 2K2 or 3K3 (I use 3K3 in my designs) as it will do the job, but consume less current.
Also, is there a reason for 10K value on the BE line pullup resistor? I've not seen anyone use a different value to the other 65816 pull ups, which is why I ask.
- RESB might be better with a 3K3 pull up as it can be a little unreliable without it -something I was warned about and I have definitely seen on my 65C02 designs.
- Put VDA and VPA through an OR gate - either a specific OR gate IC or within a GAL/CPLD - and use that as a part of the enable for all of the address decoding. Without this you're going to have some really random stuff happen and it might be the main cause of your issue.
- When writing to RAM, validate it with PHI2 (main clock) so the write enable signal for the RAM is enabled only when PHI2 goes high. Never do this for any 65xx device though (such as the 6522 or 6551) as they expect to be fed the 65816's RWB output. Also, don't do this for the chip selects - they can be enabled as soon as you know VDA & VPA are valid and the address range matches.
- With regards your pull up resistors on the 65816: I suspect 1K is fine, but you could try a 2K2 or 3K3 (I use 3K3 in my designs) as it will do the job, but consume less current.
Also, is there a reason for 10K value on the BE line pullup resistor? I've not seen anyone use a different value to the other 65816 pull ups, which is why I ask.
- RESB might be better with a 3K3 pull up as it can be a little unreliable without it -something I was warned about and I have definitely seen on my 65C02 designs.
I will incorporate VDA and VPA. I hadn't as the sample schematic from WDC didn't seem to use it. My bad.
I will qualify the RAM's WE# with PHI2.
The pull-up resistor values were inaccurate on the schematic. I am using 3.3K the pull-ups, other than RESB, which uses a 1K (I could change it to a 3.3K). I will update the schematic. I have attached the reset circuit I am currently using.
Re: 65816 build -- completely stuck -- please help :)
Dr Jefyll wrote:
Does your build still look like this? ....
Dr Jefyll wrote:
BTW your "schematic" is little more than a net list. It may seem clear to the person who created it, but others usually find it opaque -- it takes time to connect the dots. And not everyone will grant you that time. A real schematic with actual lines will increase the quantity and quality of the assistance you can garner here. Just sayin'!
Thanks!
Re: 65816 build -- completely stuck -- please help :)
Redrew your schematic before your last two updates. It should be easier to analyze by the guys here. I don't see anything wrong specifically, but AC or ACT components are dangerous; too fast, too noisy. 15nS RAM is also bad news.
Bill
Bill
- Attachments
-
- rehsd_scm.pdf
- (20.42 KiB) Downloaded 137 times
Re: 65816 build -- completely stuck -- please help :)
Dr Jefyll wrote:
banedon wrote:
- When writing to RAM, validate it with PHI2 (main clock) so the write enable signal for the RAM is enabled only when PHI2 goes high. Never do this for any 65xx device though (such as the 6522 or 6551) as they expect to be fed the 65816's RWB output.
Re: 65816 build -- completely stuck -- please help :)
plasmo wrote:
Redrew your schematic before your last two updates. It should be easier to analyze by the guys here. I don't see anything wrong specifically, but AC or ACT components are dangerous; too fast, too noisy. 15nS RAM is also bad news.
Bill
Bill
I have tried the circuit with all HC / HCT. Is that a better way to go?
Also, what should I look for in RAM?
Thank you!
- barrym95838
- Posts: 2056
- Joined: 30 Jun 2013
- Location: Sacramento, CA, USA
Re: 65816 build -- completely stuck -- please help :)
plasmo wrote:
I don't see anything wrong specifically, but AC or ACT components are dangerous; too fast, too noisy. 15nS RAM is also bad news.
Got a kilobyte lying fallow in your 65xx's memory map? Sprinkle some VTL02C on it and see how it grows on you!
Mike B. (about me) (learning how to github)
Mike B. (about me) (learning how to github)
- akohlbecker
- Posts: 282
- Joined: 24 Jul 2021
- Contact:
Re: 65816 build -- completely stuck -- please help :)
barrym95838 wrote:
plasmo wrote:
I don't see anything wrong specifically, but AC or ACT components are dangerous; too fast, too noisy. 15nS RAM is also bad news.
rehsd wrote:
I have tried the circuit with all HC / HCT. Is that a better way to go?
Also, what should I look for in RAM?
Thank you!
Also, what should I look for in RAM?
Thank you!
For the RAM, go with a slow, 55ns one before attempting to increase the speed. This goes for all the components, if they don't have a reason to be fast, go with slow chips, as they will be easier to manage for a start. Once you have a working slow build, then you can try to increase speed.
Your GAL can also be an issue with fast edges. Which model are you using? Can you also share how you're programming it and with which equations?
banedon wrote:
- Put VDA and VPA through an OR gate - either a specific OR gate IC or within a GAL/CPLD - and use that as a part of the enable for all of the address decoding. Without this you're going to have some really random stuff happen and it might be the main cause of your issue.
- GARTHWILSON
- Forum Moderator
- Posts: 8773
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
Re: 65816 build -- completely stuck -- please help :)
akohlbecker wrote:
Unfortunately, the 65C816 requires an AC chip for at least the bank address latching as well as the associated logic, as the timing margin is pretty thin (10ns to latch after rising edge of clock).
Quote:
For the RAM, go with a slow, 55ns one before attempting to increase the speed.
I think what we're talking about here is output edge rate, rather than access time. They're two separate things. Without looking through a lot of data sheets again, I don't remember ever seeing the output edge rates specified on SRAMs. Have you?
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
- BigDumbDinosaur
- Posts: 9425
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: 65816 build -- completely stuck -- please help :)
rehsd wrote:
Hi, everyone! This is my first post to this forum. I'm glad to be part of this community!
Welcome! Glad to read that the 65C816 is getting some much-needed love.
Quote:
I am trying my best to get a 65816 system up and running. Unfortunately, I am running into some issues, likely timing related. I could use some pointers. I have posted some background information here: https://www.rehsdonline.com/post/troubl ... ram-part-2.
Like Garth, I cannot view that page. You can attach schematics, pictures, etc., to your posts here and save readers the trouble of having to go off-site.
x86? We ain't got no x86. We don't NEED no stinking x86!
- BigDumbDinosaur
- Posts: 9425
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: 65816 build -- completely stuck -- please help :)
plasmo wrote:
Redrew your schematic before your last two updates. It should be easier to analyze by the guys here. I don't see anything wrong specifically, but AC or ACT components are dangerous; too fast, too noisy. 15nS RAM is also bad news.
Bill
Bill
Ah! A schematic that is actually a schematic and, especially important to me, is not in color.
74AHC is a good choice, as it combines the speed of 74AC with the more “gentle” outputs of 74HC. I've used 74AC/ACT in all my designs to date without noise problems, but these are on four-layer boards with internal ground and power planes, and meticulous attention to layout details. 74AC/ACT on a two-layer board may be a pretty unforgiving arrangement due to ground bounce, ringing, etc.
No pullup resistor is required on RWB, as that output is driven in both directions—it's not an open-collector output.
x86? We ain't got no x86. We don't NEED no stinking x86!