What does it take to achieve a phi2 frequency of 1MHz?
What does it take to achieve a phi2 frequency of 1MHz?
My second/latest 65C02 computer, constructed on stripboard around February this year, was built to run at 1Mhz. I didn't take bypass capacitors particularly seriously at the time and had even less knowledge about electrical performance than I do now- I thought that it being a soldered design would be enough to reach the 1MHz goal.
So far, it has ran at a maximum of 250KHz, through a 4-bit counter dividing a 1MHz can oscillator. The jump from 250KHz to 500KHz is too much, and I get no activity on either the 65C22 GPIO, or the character LCD (interfaced according to this: http://www.6502.org/mini-projects/optrexlcd/lcd.htm)
I have attached an image of this computer which I write of, and please, excuse the poor lighting; I'm no photographer.
I include the image mainly as a point of reference (are the bus lines too long? Improper power wiring?), although I would also appreciate feedback on how I could possibly get it running at atleast 500KHz.
Note the "bypass" capacitors at the bottom of the board, closer to the VSS pins than to VCC. I revisited the board briefly last week, adding extra ground wires between the RAM, ROM, and 65C02. I also soldered 0.1µF 50V X7R capacitors on the bottom of the board. I kept the lead going to the VCC pin as short as possible, but had only 3 of them with long enough leads. I gave these to the RAM, ROM, and 65C02.
The extra ground wire to the 65C02 had to be cut when I pulled the CPU out of it's socket, and tried my only other 65C02. Both fail to run at 500KHz.
So far, it has ran at a maximum of 250KHz, through a 4-bit counter dividing a 1MHz can oscillator. The jump from 250KHz to 500KHz is too much, and I get no activity on either the 65C22 GPIO, or the character LCD (interfaced according to this: http://www.6502.org/mini-projects/optrexlcd/lcd.htm)
I have attached an image of this computer which I write of, and please, excuse the poor lighting; I'm no photographer.
I include the image mainly as a point of reference (are the bus lines too long? Improper power wiring?), although I would also appreciate feedback on how I could possibly get it running at atleast 500KHz.
Note the "bypass" capacitors at the bottom of the board, closer to the VSS pins than to VCC. I revisited the board briefly last week, adding extra ground wires between the RAM, ROM, and 65C02. I also soldered 0.1µF 50V X7R capacitors on the bottom of the board. I kept the lead going to the VCC pin as short as possible, but had only 3 of them with long enough leads. I gave these to the RAM, ROM, and 65C02.
The extra ground wire to the 65C02 had to be cut when I pulled the CPU out of it's socket, and tried my only other 65C02. Both fail to run at 500KHz.
Re: What does it take to achieve a phi2 frequency of 1MHz?
I can't tell you what it takes other than to "just do it".
I had a 16Mhz 65C02 running on stripboard at 16Mhz before I went to a PCB.
Some photos and details here:
https://projects.drogon.net/ruby-6502-on-stripboard/
So don't give up - even though I'd suggest that board is a bit wide, 1Mhz ought to be trivially achievable. Check supply voltages, connections and so on.
-Gordon
I had a 16Mhz 65C02 running on stripboard at 16Mhz before I went to a PCB.
Some photos and details here:
https://projects.drogon.net/ruby-6502-on-stripboard/
So don't give up - even though I'd suggest that board is a bit wide, 1Mhz ought to be trivially achievable. Check supply voltages, connections and so on.
-Gordon
--
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/
Re: What does it take to achieve a phi2 frequency of 1MHz?
Although I've just checked the schematic you linked to - the LCD is directly connected to the bus - it's possible that the LCD simply isn't fast enough. They're really not designed for high speed, so check the timings of the particular one you have. I've always connected them up through a VIA.
-Gordon
-Gordon
--
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/
Re: What does it take to achieve a phi2 frequency of 1MHz?
The LCD in my SBC is running comfortably at 8MHz directly off the bus, so I would think 1MHz should be quite doable depending on the model.
That being said, it is hard to know what might be the issue just looking at the one side of your strip board and no schematic or component list.
EDIT: I should note, the LCD module I have is a fairly old one (15, 20 years old?) that I got when I purchased an Arduino learning kit from Fry's Electronics way back in the day.
That being said, it is hard to know what might be the issue just looking at the one side of your strip board and no schematic or component list.
EDIT: I should note, the LCD module I have is a fairly old one (15, 20 years old?) that I got when I purchased an Arduino learning kit from Fry's Electronics way back in the day.
- GARTHWILSON
- Forum Moderator
- Posts: 8773
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
Re: What does it take to achieve a phi2 frequency of 1MHz?
Yuri, what's the brand of LCD driver IC(s) on your LCD? The data sheet of the common Hitachi HD44780 doesn't guarantee it'll go much over 250kHz.
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: What does it take to achieve a phi2 frequency of 1MHz?
GARTHWILSON wrote:
Yuri, what's the brand of LCD driver IC(s) on your LCD? The data sheet of the common Hitachi HD44780 doesn't guarantee it'll go much over 250kHz.
- Attachments
-
- eone-1602a1.pdf
- (367.66 KiB) Downloaded 30 times
Re: What does it take to achieve a phi2 frequency of 1MHz?
Here's a shot of it running my memory diag program.
- BigDumbDinosaur
- Posts: 9425
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: What does it take to achieve a phi2 frequency of 1MHz?
olof-a wrote:
My second/latest 65C02 computer, constructed on stripboard around February this year, was built to run at 1Mhz. I didn't take bypass capacitors particularly seriously at the time and had even less knowledge about electrical performance than I do now- I thought that it being a soldered design would be enough to reach the 1MHz goal.
So far, it has ran at a maximum of 250KHz, through a 4-bit counter dividing a 1MHz can oscillator. The jump from 250KHz to 500KHz is too much, and I get no activity on either the 65C22 GPIO, or the character LCD (interfaced according to this: http://www.6502.org/mini-projects/optrexlcd/lcd.htm)...
So far, it has ran at a maximum of 250KHz, through a 4-bit counter dividing a 1MHz can oscillator. The jump from 250KHz to 500KHz is too much, and I get no activity on either the 65C22 GPIO, or the character LCD (interfaced according to this: http://www.6502.org/mini-projects/optrexlcd/lcd.htm)...
Strip boards can definitely be run beyond 1 MHz. That said, a picture alone isn’t all that helpful in diagnosing your issue. I will say it appears you could benefit from placing parts closer together to reduce wire run lengths.
You need to post a schematic.
x86? We ain't got no x86. We don't NEED no stinking x86!
Re: What does it take to achieve a phi2 frequency of 1MHz?
(Welcome, olof-a!)
(I go with Gordon's idea that the LCD may well be the limiting factor, as noted also by others. There are many threads, and many tactics, about how to accommodate a slower-speed peripheral on a generally faster system. Best is to check the spec, if you can find it.)
(I go with Gordon's idea that the LCD may well be the limiting factor, as noted also by others. There are many threads, and many tactics, about how to accommodate a slower-speed peripheral on a generally faster system. Best is to check the spec, if you can find it.)
Re: What does it take to achieve a phi2 frequency of 1MHz?
How is the divided clock signal looking coming out from the counter? What kind of counter is it? Is it HC/AC/LS etc? Others have told me the clock signal needs to be very clean for the 65C02 to operate. Perhaps a dumb question but have you tried using the 1 MHz clock directly?
I would probably ignore the LCD (or even detach it) and focus on getting a blinking light running from the IO pins of the 65C22, to reduce the number of possible problem sources.
I would probably ignore the LCD (or even detach it) and focus on getting a blinking light running from the IO pins of the 65C22, to reduce the number of possible problem sources.
Re: What does it take to achieve a phi2 frequency of 1MHz?
As above, Olof: the most suspicious culprit is the display... but perhaps we could see a circuit diagram?
Regarding the strip board - apart from the obvious - signals not connected, short circuits - at 1MHz, you can basically slap stuff together and it will usually work. Decoupling capacitors are essential, and it helps if the wire lengths are minimised, but that's about it, really.
The suggestion of flashing an LED is a good one; it proves your processor, your memory, your VIA (and your LED!). Just don't try and drive an LED directly from an IC pin; use a series resistor to limit the current to 1-3mA.
Neil
Regarding the strip board - apart from the obvious - signals not connected, short circuits - at 1MHz, you can basically slap stuff together and it will usually work. Decoupling capacitors are essential, and it helps if the wire lengths are minimised, but that's about it, really.
The suggestion of flashing an LED is a good one; it proves your processor, your memory, your VIA (and your LED!). Just don't try and drive an LED directly from an IC pin; use a series resistor to limit the current to 1-3mA.
Neil
Re: What does it take to achieve a phi2 frequency of 1MHz?
Quote:
Although I've just checked the schematic you linked to - the LCD is directly connected to the bus - it's possible that the LCD simply isn't fast enough. They're really not designed for high speed, so check the timings of the particular one you have. I've always connected them up through a VIA.
I'll give the blinkenlights a go as Neil suggested, my VIA is confirmed to be working. If this still does not work then I will likely give up on this board. It has been a huge pain to work on at this stage.
Quote:
You need to post a schematic.
I did draw diagrams for the address decoding, and I can confirm that all address decode logic on the board is true to the plans which I drew, except the LCD decode logic, as noted above. I'll recreate my old diagrams in a paint program and have them posted here somewhat soon.
Re: What does it take to achieve a phi2 frequency of 1MHz?
olof-a wrote:
Quote:
Although I've just checked the schematic you linked to - the LCD is directly connected to the bus - it's possible that the LCD simply isn't fast enough. They're really not designed for high speed, so check the timings of the particular one you have. I've always connected them up through a VIA.
I'll give the blinkenlights a go as Neil suggested, my VIA is confirmed to be working. If this still does not work then I will likely give up on this board. It has been a huge pain to work on at this stage.
I'd not give up. There is a lot you can do to help check stuff - LEDs on the VIA for example, then using the VIA to do some simple timing interrupts - and also write code for it. Then consider using one port of the VIA to drive the LCD. You only need 8 bits - 4 data, one for the RS and E pins. (leaves one spare) Personally I always tie the R/W pin low and never read from the device - just use a timing loop for each operation.
-Gordon
--
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/
Re: What does it take to achieve a phi2 frequency of 1MHz?
Welcome, olof-a!
I hope you'll lend an ear to Gordon's encouragement, and not give up.
Or perhaps you can explain why the board "has been a huge pain to work on." Are you just losing patience with the debugging, or is there something about this project overall which seems to add friction every step of the way?
As for schematics, yes they're important, but don't feel obliged to recreate them in a paint program before sharing them with us. Honestly, nobody will mind if instead you just post a photo of your hand-drawn diagrams.
That said, it'll obviously be best if, before sharing the hand-drawn diagrams, you review and amend them for clarity! In fact, I wonder if the lack of a clear, complete schematic is *causing* you to feel friction every step of the way!
Speaking for myself, I find that looking at a project's diagram makes it easier to think about what's going on. That's no small advantage! IMO, having a reasonably good diagram is well worth the effort.
-- Jeff
Or perhaps you can explain why the board "has been a huge pain to work on." Are you just losing patience with the debugging, or is there something about this project overall which seems to add friction every step of the way?
As for schematics, yes they're important, but don't feel obliged to recreate them in a paint program before sharing them with us. Honestly, nobody will mind if instead you just post a photo of your hand-drawn diagrams.
That said, it'll obviously be best if, before sharing the hand-drawn diagrams, you review and amend them for clarity! In fact, I wonder if the lack of a clear, complete schematic is *causing* you to feel friction every step of the way!
Speaking for myself, I find that looking at a project's diagram makes it easier to think about what's going on. That's no small advantage! IMO, having a reasonably good diagram is well worth the effort.
-- 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
- BigDumbDinosaur
- Posts: 9425
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: What does it take to achieve a phi2 frequency of 1MHz?
Dr Jefyll wrote:
Speaking for myself, I find that looking at a project's diagram makes it easier to think about what's going on.
Ditto on that. It’s the old “a picture is worth a thousand words” thing. Except for wiring up very simple things, e.g., a light bulb, battery and switch, I need some sort of schematic in front of me...a sketch on a napkin, if nothing else.
x86? We ain't got no x86. We don't NEED no stinking x86!