6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Wed May 15, 2024 12:09 am

All times are UTC




Post new topic Reply to topic  [ 163 posts ]  Go to page Previous  1 ... 6, 7, 8, 9, 10, 11  Next
Author Message
PostPosted: Tue Oct 26, 2021 1:49 pm 
Offline

Joined: Sat Oct 09, 2021 11:21 am
Posts: 704
Location: Texas
BigEd wrote:
The reason it's a technical challenge is that the Pi needs to respond to bus cycles within a few hundred nanoseconds. The usual operating systems aren't sufficiently fast and deterministic - and, as it turns out, the usual ARM machinery of the Pi when running carefully tuned code is only fast enough for a 1MHz bus, not for a 2MHz bus. For that, the more-deterministic GPU was needed.

Python is far too slow for this, I'm sure.



Ah I see, that makes sense. So, could the Pi at least have a constant input, to read what's going on? Kind of like a 'display' in a way, though even then because of the speed it might be garbled or something. This is good to think about.

BigEd wrote:
For a conventional 5V 6502 project there's also the question of level-shifting - the Pi runs at 3.3V.

With a suitable interface chip - a CPLD, perhaps, or an actual FIFO - it is possible. See the CPC-CPlink project for a (Z80-flavoured) example.


I've been thinking about that 3.3V. So am I wrong in thinking that the W65C02 will accept TTL level inputs? I'm fairly sure I have seen that all over the place, that it's TTL compatible, etc. So then the 3.3V shouldn't be a problem when I'm sending from the Pi to the 6502. But the other way around? Hm.

If it requires more IC's to get going, then I'm not for it. Just thinking of easy alternatives, not necessarily software wise, but hardware wise.

Thank you BigEd, great points here. I might abandon that idea as fast as I had it!

Chad


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 26, 2021 2:01 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10800
Location: England
A few projects have been built, I think, which run every chip at 3.3V, and if you do that, it's easy to interoperate with another system which also runs at 3.3V. The various CMOS '02 chips and '816 chips will operate at 3.3V, although quite probably with a penalty on the maximum clock speed.

This is a different question from the question of interoperability of logic families: which voltages count as low or high, and what voltages an output will drive to. That's something which has been covered many times on this forum. This might be a useful resource, if you think about it carefully:
http://www.interfacebus.com/voltage_threshold.html

One of the issues of interfacing 5V systems with 3.3V systems is that the lower voltage system can be exposed to 5V signals, which is more than the supply rail voltage, and that can damage a chip. For this reason, you will sometimes see a 3.3V chip described as 5V tolerant. If it's not described as tolerant, it probably isn't.

So, there are three flavours of chip, broadly: 5V chips, 3.3V chips which are 5V tolerant, and 3.3V chips which are not 5V tolerant. (And this is not the same as the discussion about logic levels.)

My advice to a beginner would be to stay away from all this. Build a 5V system, make it a simple one. Build someone else's design, successfully, before building your own. Build your own simple system before trying a complex one.


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 26, 2021 2:41 pm 
Offline

Joined: Fri Dec 21, 2018 1:05 am
Posts: 1076
Location: Albuquerque NM USA
The official line is that 5V system won't operate below 4.75V or 4.5V for military components. HOWEVER, once you have a 5V system running, do try to run it at lower voltage to check the design margin, and I think you'll be surprised how low the 5V system can run, especially if you use CMOS components. I've ran Z80, 6502 systems down to 3.3V, that included TTL logic, oscillator, CPLD, RAM, EPROM, CPU, and CF disk.
Bill
Edit: you do need to remove the voltage supervisor otherwise it'll hold the system in reset below the threshold voltage.


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 26, 2021 3:07 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8183
Location: Midwestern USA
BigEd wrote:
My advice to a beginner would be to stay away from all this. Build a 5V system, make it a simple one. Build someone else's design, successfully, before building your own. Build your own simple system before trying a complex one.

I completely agree with Ed. If you keep going down the path you seem to be following you will likely end up with a DOA unit—assuming you reach a point where you can actually build something. Right now, you are too busy conjuring "what ifs" and, in my opinion, losing sight of the big picture.

As Ed and others around here have advised a number of times, start with a basic system consisting of RAM, ROM and some I/O. Learn how to make that work. Study its operation so concepts such as logic and timing are clear in your mind. Learn how to write and debug code for it. Once you gain that sort of experience with a working piece of hardware you can look at designing and building a more complex machine.

As I said in an earlier post—which you acknowledged—at some point, you need to stop designing and start building. Evidently that idea has failed to sink in, otherwise you wouldn't be talking about somehow interfacing a Raspberry PI to your imaginary system. You are way over your head with such an idea. In other words, quit wasting your time with such nonsense and get busy with building something your technical skills can handle.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 26, 2021 4:04 pm 
Offline

