6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Fri Sep 20, 2024 11:35 am

All times are UTC




Post new topic Reply to topic  [ 430 posts ]  Go to page Previous  1 ... 13, 14, 15, 16, 17, 18, 19 ... 29  Next
Author Message
PostPosted: Sun Feb 03, 2019 5:48 am 
Offline

Joined: Fri Jan 25, 2019 5:40 am
Posts: 346
Location: Knoxville, TN
Some more questions as I assign PCB footprints to symbols:

What are the dimensions of the WDC chips? I can't find the dimensions for them anywhere and there are a few options for PDIP-40 packaging. (I just need the width)

I have the WE\ for the EEPROM on board behind a switch to go to the WRITE\ signal. I've put a 100k resistor to pull up the WE\ line to logic high, and if the switch is closed the WRITE\ signal should be able to pull it low. Is 100k the right value for this? I chose a very weak pullup to ensure that WRITE\ would be able to pull it down.

Do I need bypass capacitors for oscillators? I believe the answer is yes, so I've already put them down, but if not, I can remove them.

Garth, I see you posted right as I'm writing this, thanks for your response to my previous questions. What value of resistor would be appropriate for driving an LED from one of these lines? I generally use 10k.


Top
 Profile  
Reply with quote  
PostPosted: Sun Feb 03, 2019 6:10 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8510
Location: Southern California
backspace119 wrote:
What are the dimensions of the WDC chips? I can't find the dimensions for them anywhere and there are a few options for PDIP-40 packaging. (I just need the width)

They're pretty standard dimensions. I don't think there are many companies making the leadframes; and IC manufacturers use the same suppliers. 40-pin DIP standard width is that the two rows of holes are .600" apart on centers. The body itself is about .530" wide.

Quote:
I have the WE\ for the EEPROM on board behind a switch to go to the WRITE\ signal. I've put a 100k resistor to pull up the WE\ line to logic high, and if the switch is closed the WRITE\ signal should be able to pull it low. Is 100k the right value for this? I chose a very weak pullup to ensure that WRITE\ would be able to pull it down.

See the data sheet for the particular part to verify that all inputs really are just the typical CMOS loads which mean the only current is probably a few picoamps of leakage. 100K would be fine for that.

Quote:
Do I need bypass capacitors for oscillators? I believe the answer is yes, so I've already put them down, but if not, I can remove them.

Sure, leave them. The bypass capacitor at the Vcc pin should be as close to it as possible, making the shortest possible path from the pin, through the capacitor, to ground. If you use leaded capacitors, minimize the lead length. Mount them so there's almost no lead length, if possible, not sticking up on poles. If you don't have a ground plane, make the capacitor's connections from the Vcc pin to the ground pin as short as practical. You used to be able to get DIP sockets with a capacitor built in, going diagonally under the IC since the Vcc and ground pins were on opposite corners. (Oh why oh why couldn't the designers have anticipated that parts would get faster and faster such that they should have put the power and ground pins at the middle of the pin rows, as close as possible to the die inside, and as close to each other as possible?! Fortunately they are that way on a lot of modern ICs, just not on 74XXxx.) Oh, and put the oscillator close to the processor.

Quote:
Garth, I see you posted right as I'm writing this, thanks for your response to my previous questions. What value of resistor would be appropriate for driving an LED from one of these lines? I generally use 10k.

20mA used to be considered pretty standard for LEDs. That tended to be a bit hard on LED life; but early LEDs were pretty dim, and kind of needed it. Modern LEDs OTOH can be blinding at that current. I tend to just give them 2 or 3mA. (5V-1.7V-.3V)/3mA=1K, where 1.7V is the approximate voltage drop of red LEDs (and for other colors, the voltage drop seems to be approximately proportional to the inverse of the peak wavelength, meaning green and yellow are higher, and blue is highest), and the .3V is a high estimate for the voltage drop inside the IC driving the pin.

_________________
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: Sun Feb 03, 2019 6:29 am 
Offline

Joined: Fri Jan 25, 2019 5:40 am
Posts: 346
Location: Knoxville, TN
GARTHWILSON wrote:
backspace119 wrote:
What are the dimensions of the WDC chips? I can't find the dimensions for them anywhere and there are a few options for PDIP-40 packaging. (I just need the width)

They're pretty standard dimensions. I don't think there are many companies making the leadframes; and IC manufacturers use the same suppliers. 40-pin DIP standard width is that the two rows of holes are .600" apart on centers. The body itself is about .530" wide.

Quote:
I have the WE\ for the EEPROM on board behind a switch to go to the WRITE\ signal. I've put a 100k resistor to pull up the WE\ line to logic high, and if the switch is closed the WRITE\ signal should be able to pull it low. Is 100k the right value for this? I chose a very weak pullup to ensure that WRITE\ would be able to pull it down.

See the data sheet for the particular part to verify that all inputs really are just the typical CMOS loads which mean the only current is probably a few picoamps of leakage. 100K would be fine for that.

Quote:
Do I need bypass capacitors for oscillators? I believe the answer is yes, so I've already put them down, but if not, I can remove them.

Sure, leave them. The bypass capacitor at the Vcc pin should be as close to it as possible, making the shortest possible path from the pin, through the capacitor, to ground. If you use leaded capacitors, minimize the lead length. Mount them so there's almost no lead length, if possible, not sticking up on poles. If you don't have a ground plane, make the capacitor's connections from the Vcc pin to the ground pin as short as practical. You used to be able to get DIP sockets with a capacitor built in, going diagonally under the IC since the Vcc and ground pins were on opposite corners. (Oh why oh why couldn't the designers have anticipated that parts would get faster and faster such that they should have put the power and ground pins at the middle of the pin rows, as close as possible to the die inside, and as close to each other as possible?! Fortunately they are that way on a lot of modern ICs, just not on 74XXxx.) Oh, and put the oscillator close to the processor.

Quote:
Garth, I see you posted right as I'm writing this, thanks for your response to my previous questions. What value of resistor would be appropriate for driving an LED from one of these lines? I generally use 10k.

20mA used to be considered pretty standard for LEDs. That tended to be a bit hard on LED life; but early LEDs were pretty dim, and kind of needed it. Modern LEDs OTOH can be blinding at that current. I tend to just give them 2 or 3mA. (5V-1.7V-.3V)/3mA=1K, where 1.7V is the approximate voltage drop of red LEDs (and for other colors, the voltage drop seems to be approximately proportional to the inverse of the peak wavelength, meaning green and yellow are higher, and blue is highest), and the .3V is a high estimate for the voltage drop inside the IC driving the pin.


Thanks for that, just out of curiosity, about how many mA can most of the CMOS pins on these chips drive? I've considered putting some LEDs other places to show activity, but was worried about drawing too much current. Also, my clock goes through a D flipflop, so I assume both need to be as close to the CPU as possible correct?


Top
 Profile  
Reply with quote  
PostPosted: Sun Feb 03, 2019 6:43 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8510
Location: Southern California
backspace119 wrote:
Just out of curiosity, about how many mA can most of the CMOS pins on these chips drive?

The best I can answer is what I have in the 11th bullet point in the "Hardware differences" part of my article on the many differences between the NMOS and CMOS '02, and to some extent the '816 which I suspect uses the same pin drivers:

    CMOS has stronger bus-drive capability, far stronger than the datasheets let on. I have done some brief tests on WDC's W65C816S's pin drivers which I suspect are the same ones used they used on the W65C02S. Their behavior was pretty much symmetrical, able to pull up just as hard as they can pull down, unlike TTL which cannot pull up as hard as down. If you had to boil my test results down to approximations and treat the circuits as just a resistance, the data pin drivers acted very roughly like a SPDT switch with 50Ω in series with the common terminal (ie, the output); and the address bus pins, as a SPDT switch with 60Ω in series. The time constant of 60Ω times the capacitive load of 10 CMOS loads is around 3ns, which is less added delay than you'll get from a bus transceiver IC.

    In a separate test on WDC's W65C22S VIA (not the W65C22N) I/O pins years earlier, I found they were each able to pull to within 0.8V of either rail with a 220-ohm resistor to the opposite rail, meaning a 19mA load, even pulling up, and give 50mA into a dead short. Rockwell's R65C22 could pull down with 100mA into a dead short, but could not pull up as hard, not being symmetrical like WDC's.

(That's not to say I would want to leave a dead short on for very long, let alone on several pins at once!)

Quote:
Also, my clock goes through a D flipflop, so I assume both need to be as close to the CPU as possible correct?

Yeah, keep them pretty close.

_________________
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: Sun Feb 03, 2019 7:56 am 
Offline

Joined: Fri Jan 25, 2019 5:40 am
Posts: 346
Location: Knoxville, TN
GARTHWILSON wrote:
backspace119 wrote:
Just out of curiosity, about how many mA can most of the CMOS pins on these chips drive?

The best I can answer is what I have in the 11th bullet point in the "Hardware differences" part of my article on the many differences between the NMOS and CMOS '02, and to some extent the '816 which I suspect uses the same pin drivers:

    CMOS has stronger bus-drive capability, far stronger than the datasheets let on. I have done some brief tests on WDC's W65C816S's pin drivers which I suspect are the same ones used they used on the W65C02S. Their behavior was pretty much symmetrical, able to pull up just as hard as they can pull down, unlike TTL which cannot pull up as hard as down. If you had to boil my test results down to approximations and treat the circuits as just a resistance, the data pin drivers acted very roughly like a SPDT switch with 50Ω in series with the common terminal (ie, the output); and the address bus pins, as a SPDT switch with 60Ω in series. The time constant of 60Ω times the capacitive load of 10 CMOS loads is around 3ns, which is less added delay than you'll get from a bus transceiver IC.

    In a separate test on WDC's W65C22S VIA (not the W65C22N) I/O pins years earlier, I found they were each able to pull to within 0.8V of either rail with a 220-ohm resistor to the opposite rail, meaning a 19mA load, even pulling up, and give 50mA into a dead short. Rockwell's R65C22 could pull down with 100mA into a dead short, but could not pull up as hard, not being symmetrical like WDC's.

(That's not to say I would want to leave a dead short on for very long, let alone on several pins at once!)

Quote:
Also, my clock goes through a D flipflop, so I assume both need to be as close to the CPU as possible correct?

Yeah, keep them pretty close.


Thanks, I just finished assigning PCB footprints and sourcing components for all passives and connectors (except the damn pot for the display, I've been having trouble finding one that fits into the pcb layouts I have (and I don't want to make another) the one I have in my cart is on back order, so I'll be looking for a different one). I may look at places I could put informative LEDs since they don't create much of a load. I've still got some cleanup to do (empty inputs on IRQ and gate and no inputs to NMI and gate yet) and I may see if I can rework logic to reduce chip count. I'm going to go take a look at the RTC you recommended yesterday, because I still haven't added that in.

Lightning EDIT: I pulled up the page on that RTC and I see it doesn't have a through hole package.

I can do SMT soldering, but I hate it, and my results are often a bit messy and unprofessional looking. Also, I haven't implemented I2C yet, (really probably should do that right now) and I think I'd rather use an SPI one if it's available (except, I dumped all my SPI lines onto other things.... I may remove one of the SPI pin headers and put it there if I get an SPI one).

That one that has the multiplexed address/data bus is still calling my name. I've seen 74 chips that are "demultiplexers" how would I go about implementing this?


Top
 Profile  
Reply with quote  
PostPosted: Sun Feb 03, 2019 9:16 am 
Offline

Joined: Fri Jan 25, 2019 5:40 am
Posts: 346
Location: Knoxville, TN
So I read on how to demultiplex the bus, and I think I have a basic understanding of it, but when looking around at alternative chips I actually happened upon a RTC with a watchdog timer in it as well that has a Parallel interface here.

It's expensive, but not prohibitively. I'm going to use this for ease of integration, because I don't want to mess up on demultiplexing the bus of the other one, and I'd prefer to have one that has everything included (crystal, battery).

After I integrate this, I should have the whole schematic 100% done. I'll upload it here so everyone can point out how many noob mistakes I made. (hopefully only a few). In particular, I'd like to make sure that I'm demultiplexing the 65c816 Data/A16-23 bus correctly.


Top
 Profile  
Reply with quote  
PostPosted: Sun Feb 03, 2019 9:25 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8510
Location: Southern California
Non-volatile RAM is always nice, but make sure it's fast enough for what you want. Note also that you cannot replace the battery, and it's only good for ten years.

The demultiplexing has to do with latching the 816's address high byte. It is not related to what kind of RTC you use. It's not clear that you're seeing it this way.

_________________
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: Sun Feb 03, 2019 9:50 am 
Offline

Joined: Fri Jan 25, 2019 5:40 am
Posts: 346
Location: Knoxville, TN
GARTHWILSON wrote:
Non-volatile RAM is always nice, but make sure it's fast enough for what you want. Note also that you cannot replace the battery, and it's only good for ten years.

The demultiplexing has to do with latching the 816's address high byte. It is not related to what kind of RTC you use. It's not clear that you're seeing it this way.


I believe I may've caused some confusion. There was a model of RTC that had a multiplexed data and address bus that I had been looking at. I'm not any more because I found this one. I'll shove this one in a socket so I can replace it in the future if need be since I can't replace the battery. I do need to go back and check the speed though....As far as the 816 goes, I was saying that when I upload the schematic (in fact, I'll attach it to this message, it should be done) I was concerned about the circuit to demultiplex D0-7 from A16-23 on the 816, because I used the reference circuit from the sheet, and...although I'm fairly sure I wired it correctly, I'm not certain.

Here's the schematic, in PDF form so you can zoom:
Attachment:
schematic.pdf [583.61 KiB]
Downloaded 46 times



EDIT: I went back and checked it, it has a 70ns latency for read and write at 5v operation. This is too slow for clock speeds much higher than what I'm wanting to run default, which is 5Mhz. I may see if there's a faster one that's pin compatible.

EDIT 2: there doesn't seem to be one by Maxim, but I'll look at other brands. All of their EDIP ones are 70ns.

EDIT 3: Actually, after reading further, it seems to suggest that valid outputs are on the databus before the end of the 70ns cycle....could this mean that it may be fast enough? I'm looking at the timing graph and working on understanding it, to me it looks like as long as my enables to the chip are fast it will only take a max of 35ns to get data on the bus. (which is still a bit too slow for 16Mhz but not by a lot).


Top
 Profile  
Reply with quote  
PostPosted: Sun Feb 03, 2019 10:15 am 
Offline

Joined: Fri Jan 25, 2019 5:40 am
Posts: 346
Location: Knoxville, TN
To get an idea of the components and spacing involved, I dumped the components into the layout editor and looked at the 3D view, here it is:

Attachment:
board_dump.PNG
board_dump.PNG [ 5.65 MiB | Viewed 717 times ]


Top
 Profile  
Reply with quote  
PostPosted: Sun Feb 03, 2019 10:43 am 
Offline
User avatar

Joined: Wed Feb 14, 2018 2:33 pm
Posts: 1466
Location: Scotland
[quote="backspace119"
Here's the schematic, in PDF form so you can zoom:
Attachment:
schematic.pdf

[/quote]

Always interesting to see others designs - thanks.


I don't have time right now to go into it in detail, but those 7805 regulators though... You ought to use bypass/decoupling capacitors physically next to them, else they have a tendency to oscillate. Typically it's 0.2µF on the input and 0.1µF on the output. (This is in addition to the big 470µF tanks you've put on them).

I see 2 x 7805's though - are you running 2 in parallel, or do you have separate blocks being fed off separate 5v sources?

I'd really not like to wire those in parallel - what might happen is the one with the highest output will supply most of the current and get hot... (This happened by accident on the first Raspberry Pi board - there was a 3.3v linear regulator on the board, but also another inside the USB chip which was connected to the board 3.3v lines rather than a decoupling capacitor - the USB chip did get rather hot on those early Pi's!)

And speaking of hot - a standard 7805 in a TO220 case is rated to one amp, and if you're feeding these from 12v, then they are going to get very hot - so make sure you have whacking big heatsinks on them and/or use the higher powered TO3 variants, but if they're under an amp each then do consider using SMPS drop-in replacements - these run much cooler and are far more efficient. I power my SBC from a USB connection and it takes about 150mA - the majority of that is for the GAL and LEDs.

But good luck - exciting time ahead!

Cheers,

-Gordon

_________________
--
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/


Top
 Profile  
Reply with quote  
PostPosted: Sun Feb 03, 2019 10:47 am 
Offline

Joined: Fri Jan 25, 2019 5:40 am
Posts: 346
Location: Knoxville, TN
drogon wrote:
backspace119 wrote:
Here's the schematic, in PDF form so you can zoom:
Attachment:
schematic.pdf



Always interesting to see others designs - thanks.


I don't have time right now to go into it in detail, but those 7805 regulators though... You ought to use bypass/decoupling capacitors physically next to them, else they have a tendency to oscillate. Typically it's 0.2µF on the input and 0.1µF on the output. (This is in addition to the big 470µF tanks you've put on them).

I see 2 x 7805's though - are you running 2 in parallel, or do you have separate blocks being fed off separate 5v sources?

I'd really not like to wire those in parallel - what might happen is the one with the highest output will supply most of the current and get hot... (This happened by accident on the first Raspberry Pi board - there was a 3.3v linear regulator on the board, but also another inside the USB chip which was connected to the board 3.3v lines rather than a decoupling capacitor - the USB chip did get rather hot on those early Pi's!)

And speaking of hot - a standard 7805 in a TO220 case is rated to one amp, and if you're feeding these from 12v, then they are going to get very hot - so make sure you have whacking big heatsinks on them and/or use the higher powered TO3 variants, but if they're under an amp each then do consider using SMPS drop-in replacements - these run much cooler and are far more efficient. I power my SBC from a USB connection and it takes about 150mA - the majority of that is for the GAL and LEDs.

But good luck - exciting time ahead!

Cheers,

-Gordon


They're for separate blocks, one is dedicated to the display backlight (half an amp). I may look at other regulator packages, but I want to stick with THT if I can. I may run a 3rd regulator for powering the DIN 5 connector to the keyboard, as it draws 300ma


Top
 Profile  
Reply with quote  
PostPosted: Sun Feb 03, 2019 10:52 am 
Offline
User avatar

Joined: Wed Feb 14, 2018 2:33 pm
Posts: 1466
Location: Scotland
backspace119 wrote:
They're for separate blocks, one is dedicated to the display backlight (half an amp). I may look at other regulator packages, but I want to stick with THT if I can. I may run a 3rd regulator for powering the DIN 5 connector to the keyboard, as it draws 300ma


I've used TSR 1-2450 and SR10S05 SMPS variants in the past. They are more expensive than the old 7805 but much less likely to burn you (he said, speaking from experience!)

-Gordon

_________________
--
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/


Top
 Profile  
Reply with quote  
PostPosted: Sun Feb 03, 2019 10:56 am 
Offline

Joined: Fri Jan 25, 2019 5:40 am
Posts: 346
Location: Knoxville, TN
drogon wrote:
backspace119 wrote:
They're for separate blocks, one is dedicated to the display backlight (half an amp). I may look at other regulator packages, but I want to stick with THT if I can. I may run a 3rd regulator for powering the DIN 5 connector to the keyboard, as it draws 300ma


I've used TSR 1-2450 and SR10S05 SMPS variants in the past. They are more expensive than the old 7805 but much less likely to burn you (he said, speaking from experience!)

-Gordon


I burned my index finger so badly on a to-92 package chip that I still have a slight scar today. I think it was a mosfet though, not a linear regulator. Now I have a temp gun, I find it's a more efficient way of telling if something is hot enough to burn you, without burning yourself :P.

I'll look at that regulator, I've know about the 7805 for a long time is why I used it, I'll happily upgrade though


Top
 Profile  
Reply with quote  
PostPosted: Sun Feb 03, 2019 10:59 am 
Offline
User avatar

Joined: Wed Feb 14, 2018 2:33 pm
Posts: 1466
Location: Scotland
backspace119 wrote:
To get an idea of the components and spacing involved, I dumped the components into the layout editor and looked at the 3D view, here it is:

Attachment:
board_dump.PNG


And now it's time to play the sliding block puzzle and move everything into place - lots of fun and frustration ahead! (And PCB milling, so probably no traces between IC pins - the 65816 and 6522s might route better vertically like a long thin centipede rather than side by side like a fat frog...

I must make an effort to learn KiCad myself though - been stuck in Fritzing for the past 6 years or so and while it's worked very well for me and I've made a few dozen different designs with it, it's more or less a dead-end project now.

Cheers,

-Gordon

_________________
--
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/


Top
 Profile  
Reply with quote  
PostPosted: Sun Feb 03, 2019 11:01 am 
Offline

Joined: Fri Jan 25, 2019 5:40 am
Posts: 346
Location: Knoxville, TN
drogon wrote:
backspace119 wrote:
To get an idea of the components and spacing involved, I dumped the components into the layout editor and looked at the 3D view, here it is:

Attachment:
board_dump.PNG


And now it's time to play the sliding block puzzle and move everything into place - lots of fun and frustration ahead! (And PCB milling, so probably no traces between IC pins - the 65816 and 6522s might route better vertically like a long thin centipede rather than side by side like a fat frog...

I must make an effort to learn KiCad myself though - been stuck in Fritzing for the past 6 years or so and while it's worked very well for me and I've made a few dozen different designs with it, it's more or less a dead-end project now.

Cheers,

-Gordon


I came from Eagle to kicad. It was weird at first but once you learn the flow (eeschema -> annotate and assign footprints -> pcb new) it's more or less the same. And it sure beats the hell out of the $500 yearly subscription I had to pay for eagle, being open source and free.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 430 posts ]  Go to page Previous  1 ... 13, 14, 15, 16, 17, 18, 19 ... 29  Next

All times are UTC


Who is online

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