Abstract: For differentiates various equipment correctly in the power equipment inspection, uses iButton to take equipment’s electronic data marking. Through and reads in the corresponding operation succession to the iButton initialization, programs two aspects from the hardware interface and the software, the detailed introduction uses LPC2214 in μC/OS-II the real-time operating system to read the iButton 64 identification codes the design methods. Its connection design has succeeded applies in the inspection machine.
Key word: iButton 1-Wire LPC2214 μC/OS-II
The power equipment inspection management is uses the check-out facility and the instrument, according to technical standard which draws up in advance, decides the human, the fixed point, to decide the route, to decide the cycle, to decide the method, to inspect the record surely, executes the entire process to carry on the dynamic check to the movement equipment. Inspects the personnel individual inspection which machine will grasp according to the request with to place after the equipment scene’s ID button contacts, this position corresponding certain job instruction should one by one demonstrate that on individual inspection server, instructs each related post personnel to complete the inspection work; At the same time, the gathering equipment scene information is recorded by the digital form in the inspection memory, facilitates ground passes to the computer management system to carry on the statistical analysis. Dallas Corporation produces the iButton serial products has created the condition for the industry scene’s application and the information recognition engineering research.
iButton (information button) the physical structure is a seal in the oblate stainless steel outer covering diameter is 16 mm, thickness is 3~6 mm microcomputer chips, is one kind carries the automatic identification number the electronic data label. The advanced design idea and the seal form have entrusted with performance and so on iButton ultra strong anti-impact, against static electricity, corrosion preventing, waterproofing, against friction, has superiority which information carriers and so on IC card, magcard are unable to compare; Satisfies the system enormously in reliable, the stable aspect request, may guarantee ten year above service life. In by in the LPC2214 design’s inspection machine, iButton obtained the full application. Below take DS1990A as an example, a serial communication way conducts the research to it with LPC2214 between.
1 DS1990A performance characteristic
Firm durable iButton has the outstanding environment adaptiveness, but dustproof, is moisture-proof and is quakeproof. This kind of compact button contour causes its self aligning corresponding detector, easy manual control use. Each kind of appendix causes DS1990A to inspect, modern management systems and so on physical distribution to have the unreplaceable function. Its main performance index is as follows:
◆ the factory engraves into 64 ROM including 48 only sequence codes, 8 CRC verification code and 8 family codes (01H).
◆ carries on the data communication through the single track and the main engine, the transmission speed may reach 16.3 kbps.
◆ the standard 16 mm diameters and the 1Wire agreement have guaranteed with other iButton product compatibility.
◆ the time demand may in 5 ms.
◆ temperature range - 40~ 85℃
2 DS1990A and LPC2214 hardware interface design
1-Wire is connects 1 master controller and many on a main line from machine equipment’s system. In any situation, DS1990A is from machine the equipment, but bus control unit Chang Youwei the controller fills a position. the 1-Wire main line has defined 1 holding wire, therefore lets on the main line each equipment in the suitable time movement. DS1990A is leaks the level opening output, the bus master regulator may use with its consistent equivalent circuit. In the master-control unit end must add on 1 to pull the resistance, on pulls the resistance in the short distance transmission situation approximately is 5 kΩ. more than 1 spot system is composed of 1 1-Wire main line and the connection in above many from machine the equipment.
the 1-Wire single main line’s idle condition is the high level. No matter is what kind of reason, when the transmission operating process needs to suspend getting down, and the request transmission process can also continue time, the main line must be at the idle condition; If the situation is not this or the main line maintains the low level surpasses 120 μs, on that main line’s all components are going to reposition.
DS1990A and LPC2214 interface circuit as shown in Figure 1. Because LPC2214 the P0 mouth has been taken by inspection machine other parts, the P1 mouth has pulls the resistance, opens by no means leaks the output, must therefore have 2 I/O mouths to meet iButton. The LPC2214 P1.22 mouth meets Tx, serves as the output; The P1.16 mouth meets Rx, serves as the input.
Chart 1DS1990A and LPC2214 hardware interface
3 software designs
In DS1990A constructs ROM only to visit by the simple root data line. Based on the Dallas 1-Wire agreement, may withdraw 48 sequence codes, 8 family codes and 8 CRC verification code. the 1-Wire communication protocol stipulated that main line’s receiving and dispatching carries on according to the special time slot’s under main line condition, sends out the synchropulse by the main engine to drop along the initialization; All data read-write defers to the low position before the principle.
DS1990A on the 1-Wire main line’s data accessing order flow is in turn: Initialization, ROM function order, read data.
3.1 initialization and reply
on 1-Wire main line all transmission operation by initialization sequence start. The initialization sequence the reset pulse which sends out by the main engine (Reset Pulse) and from the online reply pulse which machine sends out (Presence Pulse) composes. A reset pulse follows close on an online reply pulse to indicate the DS1990A ready, may carry out the appropriate ROM order to carry on data receiving and dispatching.
The replacement and online reply pulse succession as shown in Figure 2(a), the main engine transmits a (Tx) reset pulse (at least 480 μs low levels), then releases the holding wire to enter receive pattern (Rx). This time, the 1-Wire main line 5 kΩ on is pulled the resistance to pull to the high level, when examines in the data line the signal rise, DS1990A waits for (tPDL,15~60 μs), then transmission online reply pulse (tPDL,15~60 μs).
3.2 read-write operations
Once the main engine examines the reply pulse, may issue the ROM function order. All ROM operational order’s length is 8. The Read ROM order is [33H] or [0FH], this order permission main line master controller reads DS1990A 8 family code, the only 48 sequence codes and 8 CRC verification code. When this order only on the main line has a DS1990A equipment may use. If on the main line surpasses one from machine the equipment, when various equipment simultaneously transmit will cause the data conflict. The Search ROM order is [F0H], this order permission main line master controller uses the remedy to confirm on the main line all equipment’s 64 ROM code.
Reads/writes the time slot definition like chart 2(b), (c) to show, the main engine sets at the data line low initialization all time slots. In the data line drop along, through triggers in DS1990The delay circuit to cause DS1990A and the main engine synchronization; Is writing time slot period, the delay circuit decided when DS1990A does carry on the sampling to the data line. As for reads the data the time slot, what if transmits is “0″, the delay circuit will continue to set lowly nearly 15 μs, is set high; If the data position is “1″, then iButton maintains reads the data the time slot to be invariable.

Figure 2 the replacement and reads/writes the succession
3.3 essential codes and realize
The main engine and the iButton correspondence is through the initialization, writes the data succession, to read the data succession to complete, the order and data each byte starts by the least significant bit by the position transmission. In the procedure, the initialization LPC2214 Time1 timer, it fixed time time setting is first 10 μs, the Delay subroutine’s function is causes it to retard time time 10 μs. Reset, WriteByte, ReadByte respectively are the initialization, read, write 1 byte subroutine. In indicator form function *GetButtonID, the iButton 64 sequence code preservation in the ButtonID array, returns to finally aims this array the indicator. (procedure sees this publication website www.mesnet.com.cn - - editor note)
Conclusion
In order to avoid equipment’s service insufficiency or the overhaul is surplus, the current power equipment management by the preventive maintenance and the plan overhaul management system, transforms to the forecasting device status overhaul system, its basic goal is enhances the equipment reliability, the efficiency, to reduce the production cost, raises equipment’s use factor. Dallas Corporation promotes intelligence information carrier iButton compares with other type’s smart card, can solve the electric power scene environment to be quite bad well, greasy dirt, dust, vibration, electromagnetism and so on disadvantage factor to its disturbance question. This article provides DS1990A and LPC2214 in the embedded real-time operating system μC/OSII connection’s software and hardware design, have promoted the application in the intelligent inspection machine. Along with correlation technique’s development, the iButton information recognition technology will be getting more and more widespread in industrial field’s application, its economical function can be getting bigger and bigger.