|
Part 1: Putting it all Together
by Fred Eady
Start ý Overview
ý Elmerýs Silicon Glue ý Time
to Kill ý The CS8900A-CQ ý Software
and Firmware ý ICSP and LVP ý Assemble
the Ethernet Electronics ý No Floating
Allowed ý Installing the Bypass Capacitors
ý Pin Point ý Finishing
Installation ý Assemble the PIC16F877
Electronics ý The Rest of the Project
ý Winding Down ý Finishing
Up ý Sources and PDF
THE CS8900A-CQ
While the Elmerýs is hardening, letýs
take this opportunity to talk about the IC you just glued to the printed
circuit board. The CS8900A-CQ is a fully functional Ethernet IC capable
of encoding and decoding Ethernet frames. Originally, the CS8900A-CQ
was designed for standard PC-based Ethernet adapters. Unlike some
of the cheaper NE2000 clone ICs, the CS8900A-CQ comes equipped with
on-chip RAM and 10BaseT transmit and receive filters. The on-chip
RAM eliminates the need for an external static RAM IC. Obviously,
onboard analog circuitry complexity is slashed as well. With a little
help from its friends, the CS8900A-CQ does everything necessary to
build and propagate Ethernet frames. All you have to do is feed it
data and turn it loose.
Because of a unique I/O port access scheme,
the CS8900A-CQ can be used with any 8- or 16-bit micro. This I/O port
scheme is called PacketPage. PacketPage technology consists of a set
of eight 16-bit I/O ports that are mapped into the CS8900A-CQ I/O
space. As you can see in Table 1, the PacketPage ports are located
between offset 0000 and 000F hexadecimal. To access the PacketPage
I/O ports, the Ethernet adapter base address is added to the offset.
|
Offset
|
Type
|
Description
|
|
0000h
|
Read/write
|
Receive/transmit data (Port 0)
|
|
0002h
|
Read/write
|
Receive/transmit data (Port 1)
|
|
0004h
|
Write-only
|
TxCMD (transmit command)
|
|
0006h
|
Write-only
|
TxLength (transmit length)
|
|
0008h
|
Read-only
|
Interrupt status queue
|
|
000Ah
|
Read/write
|
PacketPage pointer
|
|
000Ch
|
Read/write
|
PacketPage data (Port 0)
|
|
000Eh
|
Read/write
|
PacketPage data (Port 1)
|
| Table
1ýThis is a simple implementation that moves a multitude of
data. |
If youýve ever worked with commercial
Ethernet adapters you know that the base address for the PC Ethernet
card is usually programmable either by jumpers or an address setup
application. And usually, youýll find an EEPROM dedicated to setup
and addressing information that is loaded into the Ethernet IC during
boot up. To keep it simple, the base address of the Ethernet Development
Board will be hardwired for 0300 hex. This is done using the CS8900A-CQ
address lines. The CS8900A-CQ internal I/O base address register defaults
to 0x300 on powerup. This combination of internal address register
contents and external address lines results in our PacketPage I/O
port addresses being defined between 0300 to 030F hex without the
need for a dedicated boot EEPROM.
Looking at Figure 1 and assuming the
least significant nibble is zero, you see 0x0300 hardcoded on the
CS8900A-CQ address pins. To navigate the entire PacketPage port structure,
itýs only necessary to manipulate the least significant nibble of
the address. Thus, you only need four of the PIC16F877ýs I/O lines
to serve as the PacketPage address lines. The ý877 is on the other
side of the Ethernet Development Board and will be installed a little
later.
 |
Figure
1ýAs you can see, just a thumbnail of extended components
helps the CS8900A-CQ transfer data via the Ethernet. |
In addition to four address lines, the
PIC16F877 will provide 8 bits of data bus, three bits of CS8900A-CQ
I/O control, a CS8900A-CQ RESET line, and a CS8900A-CQ polling input
line. That still leaves you with plenty of ý877 I/O and the analog-to-digital
pins.
PREVIOUS
NEXT
Circuit Cellar provides up-to-date information for engineers. Visit
www.circuitcellar.com for
more information and additional articles.
For subscription information, call (860) 875-2199, subscribe@circuitcellar.com
or subscribe online.
ýCircuit Cellar, the Magazine for Computer Applications. Posted with
permission. |