Blue April - RC6502 Project Space
Re: Blue April - RC6502 Project Space
I think you shouldn't use global labels (e.g. A15) that are subsets of the bus, for sure, as the "A15" on the bus is not necessarily the same. I believe you should use the whole bus every time, with a consistent range of members, and break out the wire you need from it - or explicitly export wires like A15 on one of the sheets to a global A15 label, to make sure that in other sheets the global label A15 does refer to that wire.
But the main reason you're getting ERC errors, I think, is that you're using "bus-to-bus entries" to make 45-degree lines - they are not normal connections, so one side of them is not actually the same bus as the other! Either draw 45-degree lines by hand (tedious) or just don't draw the 45-degree lines at all. If in doubt, I think Alt-4 will highlight everything connected to a wire you hover over, so you can verify what is or is not connected.
I can't confirm the above however as Kicad 7 no longer seems to have the bus-to-bus entries, only wire-to-bus entries. I'm not even sure what the bus-to-bus ones actually were meant to do.
But the main reason you're getting ERC errors, I think, is that you're using "bus-to-bus entries" to make 45-degree lines - they are not normal connections, so one side of them is not actually the same bus as the other! Either draw 45-degree lines by hand (tedious) or just don't draw the 45-degree lines at all. If in doubt, I think Alt-4 will highlight everything connected to a wire you hover over, so you can verify what is or is not connected.
I can't confirm the above however as Kicad 7 no longer seems to have the bus-to-bus entries, only wire-to-bus entries. I'm not even sure what the bus-to-bus ones actually were meant to do.
Re: Blue April - RC6502 Project Space
Proxy wrote:
so to me that seems like the global labels aren't actually working and the only reason the data bus one didn't throw an error is because of the local label attatched to the same bus.
gfoot wrote:
If in doubt, I think Alt-4 will highlight everything connected to a wire you hover over, so you can verify what is or is not connected.
gfoot wrote:
But the main reason you're getting ERC errors, I think, is that you're using "bus-to-bus entries" to make 45-degree lines - they are not normal connections, so one side of them is not actually the same bus as the other! Either draw 45-degree lines by hand (tedious) or just don't draw the 45-degree lines at all. If in doubt, I think Alt-4 will highlight everything connected to a wire you hover over, so you can verify what is or is not connected.
I guess I have spent enough time on this; I'll just delete those address buses and use individual global labels for the `688 and `138. Thanks for helping investigate; at least I learned how the highlight tool works, which is quite useful!
"The key is not to let the hardware sense any fear." - Radical Brad
Re: Blue April - RC6502 Project Space
I have found that Kicad gets sulky if you wire the bus connectors the wrong way around...
1) draw and label the bus e.g. [A0..15]
2) place your part to attach to it
3) label each pin to be attached (I usually do a short stub, but I'm not sure it's absolutely required). These should match the bus e.g. A0, A1 etc
4) select the bus connector tool and rotate the 45 joining wire until the control end - the end it rotates around - meets the just labelled stud and the other end meets the bus. This requires the bus to be in the right place relative to the stub - 0.2" away by default.
I speculate that if you do it this way around, the stub acquires the bus label and therefore attaches to the bus correctly; the other way around it's trying to acquire the complete bus name, or just doesn't know what to connect to... I don't know for certain but I haven't had any unconnected issues since I discovered this by trial and error.
Curiously once you have a spray of connections to the bus you can copy and paste them elsewhere and they remember their names.
Neil
1) draw and label the bus e.g. [A0..15]
2) place your part to attach to it
3) label each pin to be attached (I usually do a short stub, but I'm not sure it's absolutely required). These should match the bus e.g. A0, A1 etc
4) select the bus connector tool and rotate the 45 joining wire until the control end - the end it rotates around - meets the just labelled stud and the other end meets the bus. This requires the bus to be in the right place relative to the stub - 0.2" away by default.
I speculate that if you do it this way around, the stub acquires the bus label and therefore attaches to the bus correctly; the other way around it's trying to acquire the complete bus name, or just doesn't know what to connect to... I don't know for certain but I haven't had any unconnected issues since I discovered this by trial and error.
Curiously once you have a spray of connections to the bus you can copy and paste them elsewhere and they remember their names.
Neil
Re: Blue April - RC6502 Project Space
Cross posted with Neil!
The procedure you describe is exactly how I did it the first time, before I found the tutorial with the "unfold from bus" tool. I seem to get the same results either way. Highlighting the actual pin in the component shows that it's connected to every other A4 in the whole project, but the ERC thinks it's still unconnected.
The procedure you describe is exactly how I did it the first time, before I found the tutorial with the "unfold from bus" tool. I seem to get the same results either way. Highlighting the actual pin in the component shows that it's connected to every other A4 in the whole project, but the ERC thinks it's still unconnected.
"The key is not to let the hardware sense any fear." - Radical Brad
Re: Blue April - RC6502 Project Space
I'm on my phone so it's hard to type, but what I'm referring to is the 45degree blue corners you have in some places. These are possibly a special type of bus-to-bus join, and may be causing the issue. I'd delete them and just join the blue bus lines together directly.
Note that all identically-named labels on any single sheet are connected, whatever their type. So buses do pretty much nothing within a single sheet as both endpoints already need to have the same net label (e.g. A4)! They are mostly just decorative. The only case they do something significant is when you export them between sheets either using global labels or hierarchical labels for the whole bus (as you have done). But this is why any case where you use the same bus member twice within one sheet is not triggering the error - because it is connected to at least one other thing through the label alone. But not all the things you wanted!
Kicad's legacy handling of buses is quite poor - just a thin veneer over labels. It is more "first class" in version 7.
Edit, oh one other thing - make sure you press the dialog button to rerun the ERC after opening the ERC dialog, or it will just repeat the errors from last time! I've been confused by missing this step before.
Note that all identically-named labels on any single sheet are connected, whatever their type. So buses do pretty much nothing within a single sheet as both endpoints already need to have the same net label (e.g. A4)! They are mostly just decorative. The only case they do something significant is when you export them between sheets either using global labels or hierarchical labels for the whole bus (as you have done). But this is why any case where you use the same bus member twice within one sheet is not triggering the error - because it is connected to at least one other thing through the label alone. But not all the things you wanted!
Kicad's legacy handling of buses is quite poor - just a thin veneer over labels. It is more "first class" in version 7.
Edit, oh one other thing - make sure you press the dialog button to rerun the ERC after opening the ERC dialog, or it will just repeat the errors from last time! I've been confused by missing this step before.
Re: Blue April - RC6502 Project Space
gfoot wrote:
Kicad's legacy handling of buses is quite poor - just a thin veneer over labels. It is more "first class" in version 7.
Edit: Alas, version 7 requires MacOS 11.6. I can't run it on my elderly macbook.
Anyway, here's a more or less done schematic. It's in black & white in case BDD is lurking menacingly someplace nearby.
- Attachments
-
- 6502.pdf
- (285.18 KiB) Downloaded 77 times
Last edited by Paganini on Thu Jul 13, 2023 11:55 pm, edited 1 time in total.
"The key is not to let the hardware sense any fear." - Radical Brad
Re: Blue April - RC6502 Project Space
Nice! I'd suggest learning how hierarchical pins work, they can be quite nice to use depending on how modular your sheets are, and make you less dependent on getting the global labels matched correctly.
J301 is missing some resistors otherwise it's going to short VCC to ground.
I'm not sure why RAM/~ROM has a pulldown resistor, R401?
Also where did you get your symbols from, did you make them yourself? I've looked for decent 6502 symbols in the past and ended up making my own or customising them I think, so I'm curious where you found yours.
J301 is missing some resistors otherwise it's going to short VCC to ground.
I'm not sure why RAM/~ROM has a pulldown resistor, R401?
Also where did you get your symbols from, did you make them yourself? I've looked for decent 6502 symbols in the past and ended up making my own or customising them I think, so I'm curious where you found yours.
Re: Blue April - RC6502 Project Space
Man, you have a good eye!
This originally had a separate VCC for each jumper, I think, and I messed it up trying to clean it up visually (it was overlapping with the address bus. I will go rejigger it.
Ah, that's a leftover. I had originally planned to use a VIA port rather than a flip-flop, and I wanted to make sure that ROM was activated by default after a reset. It can be deleted!
I use forum member Alarm Siren's KiCAD library for the 6502 and 6522s. For the others I mostly just edited existing symbols from the symbol library. The only one I had to make from scratch was the DS1813, which didn't seem to have a similar device in the library. (Although, the library is huge, so maybe I missed one.) I just took one stage from a flip flop and gave it new pins.
gfoot wrote:
J301 is missing some resistors otherwise it's going to short VCC to ground.
Quote:
I'm not sure why RAM/~ROM has a pulldown resistor, R401?
Quote:
Also where did you get your symbols from, did you make them yourself? I've looked for decent 6502 symbols in the past and ended up making my own or customising them I think, so I'm curious where you found yours.
"The key is not to let the hardware sense any fear." - Radical Brad
Re: Blue April - RC6502 Project Space
Paganini wrote:
Highlighting the actual pin in the component shows that it's connected to every other A4 in the whole project, but the ERC thinks it's still unconnected.
Bear in mind that apart from the case of crossing busses between sheets, the bus itself has no function other than making happy those who don't like lots of chips with named pins and nothing joining them together. Which is not a bad ambition; the better the diagram - for some subjective value of 'better' - the easier it is to understand. But that said, I have commercial products with 100-pin controllers in the middle of three or four hundred largely analog or service parts, and the diagram for the controller is basically about eighty global labels and the power supply decoupling.
As has been pointed out: everything on a Kikad diagram (and every other schematic editor I'm familiar with) which is named is joined to everything else with the same name - either globally or on the same page, depending on the label type.
Neil
Re: Blue April - RC6502 Project Space
barnacle wrote:
As has been pointed out: everything on a Kikad diagram (and every other schematic editor I'm familiar with) which is named is joined to everything else with the same name - either globally or on the same page, depending on the label type.
"The key is not to let the hardware sense any fear." - Radical Brad
Re: Blue April - RC6502 Project Space
IMHO visual clarity is important in schematics so you're right to want to make it clear.
Can you share the broken schematic files, preferably a zip of the project folder? I could take a look in more detail. I've never had any problems making buses except when I was starting out and didn't understand how they worked.
Can you share the broken schematic files, preferably a zip of the project folder? I could take a look in more detail. I've never had any problems making buses except when I was starting out and didn't understand how they worked.
Re: Blue April - RC6502 Project Space
gfoot wrote:
Can you share the broken schematic files, preferably a zip of the project folder? I could take a look in more detail. I've never had any problems making buses except when I was starting out and didn't understand how they worked.
"The key is not to let the hardware sense any fear." - Radical Brad
Re: Blue April - RC6502 Project Space
Paganini wrote:
gfoot wrote:
Can you share the broken schematic files, preferably a zip of the project folder? I could take a look in more detail. I've never had any problems making buses except when I was starting out and didn't understand how they worked.
Re: Blue April - RC6502 Project Space
Iiiiinteresting. I have version 6.0.9. Thanks for testing! Is 6.0.11 a release version, or do you use the testing branch?
"The key is not to let the hardware sense any fear." - Radical Brad
Re: Blue April - RC6502 Project Space
I normally use version 7.0.0, I just installed 6.0.11 to test your project as it appeared to be the highest official release of version 6. If you're upgrading then I think you might as well go straight to the latest version 7 release.