background image

 

Return: 

Returns a 1 if command succeeds. Returns a 0 if it fails. 
 

 
 
comm_get_rec_str 

 

Syntax: 

int comm_get_rec_str(unsigned char **data, unsigned char port) 
 

Function Description: 

This function call is employed to received string data. The function call returns a success flag if the 
communication port receives string data ( terminal character is 0x0d) . The function call returns a fail flag 
if the buffer of the communication port is empty.  
 

Parameter 

 

  Description 

unsigned 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).  

 

unsigned char port 

 

Specifies communication port (COM1 or COM2) 

 

 

 

 

1: COM1 port 

 

 

 

 

2: COM2 port 

 
Return: 

Returns a 1 if command succeeds. Returns a 0 if it fails. 
 

 
 
led_init 

 

Syntax: 

void led_init() 
 

Function Description: 

This function must be called to initialize the ADAM-4500's LED before a user's program can control the 
LED.  

 
 
led 

 

Syntax: 

void led(int type) 
 

Function Description: 

LED ON/OFF control 
 

Parameter 

 

  Description 

int 

type 

   0: 

LED 

OFF 

 

 

 

 

1: LED ON 

 

 
 
wdt_enable 

 

Syntax: 

wdt_enable() 

Содержание 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...

Отзывы: