ENGLISH 简体中文 日本語 한국어  


애플리케이션 노트  1063

Microcontroller Recognizes Addresses in RS-485 Systems

Abstract: Note describes a simple circuit to create an RS-485 slave data transceiver capable of recognizing its assigned address. Only three ICs are required, a microcontroller, a physically tiny UART and an RS-485 transceiver. Enabling software is provided.

One of many benefits of using the RS-485 data-interface standard, rather than RS-232, is its capability of implementing multi-drop networks. Such networks usually carry 9-bit data words, in which the ninth (parity) bit identifies each word as address or data.

One decision posed by small microcontrollers like IC1, which does not include a hardware universal asynchronous receiver-transmitter (UART), is whether to add an external-component UART or write your own UART in software. External UARTs once represented a large increase in board area, complexity, and price, and the ones available were usually an overkill for small µC applications. On the other hand, it may be difficult to spare the program memory and processor resources needed for a software UART. The program memory in IC1, for example, is only 1K × 14 bits of EEPROM. Available today is a third alternative-a low-cost external UART (IC2) that is also physically small. Use of this device liberates the program memory otherwise needed for a software UART.

An RS-485 bus can carry up to 256 transceiver modules of the type shown in Figure 1. IC3 is the RS-485 transceiver, and IC4 is a "µC supervisor" that holds the µC in reset until a valid supply voltage is present. The µC's assembly language program can be downloaded from Maxim's website.

Figure 1. RS-485 networks can accommodate as many as 256 slave transceivers. Adding a small UART (IC2) and µC (IC1) to the RS-485 transceiver (IC3) forms a slave data-transceiver module that responds to its own network address.
Figure 1. RS-485 networks can accommodate as many as 256 slave transceivers. Adding a small UART (IC2) and µC (IC1) to the RS-485 transceiver (IC3) forms a slave data-transceiver module that responds to its own network address.

The application shown is a slave-test configuration, but you can modify the code to accommodate any specific RS-485 address-recognition application. The circuit works as follows:

When an address is transmitted over the bus, IC2 in each slave module initiates a parity interrupt. IC1 in each module then reads all the data in its internal FIFO, locates the address word, and compares that address with its own address stored in the eight DIP switches. A match causes the slave to clear the interrupt and transmit (to the master) an ASCII "A" (HEX41) followed by its own address. If the slave module reads the FIFO contents without finding a match, it clears the current address-word interrupt and waits for the next one.

A similar version of this article appeared in the November 11, 2001 issue of EDN magazine.

We Want Your Feedback!


의견을 보내주세요!
위 내용이 도움이 되셨나요?
여러분의 의견을 기다립니다 — Maxim은 보내주신 정정이나 제안사항을 반영하고 있습니다. 이 페이지를 평가하고 의견을 보내주십시오.


자동 업데이트
관심있는 분야의 애플리케이션 노트가 나올 때 자동으로 업데이트 받고 싶으세요? 그렇다면 EE-Mail™을 신청하십시오.



추가 정보  APP 1063: May 01, 2002
MAX3088 페일 세이프, 고속 (10Mbps), 슬루율 제한 RS-485/RS-422 트랜시버 전체 데이터 시트
(PDF, 632kB)
무료 샘플
MAX3100 16핀 QSOP 패키지로 제공되는 SPI/MICROWIRE 호환 UART 전체 데이터 시트
(PDF, 360kB)
무료 샘플
 

다운로드, PDF 형식다운로드, PDF 형식 (38kB)
 AN1063, AN 1063, APP1063, Appnote1063, Appnote 1063


      개인정보보호 정책    법적 고지

      Copyright © 2008 by Maxim Integrated Products, Dallas Semiconductor