New Raspberry Pi to 1MHz bus interface

discuss both original and modern hardware for the bbc micro/electron
Stewie66
Posts: 24
Joined: Sun Jan 16, 2011 2:44 am
Location: Sydney
Contact:

Re: New Raspberry Pi to 1MHz bus interface

Post by Stewie66 » Sun Jan 12, 2020 9:42 am

Also interested in one as well

Cheers
Stewie

User avatar
KenLowe
Posts: 1310
Joined: Mon Oct 18, 2004 5:35 pm
Location: UK
Contact:

Re: New Raspberry Pi to 1MHz bus interface

Post by KenLowe » Sun Jan 12, 2020 8:10 pm

One irritation about the 1MHz port is the lack of a 5v feed, so for my 1MHz level shifter board I'm going to have to 'borrow' power from another location. For my BeebSCSI boards, I tend to borrow the supply from the user port, so I'll probably use that for my own level shifter boards. However, that becomes a bit more difficult when the user port is in use for other purposes (like MMFS). Another location is the tube port, but again this is more difficult if using a PITubeDirect. The right answer is probably to use the auxiliary connector on the PSU for this, but that can also often be used for other purposes.

This got me thinking. I might build a similar level shifter for the tube port, and provide power pass through connector, so the tube 5v feed can power both the Tube RPi and the 1MHz RPi. I've seen a table that indicates a RPi Zero consumes about 160mA, so what's the thoughts about pulling about 320mA from the 5 x 5v pins on the tube port to feed the 2 x level shifters and associated RPis?
Last edited by KenLowe on Sun Jan 12, 2020 8:13 pm, edited 1 time in total.

CJS
Posts: 23
Joined: Mon Oct 14, 2019 11:27 pm
Location: Bath, UK
Contact:

Re: New Raspberry Pi to 1MHz bus interface

Post by CJS » Sun Jan 12, 2020 8:12 pm

I'm interested in one of these too.

Thanks

CJS

awilliams
Posts: 36
Joined: Sun Feb 22, 2015 10:51 am
Location: Adelaide, Australia
Contact:

Re: New Raspberry Pi to 1MHz bus interface

Post by awilliams » Mon Jan 13, 2020 6:33 am

I am interested in one of these too.
Alan

cmorley
Posts: 1292
Joined: Sat Jul 30, 2016 8:11 pm
Location: Oxford
Contact:

Re: New Raspberry Pi to 1MHz bus interface

Post by cmorley » Mon Jan 13, 2020 8:35 am

KenLowe wrote:
Sun Jan 12, 2020 8:10 pm
I've seen a table that indicates a RPi Zero consumes about 160mA, so what's the thoughts about pulling about 320mA from the 5 x 5v pins on the tube port to feed the 2 x level shifters and associated RPis?
160mA sounds like the idle current, the internet suggests... more like ~240mA under load.

The pins won't be a problem, they are probably 1 or 2A rated each hardly worth checking... the problem is the traces to the connector. It is fed from the ROMs area and that gets its power from the RAM spades (longest wires). Pulling an extra potentially 0.5A doesn't sound great for the voltage stability at the RAM and ROMs - only tests will determine that for sure.

The Tube power is really there to power the Host side of the Tube ULA when the host is on. I suspect Acorn only imagined 100-200mA max... the traces aren't thick. I don't know about the Master - I don't have a spare motherboard to hand to look at.

I am sure the reason why there is no 5v on the 1MHz bus connector because it is a bus the you could connect amps worth of things up!

dp11
Posts: 1195
Joined: Sun Aug 12, 2012 9:47 pm
Contact:

Re: New Raspberry Pi to 1MHz bus interface

Post by dp11 » Mon Jan 13, 2020 10:05 am

I haven't tested the current consumption of the PiZero, but I would expect it to be quite low. HDMI output is disabled. The screen therefore isn't moving large amounts of video data out of RAM. Most of the code sits in cache.

markrwj
Posts: 20
Joined: Fri Aug 26, 2016 2:18 pm
Contact:

Re: New Raspberry Pi to 1MHz bus interface

Post by markrwj » Tue Jan 14, 2020 1:50 pm

Can you put me down for 1 of these boards please!

Thanks

Mark

rharper
Posts: 478
Joined: Sat Sep 01, 2012 6:19 pm
Location: Dunstable
Contact:

Re: New Raspberry Pi to 1MHz bus interface

