Author Topic: z80 with udp/ip, CS8900 10baseT: size of RAM and ROM?  (Read 263 times)

0 Members and 1 Guest are viewing this topic.

Offline DiTBhoTopic starter

  • Super Contributor
  • ***
  • Posts: 4429
  • Country: gb
z80 with udp/ip, CS8900 10baseT: size of RAM and ROM?
« on: January 23, 2025, 01:35:14 pm »
hi
I am considering a very simple design, like this (Grant's 7-chip Z80 computer, ~2007)
It has
Code: [Select]
Memory Map
0x0000..0x1FFF   ROM 08Kbyte
0x8000..0xFFFF   RAM 32Kbyte
with a CS8900 10baseT network card memory mapped between 0x2000 and 0x2000+8Kbyte.

The gadget application I have in mind is very simple:
- it has no operating system like FreeRTOS, ucOS/2 or similar
- it just needs to communicate via serial line to receive simple commands
- it just needs to communicate via network via UDP/IP to receive data.
- it also needs to show a few messages on a text-LCD.

So, the ROM should contain:
- serial 6850 driver, interrupt driven.
- a tiny monitor, able to show the memory in hex, jump to an address, and to load SREC from the network
- the cs8900 driver
- the udp/ip network primitives { send(), receive() }
- HD44780 LCD driver, 2x16 text

Do you think it is feasible with CC=SDCC/z80 in 8Kbytes of ROM?
Otherwise, I can write parts in z80-assembly, to integrate with the udp/ip part that I would like to write in C instead

What do you think  :-//
The opposite of courage is not cowardice, it is conformity. Even a dead fish can go with the flow
 

Offline DiTBhoTopic starter

  • Super Contributor
  • ***
  • Posts: 4429
  • Country: gb
Re: z80 with udp/ip, CS8900 10baseT: size of RAM and ROM?
« Reply #1 on: January 23, 2025, 01:38:25 pm »
(
I'm terribly busy with that bloddy rb532a router fix as I need to bring that router with me
I haven't tried to write a skeleton of what I would like to do, just to understand if it's feasible
I'm asking here, as a preliminary feasibility analysis, just to save time
because then I have to leave for a long business trip
)
The opposite of courage is not cowardice, it is conformity. Even a dead fish can go with the flow
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 13231
Re: z80 with udp/ip, CS8900 10baseT: size of RAM and ROM?
« Reply #2 on: January 23, 2025, 02:22:51 pm »
There's very little prior art online re: interfacing a CS8900 with a Z80.
I think it would be prudent to *either* map the CS8900 higher *or* as a window in the ROM space, to allow a larger ROM to be used.  Also the CS8900 only requires a 4KB window. 
Microchip still produce the AT28C256, a 32KB x 8bit parallel EEPROM, so you could have up to 28K ROM using A15 to select RAM / ROM + memory mapped IO, and a 74x138 to decode A12:14 (+ A15 on a nEN pin) to decode a 4K page in the bottom half of the memory map for the  CS8900, + also inhibit ROM in that range.

Grant's 7 chip Z80 uses 2 74LS32 OR gates to decode /CE for the RAM ROM in the bottom 8K of the address space, and has two spare 74HCT04 inverter gates, one of which could be used to invert the '138 output selected for the CS8900, and feed it to the U7d OR gate controlling ROM /CS to make the window.   Additionally, as there is still a spare inverter and U7c becomes spare, a second 4K window could be implemented if you ever need to add another 4K memory mapped device.
« Last Edit: January 23, 2025, 03:46:26 pm by Ian.M »
 
The following users thanked this post: DiTBho

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15894
  • Country: fr
Re: z80 with udp/ip, CS8900 10baseT: size of RAM and ROM?
« Reply #3 on: January 23, 2025, 10:32:49 pm »
I'm sure it is doable within 8 KB of code, but possibly not all in C.
 
The following users thanked this post: DiTBho


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf