Chip Neuron Lonworks PDF
Chip Neuron Lonworks PDF
Chip Neuron Lonworks PDF
TMPN3150B1AF (QFP64)
TMPN3120B1AM (SOP32)
TMPN3120E1M (SOP32)
TMPN3120FE3M (SOP32)
TMPN3120FE5M* (SOP32)
TMPN3120A20M* (SOP32)
TMPN3120A20U* (QFP44)
* : Under development
Light
Wall controller
Motor
Neuron
Neuron
Neuron
r eu
on
Remote control
Neuron
Neuron
Router RF
Thermal sensor
Air conditioner
Breaker
Alarm
Neuron
Neuron
Neuron
Neuron
RF transceiver
Sensor or actuator
+5 V
I/O Functions
Table 1. Summary of Direct I/O Mode
Object Bit input/output Byte input/output Leveldetect input Nibble input/output Touch I/O Applicable I/O pins IO0 to IO10 IO0 to IO7 IO0 to IO7 Any adjacent 4 in IO0 to IO7 IO0 to IO7 Input/Output Value 0, 1 binary data 0 to 255 binary data Falling edge detection 0 to 15 binary data Interface to Dallas Semiconductor Corp. Touch Memory (TM) standard
Neuron C Programming
The "Neuron C" version of the C programming language is used to develop application programs for the Neuron Chip. Neuron C is based on ANSI C, but has added functions for LonWorks technology. The major changes are as follows:
Round-robin
Example of Program
This program uses pin IO5 at the switch node to measure how long a switch is depressed, then sends the time as data to the speaker node, which determines the pitch according to the data and outputs the corresponding frequency to pin IO0.
I/O object Speaker node IO0 IO0 output frequency ALARM; network input unsigned long Tin; 2 when(nvupdateoccurs (Tin))
{
io out (ALARM, Tin);
Network variable I/O object Switch node IO5 IO5 input ontime SW; network output unsigned long Tout; 1 when (ioupdateoccurs (SW))
{
Tout = inputvalue;
Network variable
1: Changes to TRUE when the switch turns OFF 2: Changes to TRUE on receipt of network variable (nv)
Example of Program
#define A2D_CTRL *(int *)0xFFA8 /* control reg. 0xFFA8 */ /* status reg. 0xFFA8*/
Neuron Chip
clk[2:0] max[1:0] 3 fast clk 8 control
#define A2D_DATA *(unsigned long *)0xFFA9 /* data reg. 0xFFA9, 0xFFAA */ #define A2D_ENABL *(int *)0xFFAB #define a2d_enable(clk, mask) A2D_CTRL = (A2D_STS&0x03) | ((clk)<<2) | 0x40; A2D_ENABL = (mask) #define a2d_disable() A2D_CTRL = A2D_STS&0x1F #define a2d_done() A/D Logic DI6 enable #define a2d_mux(mux) #define a2d_read() Counter I0_3 output bit i03; ((A2D_STS&0x80) !=0) A2D_CTRL = (A2D_STS&0x5C) | (mux) A2D_DATA // enable I0_3 driver IO4 DI5 enable
IO5
comp.
#pragma ignore_notused i03 IO6 DI7 enable Vref cmp enable status Latch[15:8] Latch[7:0] unsigned long analog_data;
a2d_enable( 0,9 ); // clk 0 select, I0_4,7 DI disable IO7 analog buffer IO3 }
SNVTlength
Length
0 to 6,553.5
0.1 m
17
SNVTlength kilo
Length
km
0 to 6,553.5
0.1 km
18
SNVTtemp
Temperature
274 to 6,279.5
0.1 C
39
SNVTvolt
Voltage
3,276.8 to 3,276.7
0.1 volt
44
SNVTcount
Count, event
counts
0 to 65,535
1 count
SNVTflow
Flow
liters/second
0 to 65,534
1 /s
15
SNVTelec kwh
Energy, elec
kilowatt-hour
0 to 65,535
1 kWh
13
SNVTlev cont
Level, continuous
0 to 100
0. 5 %
21
OFF LOW SNVTlevdisc Level, discrete MED HIGH ON "Null State (U0)" not in use "Call Initiated (U1)" "Overlap Sending (U2)" "Outgoing Call Proceeding (U3)" "Call Delivered (U4)" hearing ringback
0 1 2 3 4 0 1 2 3 4 38 22
SNVTtelcom
Phone state
A channel consists of one transmission medium block (see Figure 3). Support for Multiple Communications Channels A network consists of multiple channels. The interconnection of these channels is supported by devices called bridges and routers.
Node Domain Router Subnet Bridge Group member Bridge
Bridge: A bridge transfers all packets input from one channel to another channel. Router: A router determines the destination node address for a packet on a channel and decides whether or not to transfer the packet to a different channel. The intelligent router improves the communications efficiency of a medium.
Improved Communications Response Times The LonTalk protocol uses a unique collision avoidance algorithm. The collision avoidance algorithm allows a channel to manifest its maximum transmission throughput without any deterioration due to excessive collision. In addition, collision detection is supported as an option for particular media, including twisted pair. Collision detection further improves the response time in the event of a collision. The LonTalk protocol can support more than 500 transactions per second (in the case of 12 byte length), when the transmission rate is 1.25 Mbps using twisted pair. Although it may not be possible to slow down transmission for certain node applications, the LonTalk protocol supports media access in which a priority rating can be set for each node (priority mode). Immediate access to the medium is guaranteed when the end of communication on that medium is detected at a node for which a priority rating has been established.
Improved Communications Reliability The LonTalk protocol supports an end-to end communications acknowledge mode auto with retry function. When a node sends a message in this mode to another node or a group node, the receiving node sends an acknowledgment to the sender when the message is received. If the sender does not receive the acknowledgment within a set time, it automatically resends the message. The number of retries can also be set. The "Request/Response" mode is an even more reliable communications mode. When a sending node requests a certain process to be performed by another node, the receiving node executes the process and returns the result to the sending node.
Improved Security The LonTalk protocol includes an "Authentication mode". In this mode, authentication is carried out between the nodes that are to communicate without complex encryption being performed. This mode prevents unauthorized network access without any reduction throughout.
Communications Compatibility of LON Products Products that use the LonTalk protocol are designed for mutual communications control even with the products of other manufacturers. The Standard Network Variable Type (SNVTs) declaration statement in the LonTalk protocol firmware defines the format of data transmitted by the communications packet and, by using the variable types of the particular network, enables communications with other products using the same declaration statement without the tedium of developing communications protocols.
Special-Purpose mode
1. Differential Mode
102
+5 V Neuron Chip TMPN 3150 or TMPN 3120 CP0 CP1 CP2 CP3 CP4 2 k 2 k 51 51
Node #1
2 k +5 V
Figure 5 shows an example of the output waveforms in differential mode. A transformer can also be used for isolation from the media.
Example of transformer connection (1) (Conditions) Wire: Twisted pair (22 AWG) Bus length: 500 m max (typical) Stub length: 30 cm max Number of nodes: 64 max/channel Communication speed: 1.25 Mbps Example of transformer connection (2) (Conditions) Wire: Twisted pair (22 AWG) Bus length: 2000 m max (typical) Stub length: 3 m max Number of nodes: 64 max/channel Communication speed: 78 kbps
+5 V Neuron Chip TMPN 3150 or TMPN 3120 CP0 CP1 CP2 CP3 CP4 2 k 2 k 51 51
Node #64
2 k +5 V
102
Byte Sync.
Figure 5. Example of Output Waveforms in Differential Mode (T: 800 ns, 1.25 Mbit/s)
10
2. Single-Ended Mode
120
+5 V
Neuron CP0 Chip CP1 TMPN CP2 3150 CP3 or CP4 TMPN 3120
Figure 6 shows a connection example for a RS-485 transceiver using single-ended mode. In this example, both ends are terminated with 120 . The maximum network bus length is 1200 m.
Node #1
RS-485 2 k
10 k
(Conditions)
+5 V
Wire: Twisted pair (22 AWG) Stub length: 0 cm Number of nodes: 32 max/channel Communication speed: 39 kbps
RS-485
Neuron CP0 Chip CP1 TMPN CP2 3150 CP3 or CP4 TMPN 3120
+5 V
Node #32 2 k 10 k 120 (All resistors are metal film 5%, 1/8 W)
+5 V
Byte Sync.
3. Special-Purpose Mode
Figure 8 shows an example of the communication waveforms in special-purpose mode. This mode allows more complex data trunsfer between the Neuron Chip and transceiver. It is used with transceivers such as electric power line trunsceivers.
MSB
RX Input CP0
STATUS
LSB MSB
DATA
LSB
1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6
MSB STATUS LSB MSB DATA LSB
TX Output CP1
1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6
Control
V Ref
~ reset ~ service
Clock
IO0 to IO7
IO8
IO9
IO10
CP0 to CP4
Standard clock input: 10 MHz, 5 MHz, 2.5 MHz, 1.25 MHz, 625 kHz
Package QFP64-P-1414 0.80A SOP32-P-525 1.27 SOP32-P525 1.27 QFP44-P-1010 0.80 SOP32-P-525 1.27 SOP32-P-525 1.27 SOP32-P-525 1.27
2 ch 2 ch 2 ch
10
12
1 2 3 4 5 6 7 8
Incorporates there high performance, 8-bit pipelined CPUs. The eleven application I/O pins can be used in a variety of combinations.
Two of the three CPUs perform LonTalk protocol processing. The third CPU is used for user applications. Individually configurable digital I/O. Can be used as a parallel interface to an external microprocessor with eight data lines and three control lines.
Connects to a baseband medium such as twisted-pair cable via simple components or an externally-mounted LonTalk transceiver.
Supports sleep mode for low power consumption. For storage of network parameters and application programs. 2 The TMPN3120E1M/A20M/A20U have 1-KB E PROM. 2 The TMPN3120FE3M has 2-KB E PROM. 2 The TMPN3120FE5M has 3-KB E PROM. 2 Other neuron chips have 512-bytes E PROM. Prevents incorrect operation or erroneous E PROM writers if the supplied voltage is less than a specified voltage. Built-in 3-channel -type A/D converter TMPN3120A20M/A20U and TMPN3120FE5M.
2
Internal E PROM
9 10
Built-in AD converter
The TMPN3120B1AM/E1M have 10 Kbytes and the TMPN3120A20M/A20U/FE3M/FE5M has 16 Kbytes of incorporate ROM enabling the construction of single chip systems. This ROM is preloaded with firmware such as the protocol and application library, supporting many kinds of applications. The TMPN3150B1AF does not incorporate ROM and is configured to access external memory (58 Kbytes max of which 42 Kbytes can be used for application programs). This makes the TMPN3150B1AF suitable for more complex applications. Through the combination of its unique hardware and firmware, the Neuron Chip contains all the key functions required for a LonWorks node. Processes all LonTalk protocol messages. Includes input pin functions for detection and output pin functions for detailed operation of output devices. Includes a library of application functions (see Tables 1 to 5). Installation parameters are stored in non-volatile memory. These functions minimize the number of external components required to construct a LonWorks network, resulting in a low overall cost. Figures 9, 10 and 11 show the pin assignment of TOSHIBA Neuron Chip.
13
IO10
CP4
CP3
VDD
VSS
IO7
IO8
IO9
NC
NC
48 49
33 32
64 1
17 16
CP4 CP3 CP2 CP1 CP0 NC VDD VSS CLK1 CLK2 VDD VSS VDD VSS NC ~ SERVICE
~ RESET VDD IO4 IO3 IO2 IO1 IO0 ~ SERVICE VSS VSS VDD VDD VSS CLK2 CLK1 VSS
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17
VDD VSS IO5 IO6 IO7 IO8 IO9 VDD IO10 VSS CP4 CP3 CP1 CP0 VDD CP2
33 34
23 22
NC
44 1
12 11
NC
IO2
IO1
IO0
~ SERVICE
VDD
VDD
NC
NC
VSS
NC IO0 IO1 IO2 IO3 ~ RESET VDD VSS VSS IO4 IO5 IO6 IO7 IO8 IO9 IO10
Pin Functions
Pin Name CLK1 CLK2 ~ RESET ~ SERVICE IO0 to IO3 Input Output I/O(built-in pull-up) I/O(built-in configurable pull-up) I/O I/O (built-in configurable pull-up) I/O I/O Pin Function Oscillator connection. Or external clock input. Oscillator connection. Leave open when external clock is input to CLK1. Reset pin (active low). Service pin. Indicator output during operation. Large-current sink capacity (20 mA). General I/O port. General I/O port. One of IO4 to IO7 can be specified as No.1 timer/counter input. Output signal can be output to IO0. IO4 can be used as the No.2 timer/counter input with IO1 as output. General I/O port. Can be used for serial communication with other devices. Memory expansion data bus Read/write control output port for memory expansion Control output port for memory expansion Address output port for memory expansion Power input (5.0 V typ.) Power input (0 V GND) Not connected. Leave open. Bidirectional port for communications. Supports several communications protocols by specifying mode.
Notes:
TMPN3120B1AM
VSS
NC
Pin No. 15 14 40 5 4, 3, 2, 43
15 14 1 8 7 to 4
IO4 to IO7
10 to 13
3, 30 to 28
IO8 to IO10
27, 26, 24
31, 30, 27
D0, D1, D2 to D7 I/O R/ ~ W ~E A15, A14 to A0 VDD VSS NC CP0 to CP4 Output Output Output Input Input I/O
7, 20, 22, 26, 40, 41, 44 2, 11, 12, 18, 25, 32 9, 10, 19, 29, 38, 41 8, 9, 19, 21, 25, 39 9, 10, 13, 16, 23, 31 7, 8, 13, 16, 26, 37 1, 18, 27, 48, 49 28 to 32 19, 20, 17, 21, 22
1, 6, 11, 12, 17, 22, 23, 28, 33, 34, 39, 44
~ SERVICE and IO4 to IO7 have configurable pull-up. All VDD Pins must be connected together externally. All VSS Pins must be connected together externally.
14
Operating Conditions
Item Symbol VDD VIH(1) VIL(1) VIH(2) VIL(2) fosc Topr Min 4.5 2.0 VSS VDD 0.8 VSS 0. 625 40 Typ. 5.0 Max 5.5 VDD 0.8 VDD 0.8 10 +85 Unit V V V V V MHz C
Operating voltage Input voltage (TTL) Input voltage (CMOS) Operating frequency Operating temperature
Symbol VOL(1)
Max 0.8 0.4 0.8 0.4 1.0 0.4 VDD VDD VDD VDD +10
Unit V V V V V V V V V V A
Low output voltage (2) Low output voltage (3) Low output voltage (4) High output voltage (1) High output voltage (2) High output voltage (3) High output voltage (4) Input current
~ SERVICE CP2, CP3 Misc.*1 IO0 to IO3 ~ SERVICE CP2, CP3 Misc.*1 *2 *3 IO4 to IO7 ~ SERVICE ~ RESET VDD VDD VDD
IOL = 20 mA IOL = 10 mA
IOL = 40 mA IOL = 1.4 mA IOH = 1.4 mA IOH = 1.4 mA IOH = 40 mA IOH = 1.4 mA VIN = VSS to VDD
Pull-up current
IPU
VIN = 0 V
30
300
30 0.1 4.4
mA mA V
*1. Output voltage characteristics exclude the ~ RESET pin and CLK2 pin. *2. Excludes pull-up input pins. *3. The IO4 to IO7 and ~ SERVICE pins have programmable pull-ups. The ~ RESET pin has a fixed pull-up.
15
TMPN3150B1AF QFP64-P-1414-0.80A
Unit : mm
17.2 0.2 12.2 0.3 1.0 typ. 10.0 0.2 33 34 23 22 14.0 0.2 64 0.16
M
1.0 typ.
14.0 0.2 48 49 33 32
10.0 0.2
12 17 1 1.0 typ. 0.8 1.5 0.2 1.9 max 0.35 0.1 16 3.10 max 0.16
M
12.2 0.3
2.7 0.2
17.2 0.2
0.1+0.1 0.05
0.1+0.15 0.1
0 to 10 0.8 0.2
TMPN3120B1AM/E1M/A20M/FE3M/FE5M SOP32-P-525-1.27
Unit : mm
32
17
10.7 0.2
14.13 0.3
16 0.25
M
2.8 max
2.4 0.2
0.1
16
0.19 0.1
13.335
Service Pin
The service pin supports the following functions, convenient for network installation and maintenance. Setting the service pin low transmits the Neuron ID and program name on the network. That information is used at the following times.
To communicate with a node that does not have network configuration information. To find out the program name.
An LED can be connected to the service pin to indicate the status of the node.
Lit: The node has no valid application code. Blinks at 1/2 Hz rate: The node has application code but no network configuration information. Not lit: The node has both application code and network configuration information.
To access these input/output functions, the service pin is multiplexed between input and output by turning the N-ch open drain output ON/OFF at 76 Hz with a 50% duty cycle.
Active low
Tristate
Active low
Tristate
Active low
Tristate
Input Sampling
Input Sampling
Indicator signal
Reset Pin
The Neuron chip incorporates a low-voltage detector circuit. When using this circuit in conjunction with an external circuit, the external circuit may require an open-collector or open-drain low-voltage detector circuit. The external LVD must be used if Neuron chip operated at 20MHz. The reset pin has an open-drain output with an activelow input, and an internal pull-up resistor. When the reset pin is held at 0.8 V or below for at least 20 ns, the reset operation begins. The reset pin can be activated by a software reset or by output from a watchdog timer. Accordingly, this reset pin can be also reset external circuits such as a transceiver.
VDD 100 pF Reset switch ~ RESET 100 pF
Ce: optional
17
LonBuilder Hardware
FTT transceiver Linked power transceiver Power line transceiver Twisted-pair transceiver I/O evaluation board
LonBuilder router
Two Neuron 3150 chips Memory Two optional transceivers
Neuron emulator
Neuron 3150 chip Memory Optional transceiver Optional I/O Debugger support
LonBuilder
LonBuilder Software
Project manager
Uses information to manage object database node configuration and to configure application.
Program editor
Integrated editor combining the Neuron C compiler and project manager
Neuron C compiler
Neuron C cross compiler
Neuron C debugger
Neuron C cross debugger
Network manager
Manages LonWorks nodes and the network.
Protocol analyzer
Monitors the network traffic and performance and collects that information.
Miscellaneous
PROM writer with serial transfer function This is used to write to external ROM for the TMPN3150. And, when Echelon control module products are used, adaptors are needed for changing a connection from DIP package to PLCC package. because Echelon's products can support only PLCC-type EPROM or OTP (one-time PROM). Neuron 3120 programmer device (made by Echelon Corp.) The programmer device marketed by Echelon is convenient for writing application programs to the TMPN3120. Control module (made by Echelon Corp.) This is used to evaluate application programs developed on LonBuilder by writing programs to EPROM or OTP then inserting this board into the actual module.
Echelon, Neuron, LON, LonTalk, LonBuilder, LonWorks, 3150, 3120, and LonManager are registered tradmarks of Echelon Corp. Neuron Chip products are manufactured by Toshiba under licence from Echelon Corp. A "LonWorks OEM Licence Contract" must be signed by the customer and Echelon Corp. in order to purchase these Neuron Chip products. The Toshiba IC (TMPN3150/3120) is covered by a patent agreement between Toshiba Corp. and Bull CP8 Corp. and cannot be used in any "portable device" (defined below) such as an IC card. Portable Device ( ) A portable device that is within 10 mm of the width and within 3 mm of the length of devices defined in ISO 7816. ( ) A portable device that conforms to the arrangement and form of electrical contacts stipulated in Part 2 of ISO 7816. ( ) A protable, pocket-size device for identifying the person carrying the device or identifying the device itself, or for storing data on the history of the carrier or the device. BULL CP8 patent: US No. 4,382,279 Please note the following warning from Echelon Corp. when using I2C I/O objects:
PATENT NOTICE Echelon's delivery to you of the "I2C Library" does not convey nor imply a right under any I2C patent rights of Philips Electronics N.V. ("Philips") to make, use or sell any product employing such patent rights. Please refer all questions with respect to I2C patents and licenses to Philips at: Mr. H. B. Schoonheijm Corporate Patents and Trademarks Philips International B.V. P. O. Box 220 5600 MD Eindhoven The Netherlands Telephone +31 40 743479 Facsimile +31 40 743489
19
990219 (A)
Mnchen Office
Bro Mnchen Hofmannstrasse 52, D-81378, Mnchen, Germany Tel: (089)748595-0 Fax: (089)748595-42
Seoul Branch
14/F, KEC B/D, 257-7 Yangjae-dong, Seocho-ku, Seoul, Korea Tel: (02)589-4334 Fax: (02)589-4302
Deerfield, IL(Chicago)
One Pkwy., North, Suite 500, Deerfield, IL 60015-2547, U.S.A. Tel: (847)945-1500 Fax: (847)945-1044
Denver, CO
8400 E, Prentice Englewood, CO 80111, U.S.A. Tel: (303)220-9848 Fax: (303)220-9856
Beijing Office
Rm 714, Beijing Fortune Building, No.5 Dong San Huan Bei-Lu, Chao Yang District, Beijing, 100004, China Tel: (010)6590-8795 Fax: (010)6590-8791
Edison, NJ
2035 Lincoln Hwy. Ste. #3000, Edison NJ 08817, U.S.A. Tel: (908)248-8070 Fax: (908)248-8030
Irvine, CA
2 Venture Plaza, Suite 500, Irvine, CA 92718, U.S.A. Tel: (714)453-0224 Fax: (714)453-0125
Chengdu Office
Unit F, 18/F, 42 Wenwu Road Xinhua Avenue, Chengdu, 610017, China Tel: (028)675-1773 Fax: (028)675-1065
Microelectronics Center-Sunnyvale, CA
1220 Midas Way, Sunnyvale, CA 94088-3509, U.S.A. Tel: (408)739-0560 Fax: (408)746-0577
Norcross, GA(Atlanta)
655 Engineering Dr. #160, Norcross, GA 30092, U.S.A. Tel: (404)368-0203 Fax: (404)368-0075
Richardson, TX(Dallas)
777 East Campbell Rd., Suite 650, Richardson, TX 75081, U.S.A. Tel: (214)480-0470 Fax: (214)235-4114
Wakefield, MA(Boston)
401 Edgewater Place, Suite #360, Wakefield, Essex, MA 01880-6229, U.S.A. Tel: (617)224-0074 Fax:(617)224-1095
Bangkok Office
135 Moo 5 Bangkadi Industrial Park, Tivanon Rd., Bangkadi Amphur Muang Pathumthani 12000, Thailand Tel: (2)501-1635 Fax: (2)501-1638
Kaohsiung Office
16F-A, Chung-Cheng Bldg., Chung-Cheng 3Rd., 80027, Kaohsiung, Taiwan R.O.C. Tel: (07)222-0826 Fax: (07)223-0046
Penang Office
Suite 13-1, 13th Floor, Menard Penang Garden, 42-A, Jalan Sultan Ahmad Shah, 100 50 Penang, Malaysia Tel: 4-226-8523 Fax: 4-226-8515
The information contained herein is subject to change without notice. The information contained herein is presented only as a guide for the applications of our products. No responsibility is assumed by TOSHIBA for any infringements of patents or other rights of the third parties which may result from its use. No license is granted by implication or otherwise under any patent or patent rights of TOSHIBA or others. TOSHIBA is continually working to improve the quality and the reliability of its products. Nevertheless, semiconductor devices in general can malfunction or fail due to their inherent electrical sensitivity and vulnerability to physical stress. It is the responsibility of the buyer, when utilizing TOSHIBA products, to observe standards of safety, and to avoid situations in which a malfunction or failure of a TOSHIBA product could cause loss of human life, bodily injury or damage to property. In developing your designs, please ensure that TOSHIBA products are used within specified operating ranges as set forth in the most recent products specifications. Also, please keep in mind the precautions and conditions set forth in the TOSHIBA Semiconductor Reliability Handbook. The products described in this document are subject to the foreign exchange and foreign trade laws.
Website: http://doc.semicon.toshiba.co.jp/indexus.htm
1999 TOSHIBA CORPORATION Printed in Japan