Raspberry Pi as a storage device for a PET.
I have a few spare Pis around - I may try this and report back.
https://github.com/RhinoDevel/cbmtap....7.0/README.md I'd be interested in other people's views. Colin. |
Re: Raspberry Pi as a storage device for a PET.
Well it looks like it should work, if their software is OK - And certainly fairly cheap & low risk to try it.
It's mainly down to the software, as their interface should generally work OK - Although it appears they've tried to bodge the RPi GPIO Output to CBM Tape Read input a bit with an extra 10k series-resistor from +5V to PNP emitter on this 3.3V to 5V level conversion transistor stage. So I'd do this a bit different, as that doesn't look like it would always work. It doesn't appear that they've specified any transistor types, but it should work with an small signal ones like BC547 (NPN) & BC557 (PNP) etc. I'd also be inclined to build it a bit more permanently on a bit of matrix board / veroboard, as parts are all quite low-cost, rather than using prototyping breadboard. The RPi is a probably a bit overkill for this, and any Arduino using an ATMega328 uC- as used on the Tapuino Datasette Emulator - might have been easier, as most use 5V I/O levels. Although Tapuino is normally used with a small OLED display module + buttons for stand-alone use. But it all depends on having on Arduino around already - Although it seems you can buy a complete assembled Tapuino board relatively cheap, and it should work on the PET if the tape format is the same as the C64/VIC20 Whereas an RPi (even a small Pi-Zero) should be capable of emulating the Disk Drive, as there are Pi1541 interfaces for the C64/VIC20 (IEEE-Serial lines only) disk drive interface but not sure if one has been done yet for the full PET IEEE Parallel version. But should be able to do something similar to SD2PET - Which gets a mention in an article on the PET & Emulating it etc. in the latest (June'21) issue of Linux Format Magazine (also has a Jupiter Ace feature, so quite a retro issue), I received a couple of days ago. |
Re: Raspberry Pi as a storage device for a PET.
It's actually pretty ingenious! It looks as though the device sits on the tape port, you give it instructions by means of SAVE commands with special filenames, and it can also transfer files much faster than usual by not bothering to modulate its zeros and ones onto the customary audio-frequency carrier, and using a special driver on the Commodore machine which you can install just by LOADing a program straight from the emulated cassette.
I wasn't sure about the PNP transistor myself. I'd replace T1, T2 and T4 with something like an LM2903 dual comparator; signals from Raspberry Pi to each inverting input, both non-inverting inputs to +1.65V from 100K + 100K potential divider across 3V3 supply, 10K pull-up resistor on output going to pin 4 but not on pin 6. Want me to try doing a PCB with BCP on an emulated BBC? ;) |
Re: Raspberry Pi as a storage device for a PET.
PET data cassette doesn’t use an audio carrier.
A small interface board might be an interesting demo of BCP. |
Re: Raspberry Pi as a storage device for a PET.
Quote:
But if just got transistors to hand, then could just put a common-emitter inverter (e.g. T3 R8 & R7)) in feed from 19_bcm10 to R5 / R6 & bypass R4. However this would then mean that data wasn't inverted so would either have to mod the software or put another inverting stage in front - if data polarity is significant (It wouldn't be for normal audio tones use). Although, I reckon just removing T1 & R5 and connecting now free end of R4 to collector of T2 should actually work OK - just as done for the other direction - there shouldn't be too much load on PET, as straight to the VIA. And you could always use a read-made level converter board, for both directions https://shop.pimoroni.com/products/s...7¤cy=GBP - Plus maybe the Sense control as well, although non-inverting, so would need to mod software for nSENSE at least. |
Re: Raspberry Pi as a storage device for a PET.
Quote:
I had to use resistor dividers in the end, to ensure that the +5V out from the EPROM was translated to a safe voltage at the Pi's pins. I happen to remember that Colin does already have some of the little FET based level converters to hand. |
Re: Raspberry Pi as a storage device for a PET.
A board with any agreed changes (as above) would be awesome. PET Cassette port connectors seem easy to source too.
Colin. |
Re: Raspberry Pi as a storage device for a PET.
Reading through the project details it seems to me that the originator has done a lot of testing, or a lot of testing has been done for him by friendly PET owners on a number of different PETs - my angle would tend to be that if it isn't broken, don't fix it. Just try it the way it is.
The only thing I could wish for is, if you were going to connect something as complex and powerful as a Pi, it might as well be emulating the FDD (ie, functionally equivalent to the SD2PET) rather than the datasette as that would seem like a better way to use one. The Pi would then have to be interfaced to the IEEE 488 port, and that would present its own complications. It might be worth looking around to see if someone has already done it. |
Re: Raspberry Pi as a storage device for a PET.
I wonder if this might also work with PETs?
https://www.ebay.co.uk/itm/Commodore...p2047675.l2557 Colin. |
Re: Raspberry Pi as a storage device for a PET.
That appears to facilitate the process I suggested elsewhere, essentially a method of hardware connecting two datasettes back to back, taking power from the PET.
|
Re: Raspberry Pi as a storage device for a PET.
I've now created a design in BCP based on the circuit! Details here, including link to SSD image.
This is very beginning-y stuff, and I have not even tentatively positioned any components yet ..... But nothing caught fire, which is good news, I suppose ..... |
Re: Raspberry Pi as a storage device for a PET.
Quote:
So might just as well had a standard resistor-pullup common-emitter NPN Inverter / level-converter , as used on the 5V to 3.3V opposite-direction write-line Quote:
With the Arduino-ATMegea 328 based Tapuino the most common Datasette Solid-state replacement. Although it seems this RPi one has ways of increasing the data speeds, that might not be in the Tapuino as standard. A Solid-state Disc drive replacement would be more flexible, and should be able to do something like the Pi1541 for the PET (Which having the full IEEE Parallel interface rather than Commodore's bodged cut-down Serial-IEEE, should also be much faster as standard). But I hadn't noticed anyone doing one yet for the PET - Maybe as they aren't as common as the (World's best selling Home Computer - around 30 million sold) C64 etc. And maybe the SD2PET has now become the one everyone uses |
Re: Raspberry Pi as a storage device for a PET.
Quote:
Quote:
Yes, I see they also show / say it can be used with the Tapuino interface. So might be an easy way to transfer cassettes to digital 'tap' files. Although it seems some versions of the Tapuino do have an edge connector for connecting an original Datasette to - At least on the PCB-design that a friend of mine has done for this, that he's given me one I need to complete assembly of. So shouldn't need that 'clone' device for this version of the Tapuino at least (assuming that it does allow direct-transfer between it & the datasette). |
Re: Raspberry Pi as a storage device for a PET.
Quote:
I think the circuit as drawn is probably fine, now that I am not looking at it cross-eyed. Quote:
|
Re: Raspberry Pi as a storage device for a PET.
My concern with the circuitry around T1/T2 is more with T1 possibly not turning off fully when the Raspberry Pi is sending a logic 1; although I decided to trust the original design, at least for the first version I tried in BCP. I did take the slight liberty of adding a Zener diode across R2.
|
Re: Raspberry Pi as a storage device for a PET.
Quote:
- But using T1 PNP transistor, to form a complementary push-pull output stage, means you shouldn't need an RTL style Pull-up. So it should have either R4 OR T1. Having both seems rather pointless, as the output source-current is still limited by R4! Quote:
Quote:
But not sure if the Records-books have been updated, to the RPi yet. |
Re: Raspberry Pi as a storage device for a PET.
Quote:
If they'd used a P-Ch FET, with Vgs threshold > 5 - 3.3 = 1.7V, then that might have worked better and wouldn't get current flow from +5V rail. Vgs thresholds are rather variable, but drain current would be quite low at threshold and T2 would keep output at gnd. As long as Rds(on) is quite low at 5Vgs, then that would have worked OK. If the design is built as shown, then might be interesting to measure what voltage levels you get in practice. |
Re: Raspberry Pi as a storage device for a PET.
That was why I came up with a quick redesign using an LM2903. Although I'm still going with the discrete transistors for this first version.
|
Re: Raspberry Pi as a storage device for a PET.
A partial easy-fix on the shown circuit may be to put a 4k7 etc. resistor from T1 base to emitter (or +5V), to act as a divider with R5, meaning < 3.3V would be needed at the GPIO pin to turn-on T1.
Adding another 10k etc. from GPIO pin to ground would prevent > 3.3V being sourced through resistors to GPIO pin. (I'm wondering if they inserted R4 to prevent damage to T1 / T2, if they both got switch on together / T1 wasn't switching-off). |
Re: Raspberry Pi as a storage device for a PET.
Yes, I suppose if you think about it, there will be a brief moment, as the logic voltage transitions from 0V to 3V3 or vice-versa, when it is both low enough to turn the PNP transistor on and high enough to turn the NPN transistor on, so that resistor may be there to prevent 'shoot-through' during the transition period.
As to why the complementary pair instead of a single transistor and pullup resistor, maybe the aim was to have the output both turn on and turn off faster by having active drive high as well as active drive low. |
All times are GMT +1. The time now is 6:43 pm. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright ©2002 - 2023, Paul Stenning.