Post by rharper » Wed Jan 15, 2020 5:33 pm

I'm interested in one as well.
Ray
Raycomp

User avatar
BCCweirdo
Posts: 79
Joined: Sat Feb 14, 2015 9:01 pm
Contact:

Re: New Raspberry Pi to 1MHz bus interface

Post by BCCweirdo » Thu Jan 16, 2020 9:33 pm

Hi!

Count me in for a board please :)

User avatar
KenLowe
Posts: 1310
Joined: Mon Oct 18, 2004 5:35 pm
Location: UK
Contact:

Re: New Raspberry Pi to 1MHz bus interface

Post by KenLowe » Thu Jan 16, 2020 9:48 pm

Sorry for the lack of update recently. Been a bit busy with work. I'm currently building a prototype so I can verify the design. I'll hopefully have that finished later tomorrow, and assuming it works as expected, I'll place an order for an initial 30 boards. This is the maximum I can order if I want the boards supplied with SMD components already soldered on. Cost for a fully assembled and tested board, including UK P&P, will be approximately £10. I will be in touch with everyone who has expressed an interest in due course.

Rod C
Posts: 209
Joined: Wed Jul 04, 2018 3:26 pm
Location: Australia
Contact:

Re: New Raspberry Pi to 1MHz bus interface

Post by Rod C » Thu Jan 16, 2020 10:23 pm

Hi Ken
I'd like to go on the list for a board if that's OK.
Thanks, Rod

Alan00
Posts: 4
Joined: Sat Feb 16, 2019 9:08 am
Contact:

Re: New Raspberry Pi to 1MHz bus interface

Post by Alan00 » Fri Jan 17, 2020 9:50 am

Hi,
I am interested in 2 interfaces

User avatar
KenLowe
Posts: 1310
Joined: Mon Oct 18, 2004 5:35 pm
Location: UK
Contact:

Re: New Raspberry Pi to 1MHz bus interface

Post by KenLowe » Fri Jan 17, 2020 11:24 pm

Success!

Well, partially at least.

I have a SCSI drive running...
20200117_231152.jpg
20200117_231212.jpg
I had to disconnect the nIRQ and nNMI lines to get it working, though. I still need to find out why. Fortunately, having these lines disconnected doesn't seem to impact the operation of the SCSI drive.

Off topic query: Has anyone else had problems with turned pin sockets? You might see from the photo that I've got the 245 ICs installed in turned pin sockets that are then plugged into other turned pin sockets that are soldered to the board. The sockets that are soldered into the board have slightly wider holes for the IC pins to slot into, and I don't get a good connection. Noticed this with my development IntegraB board as well.

dp11
Posts: 1195
Joined: Sun Aug 12, 2012 9:47 pm
Contact:

Re: New Raspberry Pi to 1MHz bus interface

Post by dp11 » Sat Jan 18, 2020 12:08 am

Good work I assume the diodes for nmi and irq are on the bottom and are the correct way round?

User avatar
KenLowe
Posts: 1310
Joined: Mon Oct 18, 2004 5:35 pm
Location: UK
Contact:

Re: New Raspberry Pi to 1MHz bus interface

Post by KenLowe » Sat Jan 18, 2020 12:18 am

They were hiding in the last photo. Here's a close up:
20200118_001235.jpg
and this is the circuit:
1MHz IC1.PNG
Edit: Even with the nIRQ and nNMI lines disconnected, it's a little bit flaky. I suspect this is either down to me having a relatively long ribbon cable and not having termination on the bus, or possibly because I don't have any series resistors on the data lines. I'll mess around with it a bit more in the morning.

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

Re: New Raspberry Pi to 1MHz bus interface

Post by 1024MAK » Sat Jan 18, 2020 8:39 am

I’ve never had a problem with new turned pin sockets. But then again, I’ve also never had a problem with new stamped pin dual wipe sockets either. I currently buy all my turned pin sockets and all my stamped pin dual wipe sockets from Rapid Electronics.

I hate the old stamped pin single wipe sockets that you find in 1980s era products, as these definitely cause problems due to poor connections.

To sort out the problem with the interrupt signals, you may need to hook up a ‘scope to see what’s going on.
With all the parallel cables, it may be that an active circuit is inducing voltage in an otherwise un-active circuit, which is then see by the logic chip as a momentary signal...

Mark

User avatar
KenLowe
Posts: 1310
Joined: Mon Oct 18, 2004 5:35 pm
Location: UK
Contact:

Re: New Raspberry Pi to 1MHz bus interface

Post by KenLowe » Sat Jan 18, 2020 9:09 am

I'll dig out my scope later this morning to see what's happening on the interrupt lines. I think I'll also add in the series resistors on the data lines to see if that makes it a bit more reliable. I left room on the board for this.

User avatar
KenLowe
Posts: 1310
Joined: Mon Oct 18, 2004 5:35 pm
Location: UK
Contact:

Re: New Raspberry Pi to 1MHz bus interface

Post by KenLowe » Sat Jan 18, 2020 11:22 am

I think I've sorted the unreliable operation. It looks like I might have had a slight bridge connection between the 1MHz & RnW lines. I've cleaned that up, and it's been reliable ever since (but still with the nIRQ and nNMI lines disconnected).

I've also had the scope and multimeter on the nIRQ and nNMI lines from the RPi, and I'm a bit confused. Both lines seem to be permanently sitting at about 0v. Disconnecting the nIRQ line from the level shifter board completely and measuring GPIO12 (pin 32) on the RPi directly, I'm measuring about 250mV when idle, and this drops by approx. half to about 120mV when Break is pressed. Any idea why this might be the case? I had a quick look at the code to see if I could work out what was happening, but I wasn't entirely sure. Are these outputs driven high on demand, as opposed to being driven low, and do I therefore need to invert?

dp11
Posts: 1195
Joined: Sun Aug 12, 2012 9:47 pm
Contact:

Re: New Raspberry Pi to 1MHz bus interface

Post by dp11 » Sat Jan 18, 2020 11:57 am

The nmi and irq will be open collector outputs and so you will need a pullup resistor to see them go high.

User avatar
KenLowe
Posts: 1310
Joined: Mon Oct 18, 2004 5:35 pm
Location: UK
Contact:

Re: New Raspberry Pi to 1MHz bus interface

Post by KenLowe » Sat Jan 18, 2020 12:08 pm

dp11 wrote:
Sat Jan 18, 2020 11:57 am
The nmi and irq will be open collector outputs and so you will need a pullup resistor to see them go high.
Ah. So they are open collector. I did suspect that, but I couldn't find any information to confirm it. I obviously didn't look hard enough. The nmi and irq lines already have 3k3 pull up on the beeb side, so I'll just wire the signals straight through to the RPi and bypass the level shifter and diodes altogether.
Last edited by KenLowe on Sat Jan 18, 2020 12:18 pm, edited 2 times in total.

User avatar
hoglet
Posts: 9372
Joined: Sat Oct 13, 2012 7:21 pm
Location: Bristol
Contact:

Re: New Raspberry Pi to 1MHz bus interface

Post by hoglet » Sat Jan 18, 2020 12:14 pm

KenLowe wrote:
Sat Jan 18, 2020 12:08 pm
=Ah. So they are open collector. I did suspect that, but I couldn't find any information to confirm it. I obviously didn't look hard enough. The nmi and irq lines already have 3k3 pull up on the beeb side, so I'll just wire the signals straight through to the RPi and bypass the level shifter and diodes altogether.
The Beeb side 3K3 pullups will be to 5V and as the Pi is not 5V tolerant, direct connection is not advisable.

I would suggest retaining the diodes.

BTW, The code that handles IRQ and NMI is here:
https://github.com/dp111/Pi1MHz/blob/ma ... MHz.c#L151

You can see it switching the pin function between input and output (= fixed 0), which to all intents and purposes looks like an open collector output.

Dave

User avatar
KenLowe
Posts: 1310
Joined: Mon Oct 18, 2004 5:35 pm
Location: UK
Contact:

Re: New Raspberry Pi to 1MHz bus interface

Post by KenLowe » Sat Jan 18, 2020 12:22 pm

I had assumed it wouldn't really matter about the 5v feed (via pull up on the beeb) if the output was open collector. However, it's not an issue to add resistors to the RPi side of the level shifter and still use the level shifter, and that's what I've now done. All now working as expected!

I've also updated the circuit design to include these pull up resistors. Here's the latest render:
1MHz Interface 11.PNG

User avatar
KenLowe
Posts: 1310
Joined: Mon Oct 18, 2004 5:35 pm
Location: UK
Contact:

Re: New Raspberry Pi to 1MHz bus interface

Post by KenLowe » Sat Jan 18, 2020 2:59 pm

Now that I've got the level shifter working, and have been able to emulate a SCSI drive, I would like to test the Music 3000 / 5000 system. However, I haven't a clue where to start! Could someone please give me some pointers.

Thanks.

Edit: As a side note...
dp11 wrote:
Mon Jan 13, 2020 10:05 am
I haven't tested the current consumption of the PiZero, but I would expect it to be quite low. HDMI output is disabled. The screen therefore isn't moving large amounts of video data out of RAM. Most of the code sits in cache.
I've just measured the current being pulled, and it maxes out at just over 200mA.

dp11
Posts: 1195
Joined: Sun Aug 12, 2012 9:47 pm
Contact:

Re: New Raspberry Pi to 1MHz bus interface

Post by dp11 » Sat Jan 18, 2020 7:30 pm

Lots of music 5000 links in this thread

viewtopic.php?f=2&t=15780&hilit=Music+5000

User avatar
KenLowe
Posts: 1310
Joined: Mon Oct 18, 2004 5:35 pm
Location: UK
Contact:

Re: New Raspberry Pi to 1MHz bus interface

Post by KenLowe » Sat Jan 18, 2020 9:20 pm

Thanks for the links. I think I'm starting to get somewhere now! No sound yet, but that's probably because I'm not passing the RPi audio back to the beeb yet...

Remklep
Posts: 97
Joined: Wed Dec 04, 2019 9:46 am
Contact:

Re: New Raspberry Pi to 1MHz bus interface

Post by Remklep » Mon Jan 20, 2020 8:43 pm

If you have room left on the "I want one too please" list, I'd like one too.

Nicely done!

Danny
BBC Model B+ 64K, 128K Memory Mod, RetroClinic External PiDirect with Raspberry Pi 3B.
BBC Master 128, RetroClinic Internal PiDirect with Raspberry Zero, TurboSPI MMC, RobC's VideoNuLa, Gotek Floppy Emulator.

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

Re: New Raspberry Pi to 1MHz bus interface

Post by 1024MAK » Mon Jan 20, 2020 9:32 pm

Looks like great progress Ken :D =D>

Hence I am definitely interested in at least one, probably two :mrgreen:

Mark

User avatar
KenLowe
Posts: 1310
Joined: Mon Oct 18, 2004 5:35 pm
Location: UK
Contact:

Re: New Raspberry Pi to 1MHz bus interface

Post by KenLowe » Tue Jan 21, 2020 12:39 am

I'm waiting for some sample boards to arrive. Once these are tested, I'll place a larger order with enough to cover all noted interest.

I've also just finished designing a Tube Level Shifter. I know there are plenty of these on the market already, but this one has a power pass through that will hopefully be able to power the 1MHz adaptor:
Tube Interface 1.PNG
Note the orientation of the +5V and GND power connectors on the two boards will require the use of a 2 core cable with a twist. Should I swap the +5V and GND pins on one of the boards to avoid the need for a cable with a twist???

Also, when the two boards are installed, the two power connectors will be very close together, which might make it difficult to connect a cable. should I consider pushing the power connector for the Tube level shifter further back onto the board?

Edit: Here's what it would look like with the +5v & GND power connectors swapped, and both the power and data connectors pushed further back:
Tube Interface 3.PNG
Thoughts & opinions, please.

User avatar
BigEd
Posts: 3333
Joined: Sun Jan 24, 2010 10:24 am
Location: West
Contact:

Re: New Raspberry Pi to 1MHz bus interface

Post by BigEd » Tue Jan 21, 2020 8:22 am

I think you're right on both counts: avoid a twist, and provide some clearance (if you can - and it seems you can!)

User avatar
KenLowe
Posts: 1310
Joined: Mon Oct 18, 2004 5:35 pm
Location: UK
Contact:

Re: New Raspberry Pi to 1MHz bus interface

Post by KenLowe » Tue Jan 21, 2020 10:37 pm

Duh! Looking at the layouts a bit further, I realise that the Tube and 1MHz power connectors will not be facing each other, they'll actually be facing away from each other, so that should work better.

Just waiting for my 1MHz sample boards to arrive, before I go and place an order. They'll hopefully arrive sometime next week. Unfortunately I ordered the sample boards before I realised I needed pull up on the nIRQ and nNMI outputs from the RPi, so I'm going to have to patch in a couple of pull up resistors on these sample boards to get them working correctly.

Post Reply

Return to “8-bit acorn hardware”