SPI interface for RC2014

961 views
Skip to first unread message

PianoMatt

unread,
Jan 20, 2017, 10:56:43 AM1/20/17
to RC2014-Z80
Hello everyone, first time poster.

I've been looking at adding an SPI bus to my RC2014 but I'm a bit stuck on how to approach it. I've thought of two possible solutions, but don't know enough yet to know which is the most viable.

Solution 1 - Parallel to Serial shift register

I've used SIPO shift registers as SPI devices before with an Arduino, so maybe I could do the same thing but in reverse?

Solution 2 - AVR acting as a software-definded prehipheral

This seems like a good bet since I could also add i2c and ADC inputs. I've seen that some people are using AVRs as boot loaders so I'd imagine that this would be an easy enough extension of that functionality.

Anyone got any ideas?


Daniel Quadros

unread,
Jan 20, 2017, 12:42:44 PM1/20/17
to RC2014-Z80
I would go with solution 2, unless a needed to support high speed transfer of big blocks of data. But take notice that I have a lot of experience with AVR devices. The easy way would be to make it communicate serially with the Z80 (maybe adding a second 6850). To connect directly into the bus I think you will need to use WAIT or BUSREQ to hold the Z80 while the AVR process the request.

DQ

Michael Gray

unread,
Jan 20, 2017, 1:05:41 PM1/20/17
to rc201...@googlegroups.com
A few months back, I did a quick look for I2C and SPI controllers that the Z80 could talk to--either to use directly, or as 'inspiration' for a modern-ish controller that I could implement in programmable logic. I found a few I2C devices that looked good (eg. http://www.nxp.com/products/interfaces/ic-bus-portfolio/ic-bus-controller-and-bridge-ics:MC_43047 ), but nothing really for SPI. Does anyone know if a good, standalone SPI controller? Something with queuing, big buffers, and some degree of autonomous transactions would be fun to play with.


Sure SPI is simple, but something like those I2C controllers could go a long way in bridging the RC2014 with modern peripherals. I mean, if you could saturate the Z80's bus (maybe even with DMA), you'd have one powerful interactive controller! I'd take one over an Arduino for prototyping any day that way :-). Basic, FORTH, or what have you could be lots of fun with modern peripherals and a big data pump.

Maybe this means I need to get off my rear end and build some sort of RC2014 "Super I/O" board. 

Michael

--
You received this message because you are subscribed to the Google Groups "RC2014-Z80" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rc2014-z80+unsubscribe@googlegroups.com.
To post to this group, send email to rc201...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/rc2014-z80/8a152bdb-37fc-4fff-9128-60b50f6f85bb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

PianoMatt

unread,
Jan 21, 2017, 5:42:13 AM1/21/17
to RC2014-Z80
I was looking at building Scott Baker's SIO and CTC boards anyway, so to keep things simple I suppose I could use the second UART on that for simple transfers. It's not going to be ideal for interfacing with an SD card but it will do for the ADC chips I was looking at using. I havethe SD bootloader board but I've not built it yet. I'm thinking that it would be a good starting point for understanding how to interface with the bus?

phillip.stevens

unread,
Jan 21, 2017, 6:43:21 AM1/21/17
to RC2014-Z80

I've been looking at adding an SPI bus to my RC2014 but I'm a bit stuck on how to approach it. I've thought of two possible solutions, but don't know enough yet to know which is the most viable.

Solution 1 - Parallel to Serial shift register

Solution 2 - AVR acting as a software-definded prehipheral

Anyone got any ideas?

Solution 3 - CH376

Earlier last year I spent a good deal of time researching options for adding SPI to my Z180 build. The best alternative I found was the CH376S device. The web site is in Chinese, but there are English versions of the datasheet. This device, the CH376S incorporates the the USB functions as described in CH375, and CH372, as well as an SPI Host interface, and USB functionality. Pretty much the "Full Monty" of outcomes. Still, I decided not to build it in, because I wasn't sure about availability, nor about whether I could write appropriate drivers. If you want pure a SPI interface (pure meaning without introducing another CPU augment the Z80), then this looks to me like the best option.

However, the I2C path is also quite interesting. I think that well implemented I2C bus devices, such as the PCA9665 in DIP, would be a good place to start for modern interfacing on the RC2014. With an I2C interface, it would be possible to link in the entire world of Grove sensors from Seeed Studio, as well as implement a SPI interface via I2C if that was actually the goal. In the end, that was the path I decided to take, implementing two I2C interfaces on my board, to enable me to split high speed 400kHz I/0 (eg video) from standard speed 100kHz (eg sensor) data.

Phillip

Spencer Owen

unread,
Jan 21, 2017, 1:39:39 PM1/21/17
to rc201...@googlegroups.com
I took a look at the CH376 a few months ago. It certainly looks like an interesting (and simple) little device.

Spencer 

--
You received this message because you are subscribed to the Google Groups "RC2014-Z80" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rc2014-z80+unsubscribe@googlegroups.com.
To post to this group, send email to rc201...@googlegroups.com.

Scott Lawrence

unread,
Jan 21, 2017, 1:43:34 PM1/21/17
to rc201...@googlegroups.com
Not sure it fully applies to this conversation, but I recently found out about the FTDI VDIP1.

It is essentially a USB host controller with I2C/SPI/RS232(ttl) on the other side. So you can configure it as a USB Drive host, wire it in to your project, and then using serial commands, you can access files on your fat-32 formatted USB thumb drive plugged into the USB port.

Anyway, I didn't know this thing existed, and i'm not sure it piques anyone's interest here, but this seemed like a good place to throw it out there. :D

Fwiw, I found it on Ferix's Parallel-port based USB host controller for Amigas.  I need to get the parts and build this thing... https://www.youtube.com/watch?v=H68W8akilFM (links to schematics, amigados drivers (1.3) from that thread.) For about $40 in parts, you have a parallel port module that you can plug into any amiga and mount the USB drive onto it.  Super useful.

-s

--
You received this message because you are subscribed to the Google Groups "RC2014-Z80" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rc2014-z80+unsubscribe@googlegroups.com.
To post to this group, send email to rc201...@googlegroups.com.



--
Scott Lawrence
yor...@gmail.com

Jan S

unread,
Jan 21, 2017, 4:58:01 PM1/21/17
to RC2014-Z80
Not sure either, but FTDI VDIP1 (and 2) are interesting devices.
Here's a little more information (also about other modules that may or may not be of interest).
http://www.ftdichip.com/Products/Modules/DevelopmentModules.htm#V-Eval
/Jan
Reply all
Reply to author
Forward
0 new messages