Help! adapting a SCN2661in Grant Searle z80 design - Page 1
Forum section: electronics / general

author: ali6x944
author_rank: Frequent Contributor
timestamp: October 02, 2016, 05:08:16 pm
content: Help! adapting a SCN2661in Grant Searle z80 designHello everyone,I was doing a z80 computer by Grant Searle :http://searle.hostei.com/grant/z80/SimpleZ80.htmlEverything is ok but the 68B50 ACIA that I don't have which is to what I understand a uart, instead I have a rather beefed up uart which is EPCI...See thread:https://www.eevblog.com/forum/beginners/what-are-enhanced-programmable-communications-interface-(epci)/msg859385/#msg859385And it is SCN2661, so is it adaptable or not, and if it was adaptable how?Help please...

author: ali6x944
author_rank: Frequent Contributor
timestamp: October 03, 2016, 02:51:28 am
content: Anyone?

author: ebclr
author_rank: Super Contributor
timestamp: October 03, 2016, 05:14:49 am
content: Why not this onehttp://searle.hostei.com/grant/Multicomp/index.html

author: obiwanjacobi
author_rank: Super Contributor
timestamp: October 03, 2016, 07:08:12 am
content: Did you read the datasheet?http://pdf.datasheetcatalog.com/datasheet/philips/SCN2661CA1F28.pdfGet an idea of how the chip works, then map that on how the Z80 works and how you would program the chip...

author: ali6x944
author_rank: Frequent Contributor
timestamp: October 03, 2016, 02:22:01 pm
content: Quote from: obiwanjacobi on October 03, 2016, 07:08:12 amWell, I was trying to match the functions of pins between the datasheets to do this, but due to the massive functionality thus the enhanced programmable part in EPCI, this is what is complicating the matter...So if anyone know how to deal with or had worked with SCN2661

author: obiwanjacobi
author_rank: Super Contributor
timestamp: October 03, 2016, 04:38:19 pm
content: If you look at the block diagram in the datasheet you'll need to hook up the data bus and the operational control signals to the Z80 in order to program the chip. Start with that. How would you drive the operational control lines?I think you can ignore the baud-rate generator signals and the modem control signals for now. You have to program the chip to use the internal clock/baud generator. The Tx and Rx pins you can connect to one of those cheap USB-Serial modules you'll find on ebay for a couple of bucks.

author: ali6x944
author_rank: Frequent Contributor
timestamp: October 04, 2016, 06:39:29 pm
content: Quote from: obiwanjacobi on October 03, 2016, 04:38:19 pmData lines are connected, but I'm quit confused about the other pins excluding reset and R/W, so is CS0,CS1,CS2 is the pins A0,A1,CE on the EPCI?Quote from: obiwanjacobi on October 03, 2016, 04:38:19 pmI did it is a silicon labs CP2102....What to do next...

author: stj
author_rank: Super Contributor
timestamp: October 04, 2016, 07:59:31 pm
content: i dont understand why the original design even used a 6800 family chip when there is a z80 sio chip.

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: October 05, 2016, 12:39:58 am
content: Quote from: ali6x944 on October 04, 2016, 06:39:29 pmA0 and A1 (register address lines) go to Z80 address lines A0 and A1. /CE (Chip Enable) is normally mapped to an I/O address range via a decoder, but can be connected directly to /IORQ if you don't have any other I/0 devices.

author: obiwanjacobi
author_rank: Super Contributor
timestamp: October 05, 2016, 12:28:57 pm
content: Quote from: Bruce Abbott on October 05, 2016, 12:39:58 amBe careful with connecting directly to /IORQ because this signal is also used (together with /M1) in an interrupt acknowledge cycle IIR. If you don't use interrupts, then there is no problem. Make sure the /NMI and /INT lines are pulled high.That leaves /R-W. Can you think of any Z80 signal you can connect this to? Or do you think you need some gates to construct the correct signal?

author: ali6x944
author_rank: Frequent Contributor
timestamp: October 05, 2016, 02:56:45 pm
content: Quote from: obiwanjacobi on October 05, 2016, 12:28:57 pm

author: ali6x944
author_rank: Frequent Contributor
timestamp: October 05, 2016, 03:05:49 pm
content: https://drive.google.com/file/d/0B5vW-k7HbsL4blFIeVZtSFlsM1E/view?usp=drivesdkCP2102

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: October 05, 2016, 06:13:33 pm
content: Quote from: ali6x944 on October 05, 2016, 02:56:45 pmFile is password protected. Please remove the password so we can view it!

author: ali6x944
author_rank: Frequent Contributor
timestamp: October 06, 2016, 03:04:06 am
content: Sorry I didn't notic the link is private, sorry again hope this opens:https://drive.google.com/file/d/0B5vW-k7HbsL4Q0pVNTRqSlBHRVU/view?usp=drivesdk

author: obiwanjacobi
author_rank: Super Contributor
timestamp: October 06, 2016, 05:33:43 am
content: Yep, that'll work just fine - if you have the drivers installed on your PC.Remember: tx=>rx and rx=>tx

author: ali6x944
author_rank: Frequent Contributor
timestamp: October 07, 2016, 08:32:16 am
content: Quote from: obiwanjacobi on October 06, 2016, 05:33:43 amDo u mean the bridge drivers?

author: ali6x944
author_rank: Frequent Contributor
timestamp: October 07, 2016, 09:17:13 am
content: What program should I use to interface with the z80 computer then?

author: obiwanjacobi
author_rank: Super Contributor
timestamp: October 07, 2016, 10:34:49 am
content: Any terminal programwill do. Putty is such a program.

author: ali6x944
author_rank: Frequent Contributor
timestamp: October 08, 2016, 03:30:56 pm
content: Will it work with out a spicified boud rate and with out configuring the other stuff?

author: Rasz
author_rank: Super Contributor
timestamp: October 08, 2016, 05:22:13 pm
content: 1980 wasnt exactly the year of plug and play, have you made sure 2661 has 68B50 compatible programming interface in the first place? just soldering corresponding pins wont do anything if the program in your Z80 computer cant setup and operate new uart.

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: October 08, 2016, 08:27:26 pm
content: Quote from: ali6x944 on October 08, 2016, 03:30:56 pmNo.Questions like this make veterans like me realize how much knowledge we have absorbed over the years, to the point where the answer seems 'obvious'. But there was a time when I too had no clue. You have a lot to learn.https://learn.sparkfun.com/tutorials/serial-communication

author: ali6x944
author_rank: Frequent Contributor
timestamp: October 09, 2016, 12:30:18 pm
content: Quote from: Bruce Abbott on October 08, 2016, 08:27:26 pmHow to set those like the division factor because I saw it in the datasheet but I don't really know how to set them up ...

author: ali6x944
author_rank: Frequent Contributor
timestamp: October 09, 2016, 12:35:50 pm
content: See page 5-6 in the datasheet

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: October 10, 2016, 01:29:09 am
content: Baud rate selection is done via mode register bits MR23 to MR20. ie. mode register 2, bits 3 to 0. These 4 bits allow you to choose 1 of 16 possible baud rates, as shown in table 1.Both mode registers are accessed at the same address. To write to mode register 2 you have to write to mode register 1 first. This advances an internal counter so the next write goes to mode register 2, then the counter resets back to mode register 1. The counter is also reset by reading the command register. So if you only write to mode register 1 and then want to write to it again, read the command register first (else the next mode register write goes to mode register 2). And if you only want to write to mode register 2? You can't! Might be best to always read the command register first, then write both mode registers one after the other - that way the sequence can't get screwed up.You might wonder why do it this way when they could have just had a different address for each register. But that would require an extra address line, and all the other pins are in use so the chip would need to be put in a bigger package with more pins.

author: ali6x944
author_rank: Frequent Contributor
timestamp: November 10, 2016, 03:35:06 am
content: Thanks alot

author: ali6x944
author_rank: Frequent Contributor
timestamp: November 10, 2016, 04:05:03 am
content: So do I have to falsh the rom to operate the EPCI?As the cpu have to adress them, I mean the programming pins /CE,A1,A0,/R,W

author: ali6x944
author_rank: Frequent Contributor
timestamp: January 23, 2017, 07:52:55 am
content: I will try to right on the rom, until now I don't know what to fill the rom I will search in the datasheet about any info that might be helpful...

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: January 29, 2017, 09:53:23 pm
content: Quote from: ali6x944 on January 23, 2017, 07:52:55 amTo use the EPCI with Grant Searle's ROM You will have to modify the source code in 'intmini.asm'. If you don't get it exactly right then it almost certainly won't work, so when you have built the circuit and written some code post it here for us to review.