Master econet module connector

for bbc micro/electron hardware, peripherals & programming issues (NOT emulators!)
User avatar
sydney
Posts: 2137
Joined: Wed May 18, 2005 9:09 am
Location: Newcastle upon Tyne
Contact:

Master econet module connector

Post by sydney » Fri Sep 27, 2013 1:28 pm

Yet more silly questions from me.

I've been reading with interest the second user port thread and mmbeeb thread. I recently fitted an mmbeeb to my master in such a way that it is now unlikely that I'll use UPURS :( . I too need more user ports!
I've been looking at the master econet connector and wondering if it would be possible to connect a 6522 to it and use the econet socket on the back as a dedicated UPURS socket.
To say I am a novice when it come to electronics would be an understatement so could someone explain in simple terms if this would be possible or if not then why. If it's too much to explain simply a 'NO!' will suffice!
I decided to not post this in the second user port thread as this would be a master only solution and sweh is looking to expand his beeb.

User avatar
danielj
Posts: 6195
Joined: Thu Oct 02, 2008 4:51 pm
Location: Manchester
Contact:

Re: Master econet module connector

Post by danielj » Fri Sep 27, 2013 1:54 pm

I think so :? It'd be in the &FEC0-&FEDF range, you'd use nADLC as the select for the VIA?

d.

User avatar
1024MAK
Posts: 7442
Joined: Mon Apr 18, 2011 4:46 pm
Location: Looking forward to summer in Somerset, UK...
Contact:

Re: Master econet module connector

Post by 1024MAK » Fri Sep 27, 2013 1:58 pm

Yes, I think this is possible but I will have a look at the schematic diagram before I say anything else...

Mark
For a "Complete BBC Games Archive" visit www.bbcmicro.co.uk NOW!
BeebWiki‬ - for answers to many questions...

User avatar
sydney
Posts: 2137
Joined: Wed May 18, 2005 9:09 am
Location: Newcastle upon Tyne
Contact:

Re: Master econet module connector

Post by sydney » Sat Sep 28, 2013 8:36 am

The fact that you have both said it's probably possible has inspired me to have a go at this over the next week. I've been examining the master schematic and just downloaded the 6522 datasheet. I'm going to have a good think about this and hopefully have something you can all point at and laugh offer constructive criticism on by the end of Sunday, maybe Monday.

User avatar
sydney
Posts: 2137
Joined: Wed May 18, 2005 9:09 am
Location: Newcastle upon Tyne
Contact:

Re: Master econet module connector

Post by sydney » Sun Sep 29, 2013 6:54 am

I have the issue of every electronics which has the electron user port project in and using that and the picture below i have come up with a guess at how to connect the 6522 to the master econet connector (SK5).

Image

Image

Image

Most of it seems pretty obvious.
CD0-CD7 on sk5 connect to D0-D7 on the 6522
+5VA to VCC
0VA to GND
RST to RES
A0-A3 to RS0-RS3
BR/W to R/W
02IN to 02
NETINT to IRQ (I'm presuming NETINT referrs to an interrupt because of the name.)
In the article in everyday electronics and in ic6 of the master pin 24 of the 6522, CS1, is connected to +5V so that's what I've done.
I presume ADLC similar to VIAB in ic6 so I've connected that to CS2.

Image

How's it looking so far?

[edit]Just had a thought, would it be possible to send one port to the econet socket for UPURS and the other to a header and connect MMBEEB internally leaving the original user port completely free?[/edit]

User avatar
1024MAK
Posts: 7442
Joined: Mon Apr 18, 2011 4:46 pm
Location: Looking forward to summer in Somerset, UK...
Contact:

Re: Master econet module connector

Post by 1024MAK » Sun Sep 29, 2013 9:51 am

sydney wrote:How's it looking so far?
Yep, that looks okay :D .

It is convention where there are active low signals like /RST, /RES, /NETINT, /IRQ and /CS2 to either over-line them (hard to do in most text editors inc. the forum), or put a "/" or a "!" in front of them.
sydney wrote:[edit]Just had a thought, would it be possible to send one port to the econet socket for UPURS and the other to a header and connect MMBEEB internally leaving the original user port completely free?[/edit]
The software will need changing. This may be possible, or not. It depends on how it was coded. The 6522 VIA Port A is slightly different to port B (see the data sheet for full details). You need to ask the authors of the software...

The other potential problem is the interrupt handling (the /IRQ pin on the 6522 VIA) . I don't know if either the UPURS or the MMBEEB use interrupts, but if they do I am not sure how the Beeb firmware processes /NETINT compared to just a normal /IRQ.

Mark
For a "Complete BBC Games Archive" visit www.bbcmicro.co.uk NOW!
BeebWiki‬ - for answers to many questions...

User avatar
1024MAK
Posts: 7442
Joined: Mon Apr 18, 2011 4:46 pm
Location: Looking forward to summer in Somerset, UK...
Contact:

Re: Master econet module connector

Post by 1024MAK » Sun Sep 29, 2013 9:57 am

danielj wrote:I think so :? It'd be in the &FEC0-&FEDF range, you'd use nADLC as the select for the VIA?

d.
And just as I was saying that convention is to use a / or !, Daniel has used another variation which is a "n"!

As he says, the additional 6522 VIA will be in the &FEC0-&FEDF address range (because you are using /ADLC to select the 6522 VIA (/CS2 pin).

So any system that you want to use (eg UPURS) will need the software to be altered to use these addresses in place of the normal user port addresses.

Mark
For a "Complete BBC Games Archive" visit www.bbcmicro.co.uk NOW!
BeebWiki‬ - for answers to many questions...

User avatar
sweh
Posts: 1920
Joined: Sat Mar 10, 2012 12:05 pm
Location: New York, New York
Contact:

Re: Master econet module connector

Post by sweh » Sun Sep 29, 2013 11:31 am

1024MAK wrote:The other potential problem is the interrupt handling (the /IRQ pin on the 6522 VIA) . I don't know if either the UPURS or the MMBEEB use interrupts
As Martin taught me, when I was working on HostFS:UPURS, the UPURS routines can't use interrrupts 'cos they're just far too slow. The core loop disables 'em :-) Its amazing how much work Martin managed to squeeze into so few clock cycles!
Rgds
Stephen

User avatar
1024MAK
Posts: 7442
Joined: Mon Apr 18, 2011 4:46 pm
Location: Looking forward to summer in Somerset, UK...
Contact:

Re: Master econet module connector

Post by 1024MAK » Sun Sep 29, 2013 12:08 pm

I didn't think UPURS used interrupts (but was not 100% sure, I do know that UPURS code is very speed sensitive/critical).

I would suggest then that you ask Martin if he will produce a version that uses the &FEC0-&FEDF range so that you can use UPURS with your "Econet" 6522 VIA "user" port.

You can then leave the MMBEEB connected to the standard Beeb user port.

If you have any devices that only need access from BASIC, or which you have assembly source code for them, they can be connected to your "Econet" 6522 VIA on pins PA0 to PA7 etc.

There is also no need to connect the /INT pin on the 6522 VIA.

Mark
For a "Complete BBC Games Archive" visit www.bbcmicro.co.uk NOW!
BeebWiki‬ - for answers to many questions...

User avatar
sydney
Posts: 2137
Joined: Wed May 18, 2005 9:09 am
Location: Newcastle upon Tyne
Contact:

Re: Master econet module connector

Post by sydney » Sun Sep 29, 2013 2:00 pm

Cheers Mark!
I'd thought about using ! in the table but didn't was to confuse things further if this was not the way to do it.
I wasn't that bothered about MMBEEB working with this, UPURS is the important part!
I've been through my box of bits and have a suitably sized piece of stripboard, a 6522 and socket and exactly enough pins to do the job.
I'm going to line up the data pins of the connector with the data pins of the 6522 and wire the other connection as needed.
What kind of wire is best for this? I'll pop over to ESR tomorrow and pick some up and hopefully have something to test tomorrow night.

I've got my master in bits next to me and just noticed the connector is the other way to how I thought it was so I might have to adjust the positioning of the 6522. :(

Simon

User avatar
1024MAK
Posts: 7442
Joined: Mon Apr 18, 2011 4:46 pm
Location: Looking forward to summer in Somerset, UK...
Contact:

Re: Master econet module connector

Post by 1024MAK » Sun Sep 29, 2013 2:15 pm

Myself, I often use off-cuts of telecom wire (as I have some spare).
But this is what you are after for use point to point wiring on stripboard: "solid core 1/0.6mm wire" or similar. Stranded is much more of a pain to use for this.

For use where it is useful to have the wiring flexible, like wiring to plugs/sockets/connectors, use 7/0.2mm stranded wire. Unless you are using IDC connectors in which case you want ribbon cable.

ESR are good :D I use them from time to time myself. Links: http://www.esr.co.uk/electronics/produc ... _cable.htm, http://www.esr.co.uk/electronics/cable-equipment.htm, http://www.esr.co.uk/electronics/cable-ribbon.htm.

Of course there are other suppliers :mrgreen:

Mark
For a "Complete BBC Games Archive" visit www.bbcmicro.co.uk NOW!
BeebWiki‬ - for answers to many questions...

User avatar
jgharston
Posts: 3062
Joined: Thu Sep 24, 2009 11:22 am
Location: Whitby/Sheffield
Contact:

Re: Master econet module connector

Post by jgharston » Sun Sep 29, 2013 5:25 pm

sydney wrote:NETINT to IRQ (I'm presuming NETINT referrs to an interrupt because of the name.)
Ah. NETINT drives the 6502's NMI line. The 6522s' INTs drive the 6502's IRQ line. To respond to interrupts from the Eco6522 you'll have to claim the NMI space. Remember to hand it back to the previous claimer when you've done with it, and remember to monitor for other claimers taking it away from you when they need it!

Code: Select all

$ bbcbasic
PDP11 BBC BASIC IV Version 0.25
(C) Copyright J.G.Harston 1989,2005-2015
>_

User avatar
sydney
Posts: 2137
Joined: Wed May 18, 2005 9:09 am
Location: Newcastle upon Tyne
Contact:

Re: Master econet module connector

Post by sydney » Sun Sep 29, 2013 9:09 pm

jgharston wrote:
sydney wrote:NETINT to IRQ (I'm presuming NETINT referrs to an interrupt because of the name.)
Ah. NETINT drives the 6502's NMI line. The 6522s' INTs drive the 6502's IRQ line. To respond to interrupts from the Eco6522 you'll have to claim the NMI space. Remember to hand it back to the previous claimer when you've done with it, and remember to monitor for other claimers taking it away from you when they need it!
Thanks for that John, don't really understand it but I'm sure the other guys do! Thankfully to get UPURS working it seems I don't need interrupts anyway.

I have a solution to the connector being the reverse of what I thought - mount the 6522 on the bottom of the board! Unfortunately I won't be able to socket it but my soldering has improved dramatically in the last few months and I'm confident I can do it without damaging it.

I have 2 more questions:
1. I have a few ethernet cables lying round. Could I cannibalise one of them for the wiring on the circuit. It will save me a 20 mile round trip to the coast to ESR.
2. The schematic for sk5 shows the connections out of numerical sequence. Is this how they are physically or are they in order? ie

Code: Select all

sk5 shows
A B 5 6 1 2 4 3 7 8 9 10 11 12 13 14 15 16 17
I think the socket will more likely be in order:

Code: Select all

A B 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
Thanks again,
Simon

User avatar
1024MAK
Posts: 7442
Joined: Mon Apr 18, 2011 4:46 pm
Location: Looking forward to summer in Somerset, UK...
Contact:

Re: Master econet module connector

Post by 1024MAK » Mon Sep 30, 2013 12:31 am

sydney wrote:I have 2 more questions:
1. I have a few ethernet cables lying round. Could I cannibalise one of them for the wiring on the circuit. It will save me a 20 mile round trip to the coast to ESR.
If you mean Ethernet patch leads (with plugs fitted both ends), not so good but may be usable (I believe the cable is stranded as the plugs are a type of IDC connector).
If you mean the "fixed" wiring, that's fine (it's just better quality telecoms cable) as it's solid core.
With both types, just be aware that the insulation will melt if you take too long soldering it :(
sydney also wrote: 2. The schematic for sk5 shows the connections out of numerical sequence. Is this how they are physically or are they in order? ie

Code: Select all

sk5 shows
A B 5 6 1 2 4 3 7 8 9 10 11 12 13 14 15 16 17
I think the socket will more likely be in order:

Code: Select all

A B 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
Schematic diagrams often show connectors out of sequence, so don't worry about that.
The board *should* have the connections in numerical sequence, but if you want to check, and you have a multimeter, use it on resistance (low ohms range) and using the Master schematic, test to known points (eg chips).

Mark
For a "Complete BBC Games Archive" visit www.bbcmicro.co.uk NOW!
BeebWiki‬ - for answers to many questions...

User avatar
sydney
Posts: 2137
Joined: Wed May 18, 2005 9:09 am
Location: Newcastle upon Tyne
Contact:

Re: Master econet module connector

Post by sydney » Mon Sep 30, 2013 8:07 pm

Forgive the crudeness of the diagram - I used a spreadsheet program.

Image
That is how I'm going to connect everything up.

Is the din connector 180 or 240?
The middle pin on the din socket,numbered 2, is connected to ground so can I use that without modifying it?

In a pm conversation about repairs to my beeb TheCorfiot suggested using the irq from one of the other 6522's to give full use of the 6522 I'm adding. I might look into that at a later date, I'm going to concentrate on getting UPURS up and running first.

User avatar
sweh
Posts: 1920
Joined: Sat Mar 10, 2012 12:05 pm
Location: New York, New York
Contact:

Re: Master econet module connector

Post by sweh » Mon Sep 30, 2013 9:10 pm

You might want to redraw the 20-pin port in a 2*10 array 'cos that'll impact how you run the wires. See my awful pictures on the "2nd user port" thread for how this changes things.
Rgds
Stephen

User avatar
sydney
Posts: 2137
Joined: Wed May 18, 2005 9:09 am
Location: Newcastle upon Tyne
Contact:

Re: Master econet module connector

Post by sydney » Tue Oct 01, 2013 10:59 am

sweh wrote:You might want to redraw the 20-pin port in a 2*10 array 'cos that'll impact how you run the wires. See my awful pictures on the "2nd user port" thread for how this changes things.
I'm not actually going to use the 20-pin connector. sk5 is the 19-pin connector on the motherboard and sk6 is a 5 pin connector on the motherboard which leads out to the 5-pin din socket for econet. I'm only connecting the 4 pins of the 6522 used by UPURS to the socket. If I mount the 6522 on the top of the board I'll probably end up with something resembling spaghetti! By mounting in on the bottom I can directly connect the databus form the motherboard to the 6522 using the copper strips on the veroboard.

Just had a look at your pictures and unfortunately you've not added the capacitor yet. I'm wondering where I should put one. Anyone want to tell me? Do they go between pins 1 + 20 of the 6522? How does this look?

Image

Any good or am I not even close?

User avatar
danielj
Posts: 6195
Joined: Thu Oct 02, 2008 4:51 pm
Location: Manchester
Contact:

Re: Master econet module connector

Post by danielj » Tue Oct 01, 2013 11:00 am

Looks right to me. :)

d.

User avatar
1024MAK
Posts: 7442
Joined: Mon Apr 18, 2011 4:46 pm
Location: Looking forward to summer in Somerset, UK...
Contact:

Re: Master econet module connector

Post by 1024MAK » Tue Oct 01, 2013 11:21 am

Image
For a "Complete BBC Games Archive" visit www.bbcmicro.co.uk NOW!
BeebWiki‬ - for answers to many questions...

User avatar
sydney
Posts: 2137
Joined: Wed May 18, 2005 9:09 am
Location: Newcastle upon Tyne
Contact:

Re: Master econet module connector

Post by sydney » Tue Oct 01, 2013 9:09 pm

It took me about 2 hours but I'm finally finished. I hate soldering onto strip board, it seems much harder than soldering onto pcb's.
top.jpg
Those of a nervous disposition may want to look away now! :lol:
bottom.jpg
To be honest I'll be surprised if it works!
I have a 7 pin din connector and I've removed the two pins that I don't need and will probably make up a cable tomorrow. Do you think a usb cable would be suitable? Just cut each end off and connect it up?

User avatar
1024MAK
Posts: 7442
Joined: Mon Apr 18, 2011 4:46 pm
Location: Looking forward to summer in Somerset, UK...
Contact:

Re: Master econet module connector

Post by 1024MAK » Tue Oct 01, 2013 9:43 pm

Aren't USB cables only 4 core?
Or do they have a screen with a drain wire?
I've never cut one in half (yet)...

UPURS IIRC needs TXD, RXD, CTS, RTS and ground/0V. That's five wires...

I had some 6 core telephone "IDC" cord to hand when I made mine :D

And no you can't pinch some from a normal telephone, as domestic 'phones only use 4 core. The bit I had was an off-cut from a project many years ago that needed 6 cores and 6 core telephone "IDC" cord fit the bill at the time :mrgreen:

Anyway, the cable type is not critical. It is better if it is screened, but not essential.

Mark
For a "Complete BBC Games Archive" visit www.bbcmicro.co.uk NOW!
BeebWiki‬ - for answers to many questions...

User avatar
CMcDougall
Posts: 6063
Joined: Wed Feb 02, 2005 3:13 pm
Location: Shadow in a Valley of Scotland
Contact:

Re: Master econet module connector

Post by CMcDougall » Tue Oct 01, 2013 10:00 pm

Mark wrote:Aren't USB cables only 4 core?
Or do they have a screen with a drain wire?
I've never cut one in half (yet)..
yip, 4 core, being : +5v, data -, data +, -/neg
great for feeding 31/2" PC drives to a beeb/elk :D
ImageImageImage

User avatar
sweh
Posts: 1920
Joined: Sat Mar 10, 2012 12:05 pm
Location: New York, New York
Contact:

Re: Master econet module connector

Post by sweh » Tue Oct 01, 2013 11:47 pm

1024MAK wrote:If you mean Ethernet patch leads (with plugs fitted both ends), not so good but may be usable (I believe the cable is stranded as the plugs are a type of IDC connector).
If you mean the "fixed" wiring, that's fine (it's just better quality telecoms cable) as it's solid core.
I'm gonna try this for my project because the wires are thinner than the cable I normally use.

Do I need to unwrap the pairs or can I use them as is? I'm thinking that if I don't need to unwrap them then I can keep some runs within the insulating tube, which will be tidier (eg from the 6522 to the IDC20; all 8 data pins could be a single run of ethernet). Or I could use one half of each pair (so orange, green, brown, blue, but not the white cables). Or else I can strip and unwind the pairs.

I'm just worried about cross-talk...
Rgds
Stephen

User avatar
MartinB
Posts: 4707
Joined: Mon Mar 31, 2008 9:04 pm
Location: Obscurity
Contact:

Re: Master econet module connector

Post by MartinB » Wed Oct 02, 2013 4:27 am

Twisted pair lines are normally used for carrying true & complement signals (e.g. Clock +/- where one is a mirror of the other) such that the signal-induced crosstalk is therefore 'self-cancelling' and all asymmetric noise is removed by differential line-receivers. Thus, I do think cross-talk could be an issue here but if you had a scope you could physically see to what extent it was occurring.

User avatar
1024MAK
Posts: 7442
Joined: Mon Apr 18, 2011 4:46 pm
Location: Looking forward to summer in Somerset, UK...
Contact:

Re: Master econet module connector

Post by 1024MAK » Wed Oct 02, 2013 7:13 am

Whist Martin is correct, Ethernet cable is not tightly twisted, so as long as the run is not too long, I think you should be okay.

Try it and see :D

Mark

PS if anyone is bothered, they could always go in search of the cat 5 spec...
I believe each pair in the cable is twisted at a slightly different rate.
For a "Complete BBC Games Archive" visit www.bbcmicro.co.uk NOW!
BeebWiki‬ - for answers to many questions...

User avatar
sydney
Posts: 2137
Joined: Wed May 18, 2005 9:09 am
Location: Newcastle upon Tyne
Contact:

Re: Master econet module connector

Post by sydney » Wed Oct 02, 2013 7:34 am

sweh wrote:
1024MAK wrote:If you mean Ethernet patch leads (with plugs fitted both ends), not so good but may be usable (I believe the cable is stranded as the plugs are a type of IDC connector).
If you mean the "fixed" wiring, that's fine (it's just better quality telecoms cable) as it's solid core.
I'm gonna try this for my project because the wires are thinner than the cable I normally use.

Do I need to unwrap the pairs or can I use them as is? I'm thinking that if I don't need to unwrap them then I can keep some runs within the insulating tube, which will be tidier (eg from the 6522 to the IDC20; all 8 data pins could be a single run of ethernet). Or I could use one half of each pair (so orange, green, brown, blue, but not the white cables). Or else I can strip and unwind the pairs.

I'm just worried about cross-talk...
In the past I tried using stranded wire and didn't think it would make much difference using solid core wire. It does! I'm so glad I listened to Mark and bought some.
Simon

User avatar
sweh
Posts: 1920
Joined: Sat Mar 10, 2012 12:05 pm
Location: New York, New York
Contact:

Re: Master econet module connector

Post by sweh » Wed Oct 02, 2013 8:52 am

MartinB wrote:Twisted pair lines are normally used for carrying true & complement signals (e.g. Clock +/- where one is a mirror of the other) such that the signal-induced crosstalk is therefore 'self-cancelling' and all asymmetric noise is removed by differential line-receivers. Thus, I do think cross-talk could be an issue here but if you had a scope you could physically see to what extent it was occurring.
Yeah, I understand the concept behind ethernet twisted pairs; that's why I asked :-)

Of course, standard UTP cabling is designed to be used at 125Mhz over distances of up to 185m, whereas I'm just looking at 1Mhz over a distance of a few cm.

I don't have a scope. The best I've got is a cheap multimeter :-)
Rgds
Stephen

User avatar
sweh
Posts: 1920
Joined: Sat Mar 10, 2012 12:05 pm
Location: New York, New York
Contact:

Re: Master econet module connector

Post by sweh » Wed Oct 02, 2013 8:55 am

1024MAK wrote:Whist Martin is correct, Ethernet cable is not tightly twisted, so as long as the run is not too long, I think you should be okay.

Try it and see :D

Mark

PS if anyone is bothered, they could always go in search of the cat 5 spec...
I believe each pair in the cable is twisted at a slightly different rate.
"Try it and see"? Intermittent failure/success, corrupted MMC cards... I wouldn't know if it was the cabling or my soldering that'd be at fault :-)

Yes, each cable is twisted at a different rate, to try and reduce cross chatter between pairs (eg orange and green). But within a pair cross-talk could still occur; that's why it's differential (TX+/-; RX+/-).
Rgds
Stephen

User avatar
sydney
Posts: 2137
Joined: Wed May 18, 2005 9:09 am
Location: Newcastle upon Tyne
Contact:

Re: Master econet module connector

Post by sydney » Wed Oct 02, 2013 9:19 am

I've tested my board for shout circuits and it seem ok. I've also checked each of the pins on the connectors route to the corect pins on the 6522.
I've connected a cable to my 5 pin din connector and checked connectivity from the pin to the end of the wire.
Now to plug in the board and test it.
I've adjusted a basic program from the user guide for this

Code: Select all

10 X=256
20 ?&FEC2=&FF
30 A=TIME
40 REPEAT 
50 UNTIL TIME-A=100
60 IF X=256 THEN X=128 ELSE X=256
70 ?&FEC0=X
80 GOTO 30
This is where I show how little I actually know!
Is FEC0 going to be the correct address? I'm not sure how to find this out.
Am I right in thinking this will turn pb7 on for 1 second then off for 1 second?
I'd be able to adjust this for each pin by using the corresponding value for x (not worked them out yet!)?
How would I test this with a multimeter? Do I set the dial to 20 dc and connect the red terminal to the output wire and the black terminal to ground?
Thanks,
Simon

[edit] wrong address in text
Last edited by sydney on Wed Oct 02, 2013 10:19 am, edited 1 time in total.

User avatar
danielj
Posts: 6195
Joined: Thu Oct 02, 2008 4:51 pm
Location: Manchester
Contact:

Re: Master econet module connector

Post by danielj » Wed Oct 02, 2013 9:20 am

I would stick an led/resistor combo on the end of the line and see if it flashes? With a multimeter you'd expect it to go from 5V to 0V.

d.

Post Reply