CPCWiki forum

General Category => Amstrad CPC hardware => Topic started by: pmdunne on 22:26, 24 June 17

Title: cassette isn't it almost a spi
Post by: pmdunne on 22:26, 24 June 17
I was looking at the cassette interface on the cpc 464
writing port c bit 5
reading port b bit 7
motor on bit what ever


this is almost a spi interface, minus the clock.
has any one got any idea if it feasable
Title: Re: cassette isn't it almost a spi
Post by: arnoldemu on 08:56, 25 June 17
Quote from: pmdunne on 22:26, 24 June 17
I was looking at the cassette interface on the cpc 464
writing port c bit 5
reading port b bit 7
motor on bit what ever


this is almost a spi interface, minus the clock.
has any one got any idea if it feasable
If you are taking these pins and connecting them to the outside world then possibly. These then become general purpose 5v input/output and you could use them to connect spi or something else I guess.

The normal cassette (excluding using cd, tzxduino etc) is not close to an spi interface. The tape belt means the rate can vary potentially and depending on the loader it will either work or not (system loader reduced in speed should load if the reduction is constant because it times the pilot tone before reading).

The CPC loads by monitoring the signal from the cassette and times the duration of the waves to determine if it's a 1 or 0 (based on the definitions in the loader itself), so the clock is effectively drifting I think.

I don't think you could use stereo either and have a clock on one channel and sound on the other, not via cassette, but possibly via expansion or joystick.



Title: Re: cassette isn't it almost a spi
Post by: pmdunne on 10:41, 25 June 17
I was thinking more on the motor on  as CS
and the port b bit 7 as miso
port c bit 5 as mosi
then use the system clock a clk


then all you need to do is write some new command to access the the port!
Title: Re: cassette isn't it almost a spi
Post by: arnoldemu on 14:41, 25 June 17
Quote from: pmdunne on 10:41, 25 June 17
I was thinking more on the motor on  as CS
and the port b bit 7 as miso
port c bit 5 as mosi
then use the system clock a clk


then all you need to do is write some new command to access the the port!
yeah It's doable.

Title: Re: cassette isn't it almost a spi
Post by: pmdunne on 19:07, 25 June 17
Great don't get my cpc 464 til monday or tuesday, but I think I give this one a try, if any one can give some pointers I,d much appearate the feedback, now I've got alot of reading to do I new to cpc 464!
At present I laying out a rom expainsion board on vero board so I can load a maxam rom , but will keep my eyes peeled on this forum for pointer.


thank you
Title: Re: cassette isn't it almost a spi
Post by: pmdunne on 22:03, 26 June 17
I have a question ? about the at28c256 eeprom....
is it a safe chip to use and can I access both 16k slots by switching A14 with A13 and vice versa when the computer is off also is there any thing i need to be aware of.. like over writing the rom in normal read only mode..?
Title: Re: cassette isn't it almost a spi
Post by: Bryce on 08:11, 27 June 17
To switch banks you don't swap A13 with A14, you just need to switch A14 high or low to swap.

Bryce.
Title: Re: cassette isn't it almost a spi
Post by: pmdunne on 09:56, 27 June 17
sorry about that I got my information wrong, I was reading an aticle on the rom box which as A14 tired high and so couldn't address more then 16k rom and took this to be a feature of cpc  :doh: 
Title: Re: cassette isn't it almost a spi
Post by: Bryce on 10:43, 27 June 17
Going back to your original question: "cassette isn't it almost a spi", the answer is a definite no. It's nothing like an SPI signal other than the fact that both are serial.

Handshaking: SPI: Yes, Cassette: No.
Dedicated lines for input and output: SPI: Yes, Cassette: No.
Commands sent from Master to slave: SPI: Yes, Cassette: No.
Daisy-chaining: SPI: Yes, Cassette: No.
Variable clock defined by Master: SPI: Yes, Cassette: No.
Checksums: SPI: Yes, Cassette: No.

Bryce.
Title: Re: cassette isn't it almost a spi
Post by: freemac on 12:48, 27 June 17
With SPI you need one common clock, whatever one. Just show the pull-up default (sleeping at 5V) value, perhaps you need just to inverse signal : pull-down (sleeping at 0V). It's to say that when you unplug, you can read 0V or else 5V in each wire.


With motor off, perhaps you can hack this (transmit SPI during motor off), as it the driver (ROM Amstrad) doesn't care this signals ?


Problems around analog signals (where to plug wires before DAC (Digital Analog Converter) ? directly on the PPI ? perhaps the extension port is simplier to play with ?)
Title: Re: cassette isn't it almost a spi
Post by: pmdunne on 13:44, 28 June 17
question ? if you do away with the motor on transistor from the 8255 ' its just another signal ie high or low chip cs ok easy..
next handshaking software issue easy
dedicated lines you have two look at the schematic
daisy-chainning use another cs from the 8255 the rest is doable in software.
checksums software issue
variable clock use a 4 bit counter is that enough variabity
Title: Re: cassette isn't it almost a spi
Post by: Bryce on 14:23, 28 June 17
So your question wasn't "cassette isn't it almost a spi", rather "would it be possible to make an SPI-like interface using the same ports that the cassette uses?". That's a completely different question.

Bryce.
Title: Re: cassette isn't it almost a spi
Post by: pelrun on 15:56, 28 June 17
And you're far better off using the printer port if you want to bitbang SPI anyway.
Title: Re: cassette isn't it almost a spi
Post by: pmdunne on 21:14, 29 June 17
the reason for this was to build a sd card interenly with out the cost's involve in edge connects...etc with the minimum of logic I own a 464, yeah I'm cheap and need to exercise my grey matter so it seem like a solution to have quick load and saves and gives me something to do!
Powered by SMFPacks Menu Editor Mod