background image

 

RS-485 Connection 

 

The RS-485 standard supports half-duplex communication. This means that just two wires are needed to 
both transmit and receive data. Handshaking signals (such as RTS, Request To Send) are normally used 
to control the direction of the data flow. A special I/O circuit in the ADAM-4500 automatically senses the 
direction of the data flow and switches the transmission direction. No handshaking signals are necessary. 
This RS-485 control is completely transparent to the user.  
 
We recommend that shielded twisted-pair cables complying with the EIA RS-485 standard be used in the 
network to reduce interference. Only one set of twisted-pair cables is required to transmit both Data and 
RTS signals. We advise use of the following standard colors for the communication cables. 

 
 

DATA +  

 

Yellow 

DATA -   

 

Green 

 

 
 
Chapter 3  Programming and Downloading 

This chapter explains how to program applications and download programs into the ADAM-4500 
controller. Additionally, it points out limitations and concerns of which you should be aware. 

 

3.1 Programming 

 

The operating system of ADAM-4500 is ROM-DOS, an MS-DOS equivalent system. It allows users to run 
application programs written in assembly language as well as high level languages such as C or C++. 
However, there are limitations when running application programs in the ADAM-4500. In order to build 
successful applications, you should keep the following limitations and concerns in mind. 

 

Mini BIOS Functions 

 

The ADAM-4500 provides only two serial communication ports for connecting peripherals, so the mini 
BIOS of ADAM-4500 only provides 10 function calls. Since the user's program can not use other BIOS 
function calls, the ADAM-4500 may not work as intended. Additionally, certain language compilers such 
as QBASIC directly call BIOS functions that are not executable in ADAM-4500. The ADAM-4500 mini 
BIOS function calls are listed in the following table. 
 
Function Subfunction 

Task 

 

07h 

 

 

 

186 or greater co-processor esc instruct 

 

10h  

0eh  

TTY 

Clear 

output 

 

11h 

   Get 

equipment 

 

12h 

   Get 

memory 

size 

 

15h  

87h  

Extended 

memory 

read 

 

 

 

88h 

 

Extended memory size 

 

 

 

c0h 

 

PS/2 or AT style A20 Gate table 

 

16h 

 0  Read 

TTY 

char 

 

 

 

 

Get TTY status 

 

 

 

 

Get TTY flags 

 

18h 

 

 

 

Print "Failed to BOOT ROM-DOS" message 

 

19h 

   Reboot 

system 

 

1ah 

 0  Get 

tick 

count 

 

 

 

 

Set tick count 

 

 

 

 

Get real time clock 

 

 

 

 

Set real time clock 

 

 

 

4   Get 

date 

 

 

 

5   Set 

date 

 

1ch 

 

 

 

Timer tick 

 

 

 

Содержание ADAM-4500

Страница 1: ...ranslated or transmitted in any form or by any means without the prior written permission of Advantech Co Ltd Information provided in this manual is intended to be accurate and reliable However Advant...

Страница 2: ...nnection 9 RS 485 Connection 10 Chapter 3 Programming and Downloading 11 3 1 Programming 11 Mini BIOS functions 11 Converting Program Codes 11 Other limitations 12 Programming the Watchdog timer 12 In...

Страница 3: ...nterface via the jumper setting The COM2 port is dedicated as an RS 485 port This unique design makes the controller suitable for use in a variety of applications Built in Real time Clock and Watchdog...

Страница 4: ...Connector Plug in terminal block Transmission speed up to 115 2 Kbps Max transmission distance 1220 m 4000 feet Power Unregulated 10 to 30 VDC Protected against power reversal Power consumption 2 0 W...

Страница 5: ...1 4 System Diagram ADAM 4500 Figure 1 1 ADAM 4500 Diagram...

Страница 6: ...line before implementing it in your application 2 1 System Requirements to Setup ADAM 4500 The following list gives an overview of what is needed to setup install and configure an ADAM 4500 system AD...

Страница 7: ...Step 1 Review the requirements Before you power on the ADAM 4500 make sure you have a host computer a power supply and the utility software and download cable Step 2 Wiring the power cables and downl...

Страница 8: ...the ADAM 4500 communication controller When the file is executed the main screen appears as shown in figure 2 3 Figure 2 3 Main Screen Setup COM port First highlight the COMport option on the top bar...

Страница 9: ...shown in figure 2 5 will appear The ADAM 4500 system is successfully started up Figure 2 5 Emulating Screen of ADAM 4500 2 3 Jumper Setting We designed the ADAM 4500 with ease of use in mind It has th...

Страница 10: ...unication Wiring The ADAM 4500 offers two serial ports COM1 3F8 in RS 232 or RS 485 and COM2 2F8 in RS 485 COM1 can be configured as an RS 232 or as an RS 485 interface via the jumper setting This pro...

Страница 11: ...500 is ROM DOS an MS DOS equivalent system It allows users to run application programs written in assembly language as well as high level languages such as C or C However there are limitations when ru...

Страница 12: ...ROM space for downloading user applications An additional free 234 KB of SRAM is provided for operation of applications Programming the Watchdog Timer The ADAM 4500 is equipped with a watchdog timer f...

Страница 13: ...sk about 171 K 0xC0000 Start of ROM DOS about 48 K 0x40000 0xBFFFF No Use 0x00400 0x3FFFF SRAM area 0x00000 0x003FF System area 0x003F8 0x003FF COM1 0x002F8 0x002FF COM2 0x00070 0x00071 Real time cloc...

Страница 14: ...E into the flash ROM It is therefore critical that all the required files be available in directory ALLFILE when the utility software tries to install ALLFILE s contents on the ADAM 4500 s flash ROM D...

Страница 15: ...the utility software select terminal mode and press Alt T File transfer will begin and the screen shown in figure 3 4 will appear Figure 3 4 File Transferring Key in the specific directory and file n...

Страница 16: ...PC Load the converted application program and the files AUTOEXEC BAT COMMAND COM and CONFIG SYS into directory ALLFILE Execute the utility software to download the contents of ALLFILE into the ADAM 4...

Страница 17: ...ion the user must call this function to release the communication port before the user s program terminates Return Returns a 1 if command succeeds Return a 0 if it fails comm_open Syntax int comm_open...

Страница 18: ...COM1 or COM2 1 COM1 port 2 COM2 port Return Returns a 1 if command succeeds Returns a 0 if it fails comm_get_rec_datas Syntax int comm_get_rec_datas unsigned length unsigned char data unsigned char po...

Страница 19: ...gned char data Returns the received string contents User must first allocate a data buffer Use comm_int function call Before exiting program user must free this buffer Use comm_exit function call unsi...

Страница 20: ...book for the STARTECH 16C550 UART chip All registers are one byte in length Bit 0 is the least significant bit and bit 7 is the most significant bit The address of each register is specified as an off...

Страница 21: ...bit 1 Bit 1 Bit 0 Word length bits 0 0 5 0 1 6 1 0 7 1 1 8 bit 2 Number of stop bits bit 3 Parity enable bit 4 Even parity select bit 5 Stick parity bit 6 Set break bit 7 Divisor Latch Access Bit DLAB...

Страница 22: ...equipment is not used for a long time disconnect the equipment from mains to avoid being damaged by transient overvoltage 12 Never pour any liquid into opening this could cause fire or electrical sho...

Страница 23: ...geren Zeitraum nicht benutzt sollten Sie es vom Stromnetz trennen Somit wird im Falle einer berspannung eine Besch digung vermieden 12 Durch die L ftungs ffnungen d rfen niemals Gegenst nde oder Fl ss...

Отзывы: