The Ethernet controller
TINI has an on-board Ethernet interface that allows a 10Base-T Ethernet connection. The complete interface section of TINI has a variety of components. We’re going to take a quick look at the main device, the LAN91C96 Ethernet controller. This is produced by Standard Microsystems Corporation, from which a complete datasheet can be obtained10. It is listed as a LAN91C96 ISA/PCMCIA Single Chip Full Duplex Ethernet Controller with magic Packet. The schematic shows the Ethernet controller as an SMC91C94/96, but it is really referring to either the LAN91C94 or LAN91C96. Since the LAN91C94 device has been discontinued, most TINI boards will have the LAN91C96. The actual 10-Base-T signals that are used for the Ethernet communications are ETH1, ETH2, ETH6, and ETH3. Simplified, that boils down to differential transmit
Figure 6-15: The 10-Base-T Ethernet controller
and differential receive, respectively. There are a number of other signals that are routed off stick, specifically EESK, EEDO, IOS0, IOS1, and IOS2. We won’t be making use of them. They deal with accessing an EEPROM inside the device. Refer to the LAN91C96 data sheet for further details on those signals. The signal /SMCINT is an interrupt signal being sent to the CPU to tell it needs to deal with activity on the Ethernet controller. It’s generated via Q3, which acts to invert the actual signal SMCINT, as it emerges form the LAN91C96 device. The signal SMCRST is an input, arriving from the CPU that resets the Ethernet controller after power-up. /CE3 acts as the address enable. The address bus on the device will only be examined if this is low. /PSEN acts as the read enable for the device, and /WR acts as the write enable. D0 through D7 form a bi-directional data bus on the device; A0 through A3 and A15 through A19 are used to address this device. Essentially, the device acts as a memory. When TINI wants to send data out the Ethernet interface, it writes to it as if it were a memory. When data has arrived at the interface, an interrupt is generated and the CPU reads it from the device again like a memory. The Ethernet interface circuitry also controls three LEDs, D2, D3, and D4. D2 and D3 are the transmit and receive LEDs respectively; they light up when data is being transmitted or received. The third LED, D4, is the link LED that lights when the Ethernet interface is connected to another Ethernet interface that is powered up. The TINI memory map states that the Ethernet interface resides from 0×300000 to 0×307FFF. Looking at the addressing of the LAN91C96, it would appear that its place in the memory map would be different from 0×300000 to 0×307FFF. This is most likely another example of subtleties in the memory map. A little discussion of this can be found in the TINI interest group archive. Fortunately, the Ethernet interface is robust and its operation is transparent to the user, so we don’t need to pry into its inner workings all that much.
The I2C capability of TINI is handled entirely by the CPU and is accomplished in software through the I2CPort class using P5.0 for the SCL (clock) and P5.1 as the SDA (data) line. These port pins also serve double duty as CAN interface pins, and have a built-in weak pull-up. The two I2C signals are named CTX and CRX on the schematic, and they get routed off stick through the SIMM connector. The I2C signals are essentially ready to connect up to an appropriate I2C device.
The CAN interface
The TINI CPU has two CAN controllers integrated into it. The resources for one of them overlap with the resources used for I2C (P5.0, and P5.1), and the resources used or the other one overlap with the resources used for serial0 (P5.2 and P5.3). Because of the importance of serial0, P5.0 and P5.1 are the most likely candidates for use with CAN, which is why those signals on the schematic get labeled CTX and CTR (CAN transmit and CAN receive). We have a whole chapter that delves into the wonders of CAN, so we’re only going to give it a brief mention here. It should be noted that CTX and CRX aren’t necessarily CAN ready. They need to be connected to a CAN controller interface device such as the Phillip’s Semiconductor, PCA82C25011. There is no such device on the TINI stick, but there is a spot for one of these on the E10/ E20 socket board.
The E10/E20 Socket Board
The E10/E20 socket board is an evaluation platform that allows you to connect a TINI stick to a variety of different interfaces. It has many features, some of which come “ready to use,” while others are “unpopulated,” requiring you to add components to the board yourself. The product is offered in three versions, E10, E20, and E50, the difference being that the E20 has the components for a regulated power supply populated on the board, while the E10 does not. Both the E10 and E20 have numerous other features that are not populated. The E50 is the E10/E20 with all of the components populated. The product is also being updated frequently, adding or removing certain features. We will be discussing the E20, Rev C. Let’s take a look at the main features.
What’s in an E20 socket board?
• A 72-pin SIMM socket that accepts the TINI stick. There is unpopulated space for an additional SIMM socket, which could be used to make custom hard- ware in a 72-pin SIMM format and mate it to TINI.
Figure 6-17: The E20 socket board
RS232 line driver that appears to be present in anticipation of a future TINI stick revision. (The current stick doesn’t use this feature.) There are unpopulated spaces for a dual UART, two RS232 line driver chips and pinout extensions that allow the addition of two RS232 ports (serial2 and serial3).
• An RJ-11 connector that allows access to the TINI External 1-Wire bus, and an iButton clip, that allows an iButton to be connected to the External 1-Wire bus.
• A DTR Reset Enable jumper that allows you to conveniently connect or disconnect the serial0 DTR232 signal from TINI to your DTR signal on the serial cable. This is very useful when switching back and forth between JavaKit and other applications that use serial0. There is unpopulated space for a rest switch.
• An RJ-45 connector for Ethernet.
• Unpopulated space for a CAN interface chip, and a pinout extension so that you can add a serial cable for use with CAN.
• A 5V regulated power supply that can accept 8-24V AC/DC. This is a really important feature. TINI is exacting in its power requirements and inexpensive 5V DC power supplies (simple adapters for consumer electronics) aren’t always accurate and clean enough. The 5V regulated power supply lets you use a cheap DC adapter, as long as it supplies between 8-24V (AC or DC). It provides TINI with a clean, 5V DC. This supply can also be disabled by jumpers, should you want to supply (or test) your own 5V DC supply.
• Unpopulated space for an off-stick flash memory, and associated decode circuitry, so the stick uses it and not the flash on the stick.
• A large, unpopulated, parallel output section.
• Miscellaneous capabilities involving the internal 1-Wire bus, including a diagnostics port, EPROM, and a special “first birthday” jumper.