Joined: Sat Oct 09, 2021 11:21 am
Posts: 704
Location: Texas
Thank you all for the replies. I have seen that chart before. My current model includes only CMOS 5V chips, so I don't think I should have any problems.

BigDumbDinosaur wrote:
As I said in an earlier post—which you acknowledged—at some point, you need to stop designing and start building. Evidently that idea has failed to sink in, otherwise you wouldn't be talking about somehow interfacing a Raspberry PI to your imaginary system. You are way over your head with such an idea. In other words, quit wasting your time with such nonsense and get busy with building something your technical skills can handle.


You are right BDD. I have completed my schematics already and have most of my PCB design complete except for a few things here and there. Your advice has been very valuable along the way and I go back through these posts and others referenced to remember what to do when and where. My wife has given me to green-light to purchase the components and the PCB (I do need permission!).

Still, I know I ask dumb questions, and I will continue to ask dumb questions. And I know someone else has already asked these dumb questions, and you probably answered that person about their dumb questions as well. I thank you for your patience with me when I ask dumb questions.

My point here in asking was just a postulate. If I shouldn't ask any more theoretical questions here, that is fine. I have a slew of "possible theories" which helps me understand the WHOLE of the topic better, not necessarily just this specific thing. I'm the kid who ask "why" all the time. So, I'm sorry for asking, I didn't mean harm, nor did I mean to imply that I was dead-set on doing this sort of thing.

Thank you for your patience with me.


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 26, 2021 4:47 pm 
Offline

Joined: Sat Oct 09, 2021 11:21 am
Posts: 704
Location: Texas
As a side note:

Look guys! The college is letting me borrow a 'scope! I even get to take it home with me.

Chad


Attachments:
20211026_114107.jpg
20211026_114107.jpg [ 1.52 MiB | Viewed 4205 times ]
Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 26, 2021 5:31 pm 
Offline

Joined: Fri Dec 21, 2018 1:05 am
Posts: 1076
Location: Albuquerque NM USA
Ooo, giga sampling scope, you can get spoiled with that really quick!

This is OT, but we more experienced designers need to come up with a cheap, simple-to-build EPROM programmer based on 6502, TTL logic and no programmable devices (not even a boot EPROM). This can save newbies the expense of an EPROM programmer and the components can be reused for a real 6502 design. Maybe this has been done already, if not, it is a challenge!
Bill

Edit, we can talk about this in the hardware section if anyone want to pursue the challenge.


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 26, 2021 7:57 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8433
Location: Southern California
sburrow wrote:
Look guys! The college is letting me borrow a 'scope! I even get to take it home with me.

I don't see any real 'scope probes. Are they included, just not in the picture? Just clips to the coax will not be suitable. There's a lot that goes into oscilloscope probes which is not obvious, including even special cable (not normal coax), which is why they're expensive. Even for a 20MHz 'scope, they start at about $40 a pair. What I see in the picture will give extreme capacitive loading to fast digital lines and probably make your creation crash, and the 'scope won't be any good past about 2MHz anyway with them, which means a digital signal of about 200kHz or less. The probes must have a x10 switch setting.

_________________
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?


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 26, 2021 8:10 pm 
Offline

Joined: Sat Oct 09, 2021 11:21 am
Posts: 704
Location: Texas
GARTHWILSON wrote:
sburrow wrote:
Look guys! The college is letting me borrow a 'scope! I even get to take it home with me.

I don't see any real 'scope probes. Are they included, just not in the picture? Just clips to the coax will not be suitable. There's a lot that goes into oscilloscope probes which is not obvious, including even special cable (not normal coax), which is why they're expensive. Even for a 20MHz 'scope, they start at about $40 a pair. What I see in the picture will give extreme capacitive loading to fast digital lines and probably make your creation crash, and the 'scope won't be any good past about 2MHz anyway with them, which means a digital signal of about 200kHz or less. The probes must have a x10 switch setting.


Hm!

I did turn the thing on, and I found that x10 setting you were talking about.

I have alligator clips and the little "prong" things. I just did a look on the internet for "oscilloscope probes" and I don't know if this qualifies as that? I mean, the thing was just handed to me. They say it was water damaged in the blizzard last February, but again it turned on at least.

I suppose I should test it out on a breadboard and see what happens. I literally know nothing about it, but at least I have something which should technically be better than nothing?

Thank you Garth.

Chad


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 26, 2021 9:20 pm 
Offline

Joined: Fri Dec 21, 2018 1:05 am
Posts: 1076
Location: Albuquerque NM USA
P2220 probe is around $50 used on eBay.

The test point at lower right corner of scope may be a calibrated square wave output? If so, it is a good way to calibrate your scope probe.
Bill


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 26, 2021 11:39 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8183
Location: Midwestern USA
sburrow wrote:
As a side note:

Look guys! The college is letting me borrow a 'scope! I even get to take it home with me.

Chad

Nice scope! How did you manage that?

You still should have a logic probe. Although a scope can be invaluable for solving timing and quality-of-signal issues, a basic logic probe is a quicker way to find basic circuit faults.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Mon Nov 08, 2021 11:48 pm 
Offline

Joined: Sat Oct 09, 2021 11:21 am
Posts: 704
Location: Texas
Hi everyone!

It's been a few weeks. I want to update you on what's been going on.

Attached are some pics of my creation. The top looks nice enough, the bottom is a big mess o' wires. I have learned so much about soldering it's crazy.

Attached also are the (rough) schematics that I followed.

I programmed it with that nice EEPROM programmer/reader on the breadboard. THAT is a thing of beauty.

So! Does it work? Sometimes. It works... sometimes. I hit that reset button a bazillion times, and have tried looking at it through the 'scope and multimeter and all kinds of things. It works... sometimes. My code is simple enough: Turn the VIA's PB to output, and then PB0-3 are high and PB4-7 are low. I have expansion pins on some PB lines and I test it with an LED on the breadboard.

I get weird feedback sometimes. It's like I get this alternating pattern that's not 0V or 5V, but both at the same time. The scope just makes a big dark rectangle on some signals and the multimeter reads 2.5V. I figured it was alternating with the clock, but the 'scope picks up on the clock very well but not these weird half-signals.

I tried changing capacitors and all kinds of things. Sometimes it works as expected, sometimes it doesn't.

What did I learn from this? That a printed board would have taken about 5 days of soldering down to about an hour. I can tack-solder a pin-point without effort at this point. Especially if all those wires weren't in the way. Sheesh!

But I think that if I print a board, the same thing might happen. That it works... sometimes. I figure it might be a capacitor problem, but I could be wrong. Leaving it to sit for a while, and then trying again actually helps, I think. I changed polarized capacitors and got about the same results, plus or minus. I disconnected the LCD and nothing changes. The reset button does actually work, most of the time at least. It's weird to get different results at different times, doesn't make sense in my mathematical mind. [ I tried shaking and slamming the thing a couple of times, that didn't change anything either. ]

Anyways, if you have advice I'll listen to it! If I don't hear back, I'll just keep doing my own thing I guess.

Thank you all for everything. You all have taught me a great deal. I'm here today telling you that I have learned a lot, and at least I got it to work... sometimes.

Chad


Attachments:
GG-Schematic.pdf [262.18 KiB]
Downloaded 29 times
20211108_105354.jpg
20211108_105354.jpg [ 1.75 MiB | Viewed 4080 times ]
20211107_151011.jpg
20211107_151011.jpg [ 2.52 MiB | Viewed 4080 times ]
20211107_175800.jpg
20211107_175800.jpg [ 2.64 MiB | Viewed 4080 times ]
Top
 Profile  
Reply with quote  
PostPosted: Mon Nov 08, 2021 11:56 pm 
Offline
User avatar

Joined: Sun Jun 30, 2013 10:26 pm
Posts: 1929
Location: Sacramento, CA, USA
sburrow wrote:
I get weird feedback sometimes. It's like I get this alternating pattern that's not 0V or 5V, but both at the same time. The scope just makes a big dark rectangle on some signals and the multimeter reads 2.5V. I figured it was alternating with the clock, but the 'scope picks up on the clock very well but not these weird half-signals

Kind of like this? @CountChocula might be able to offer some insights.

_________________
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)


Top
 Profile  
Reply with quote  
PostPosted: Tue Nov 09, 2021 12:01 am 
Offline

Joined: Sat Oct 09, 2021 11:21 am
Posts: 704
Location: Texas
barrym95838 wrote:
Kind of like this? @CountChocula might be able to offer some insights.


Kindof like that. The big solid parts, yes. But they are constant, they don't go away. This is not every line, but some address lines, some data lines, etc. And again, it happens... sometimes.

Thank you!


Top
 Profile  
Reply with quote  
PostPosted: Tue Nov 09, 2021 1:09 am 
Offline
User avatar

Joined: Sun Nov 07, 2021 4:11 pm
Posts: 101
Location: Toronto, Canada
sburrow wrote:
barrym95838 wrote:
Kind of like this? @CountChocula might be able to offer some insights.


Kindof like that. The big solid parts, yes. But they are constant, they don't go away. This is not every line, but some address lines, some data lines, etc. And again, it happens... sometimes.

Thank you!


Hey—your board looks amazing! In my case, the problem was leaving pins floating on a level shifter. Not sure whether this applies in your case, but perhaps worth checking whether there are any floating pins anywhere. It was a total surprise to me that this would be a problem :-)

Good luck!


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 163 posts ]  Go to page Previous  1 ... 6, 7, 8, 9, 10, 11  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 4 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: