Author Topic: Help! adapting a SCN2661in Grant Searle z80 design  (Read 8519 times)

0 Members and 1 Guest are viewing this topic.

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Help! adapting a SCN2661in Grant Searle z80 design
« on: October 02, 2016, 05:08:16 pm »
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.html
Everything 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/#msg859385
And it is SCN2661, so is it adaptable or not, and if it was adaptable how?
Help please...
 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Re: Help! adapting a SCN2661in Grant Searle z80 design
« Reply #1 on: October 03, 2016, 02:51:28 am »
Anyone?
 

Offline ebclr

  • Super Contributor
  • ***
  • Posts: 2328
  • Country: 00
 
The following users thanked this post: ali6x944

Offline obiwanjacobi

  • Frequent Contributor
  • **
  • Posts: 988
  • Country: nl
  • What's this yippee-yayoh pin you talk about!?
    • Marctronix Blog
Re: Help! adapting a SCN2661in Grant Searle z80 design
« Reply #3 on: October 03, 2016, 07:08:12 am »
Did you read the datasheet?
http://pdf.datasheetcatalog.com/datasheet/philips/SCN2661CA1F28.pdf

Get an idea of how the chip works, then map that on how the Z80 works and how you would program the chip...

[2c]
« Last Edit: October 03, 2016, 08:30:56 am by obiwanjacobi »
Arduino Template Library | Zalt Z80 Computer
Wrong code should not compile!
 
The following users thanked this post: ali6x944

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Re: Help! adapting a SCN2661in Grant Searle z80 design
« Reply #4 on: October 03, 2016, 02:22:01 pm »
Did you read the datasheet?
http://pdf.datasheetcatalog.com/datasheet/philips/SCN2661CA1F28.pdf

Get an idea of how the chip works, then map that on how the Z80 works and how you would program the chip...

[2c]
Well, 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
 

Offline obiwanjacobi

  • Frequent Contributor
  • **
  • Posts: 988
  • Country: nl
  • What's this yippee-yayoh pin you talk about!?
    • Marctronix Blog
Re: Help! adapting a SCN2661in Grant Searle z80 design
« Reply #5 on: October 03, 2016, 04:38:19 pm »
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.
Arduino Template Library | Zalt Z80 Computer
Wrong code should not compile!
 
The following users thanked this post: ali6x944

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Re: Help! adapting a SCN2661in Grant Searle z80 design
« Reply #6 on: October 04, 2016, 06:39:29 pm »
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?
Data 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?

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.
I did it is a silicon labs CP2102....
What to do next...
 

Offline stj

  • Super Contributor
  • ***
  • Posts: 2153
  • Country: gb
Re: Help! adapting a SCN2661in Grant Searle z80 design
« Reply #7 on: October 04, 2016, 07:59:31 pm »
i dont understand why the original design even used a 6800 family chip when there is a z80 sio chip.
 
The following users thanked this post: ali6x944

Offline Bruce Abbott

  • Frequent Contributor
  • **
  • Posts: 627
  • Country: nz
    • Bruce Abbott's R/C Models and Electronics
Re: Help! adapting a SCN2661in Grant Searle z80 design
« Reply #8 on: October 05, 2016, 12:39:58 am »
Data 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?
A0 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.
 
The following users thanked this post: ali6x944

Offline obiwanjacobi

  • Frequent Contributor
  • **
  • Posts: 988
  • Country: nl
  • What's this yippee-yayoh pin you talk about!?
    • Marctronix Blog
Re: Help! adapting a SCN2661in Grant Searle z80 design
« Reply #9 on: October 05, 2016, 12:28:57 pm »
[..]/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.

Be 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?
« Last Edit: October 06, 2016, 05:31:03 am by obiwanjacobi »
Arduino Template Library | Zalt Z80 Computer
Wrong code should not compile!
 
The following users thanked this post: ali6x944

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Re: Help! adapting a SCN2661in Grant Searle z80 design
« Reply #10 on: October 05, 2016, 02:56:45 pm »
[..]/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.

Be 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?
https://drive.google.com/file/d/0B5vW-k7HbsL4bTc2OFdyWnRxSVE/view?usp=drivesdk
I removed all the adress lines to make it clear..
Also I  checked the schematic and interrupts are not usesed
INT & NMI pulled high...
And for /R-W I only have to connect it directly to /WR on Z80 cpu but as u might noticed in the link above I added a SR filp flop to show me the state, that is what the red and yellow leds are for....
 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
 

Offline Bruce Abbott

  • Frequent Contributor
  • **
  • Posts: 627
  • Country: nz
    • Bruce Abbott's R/C Models and Electronics
Re: Help! adapting a SCN2661in Grant Searle z80 design
« Reply #12 on: October 05, 2016, 06:13:33 pm »
https://drive.google.com/file/d/0B5vW-k7HbsL4bTc2OFdyWnRxSVE/view?usp=drivesdk
I removed all the adress lines to make it clear..
File is password protected. Please remove the password so we can view it!
 
 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Re: Help! adapting a SCN2661in Grant Searle z80 design
« Reply #13 on: October 06, 2016, 03:04:06 am »
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
 

Offline obiwanjacobi

  • Frequent Contributor
  • **
  • Posts: 988
  • Country: nl
  • What's this yippee-yayoh pin you talk about!?
    • Marctronix Blog
Re: Help! adapting a SCN2661in Grant Searle z80 design
« Reply #14 on: October 06, 2016, 05:33:43 am »
Yep, that'll work just fine - if you have the drivers installed on your PC.
Remember: tx=>rx and rx=>tx
Arduino Template Library | Zalt Z80 Computer
Wrong code should not compile!
 
The following users thanked this post: ali6x944

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Re: Help! adapting a SCN2661in Grant Searle z80 design
« Reply #15 on: October 07, 2016, 08:32:16 am »
Yep, that'll work just fine - if you have the drivers installed on your PC.
Remember: tx=>rx and rx=>tx
Do u mean the bridge drivers?
 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Re: Help! adapting a SCN2661in Grant Searle z80 design
« Reply #16 on: October 07, 2016, 09:17:13 am »
What program should I use to interface with the z80 computer then?
 

Offline obiwanjacobi

  • Frequent Contributor
  • **
  • Posts: 988
  • Country: nl
  • What's this yippee-yayoh pin you talk about!?
    • Marctronix Blog
Re: Help! adapting a SCN2661in Grant Searle z80 design
« Reply #17 on: October 07, 2016, 10:34:49 am »
Any terminal program will do. Putty is such a program.
Arduino Template Library | Zalt Z80 Computer
Wrong code should not compile!
 
The following users thanked this post: ali6x944

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Re: Help! adapting a SCN2661in Grant Searle z80 design
« Reply #18 on: October 08, 2016, 03:30:56 pm »
Will it work with out a spicified boud rate and with out configuring the other stuff?
 

Offline Rasz

  • Super Contributor
  • ***
  • Posts: 2616
  • Country: 00
    • My random blog.
Re: Help! adapting a SCN2661in Grant Searle z80 design
« Reply #19 on: October 08, 2016, 05:22:13 pm »
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.
Who logs in to gdm? Not I, said the duck.
My fireplace is on fire, but in all the wrong places.
 

Offline Bruce Abbott

  • Frequent Contributor
  • **
  • Posts: 627
  • Country: nz
    • Bruce Abbott's R/C Models and Electronics
Re: Help! adapting a SCN2661in Grant Searle z80 design
« Reply #20 on: October 08, 2016, 08:27:26 pm »
Will it work with out a spicified boud rate and with out configuring the other stuff?
No.

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
 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Re: Help! adapting a SCN2661in Grant Searle z80 design
« Reply #21 on: October 09, 2016, 12:30:18 pm »
Will it work with out a spicified boud rate and with out configuring the other stuff?
No.

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

How 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 ...
 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Re: Help! adapting a SCN2661in Grant Searle z80 design
« Reply #22 on: October 09, 2016, 12:35:50 pm »
See page 5-6 in the datasheet
 

Offline Bruce Abbott

  • Frequent Contributor
  • **
  • Posts: 627
  • Country: nz
    • Bruce Abbott's R/C Models and Electronics
Re: Help! adapting a SCN2661in Grant Searle z80 design
« Reply #23 on: October 10, 2016, 01:29:09 am »
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.
   
 
The following users thanked this post: ali6x944

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Re: Help! adapting a SCN2661in Grant Searle z80 design
« Reply #24 on: November 10, 2016, 03:35:06 am »
Thanks alot
 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Re: Help! adapting a SCN2661in Grant Searle z80 design
« Reply #25 on: November 10, 2016, 04:05:03 am »
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
 

Offline ali6x944Topic starter

  • Frequent Contributor
  • **
  • Posts: 567
  • Country: sa
Re: Help! adapting a SCN2661in Grant Searle z80 design
« Reply #26 on: January 23, 2017, 07:52:55 am »
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...
 

Offline Bruce Abbott

  • Frequent Contributor
  • **
  • Posts: 627
  • Country: nz
    • Bruce Abbott's R/C Models and Electronics
Re: Help! adapting a SCN2661in Grant Searle z80 design
« Reply #27 on: January 29, 2017, 09:53:23 pm »
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...
To 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.
 
The following users thanked this post: ali6x944


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf