Home
5083 User`s Manual
Contents
1. SizezTotal avail RAM f no space then error Alloc 100 bytes from top Do your stuff with ADR here Not enough space for allocation RAM space 10 20 30 assuming 32K RAM installed 40 50 60 SIZE SYS 3 SYS 2 70 IF SIZE 100 THEN 200 80 ADR SYS 3 100 90 100 110 END 200 PRINT 210 END Storing in RAM 22 PROGRAMMING EXAMPLES This section includes three examples saving and retrieving a variable a string and an array For more information please refer to the CAMBASIC IV Programming Guide Saving and Retrieving a Variable 10 POKE 200 A 1 Saves byte value into address 200 A byte is any number from 0 to 255 Words and floating point numbers also saved by using DPOKE 2 bytes and POKE 4 bytes 50 A PEEK 200 1 Retrieves a byte value Words and floating point numbers also retrieved by using DPEEK and PEEK Saving and Retrieving a String 100 POKE 300 A 1 Pokes string variable A to memory address 300 in segment 1 120 BS PEEKS 300 1 Retrieves a string at address 300 segment 1 Saving and Retrieving an Array A single dimensioned array may be stored and retrieved from RAM Refer tothe ARRAY statement and function in the CAMBASIC IV Programming Guide for additional information Storing in RAM 23 COMMANDS The following is a list of the CAMBASIC IV commands used with the RAM 5083 Memory Commands Comm
2. 39 Organization of Connectors amp Ports 39 IMPUS Outpub PORES irentsita raaa 40 Configuring the 82C55 Digital 1 0 Lines eeeee 40 Opto M odule Rack Interface ssssssssseeeeeeeeee 41 Interfacing to Switches amp Other Devices sse 42 COMMANA S xci Scc tehtoc ded A LUE 43 CHAPTER 8 ANALOG INPUTS 45 Maigea irauro gp T T 45 Connecting to the 5083 ien ue aaas 45 Initializing Analog Channels essen 46 Accessing Analog Data sss nennen 48 Measuring High Voltages ssssssseesenenenem emen 50 Converting Analog Measurements sssessseeeeeee 50 Measuring 4 20 mA Current Loops sseeeeene 51 CANN ALI Oe m EUNTES 52 Commands dite tec i ide t aac a e EE E nie 53 CHAPTER 9 ANALOG OUTPUT 55 dauige fauore 55 Sending Data to an Analog Output ssseeeeeees 55 CHAPTER 10 DISPLAY PORT 57 auge HlaU e 57 Connecting the Display to T arcsin 58 Ene 58 Usihigi 2 eio Race p NR 58 Connecting Display to a 5600 Digital 1 0 Card 59 Gotnmands eer e fed ped dde dus 60 CHAPTER 11 KEYPAD PORT ee 61 Maliges UfaUrs a UEM 61 Connecting the Keypad sese 62 USING JO trosa tud duteei tenia
3. 6 Make sure the 5083 is receiving power The power module voltage should be in the 5 0 25V range when measured at the connector pin B3 The power module ripple should be less than 50 mV 7 If you are using serial communications software other than PC SmartLINK and your test program does not work it is probably due to communication problems between the PC and the 5083 To verify that the 5083 is communicating with your PC a Connect an oscilloscope to J 1 pin 3 Press the reset switch on the 5083 A burst of signal activity that switches at least between 43V and 3V verifies that the 5083 is sending a signal b If you see the logon message but nothing else happens connect the oscilloscope to U7 pin 14 Press any key on the PC keyboard The signal should switch between 5V and ground If the signal does not switch between 5V and ground check J 1 pin 5 on the 5083 for a signal change of at least 3V If you cannot get a signal at J 1 pin 5 check your computer and make sure it is transmitting For communications packages other than PC SmartLINK please note The 5083 does not send a CTS signal to the host This line is tied high If your terminal or communications software requires other signals DCD DSR you may have to tie these signals to the appropriate levels You may be able to ignore these lines in software Installation 15 The 5083 does not recognize the RTS line from the host to pace communi
4. 2 Hold down the lt ALT gt key and type D for download 3 Type in the filename of the program to be downloaded 4 To view the program type LIST lt RETURN gt Installation 13 WHERE TO GO FROM HERE If you want to do this Turn to Add memory Chapter 3 Battery back memory Chapter 3 Save data to RAM Chapter 4 Save programs to EEPROM Chapter 5 Use autorun feature Chapter 5 Use serial ports Chapter 6 Use on card digital I O lines Chapter 7 Use analog inputs Chapter 8 Use analog output Chapter 9 Connect a display Chapter 10 Connect a keypad Chapter 11 Connect high current devices Chapter 12 Use the watchdog timer Chapter 13 Use a calendar clock Chapter 14 Connect interrupt devices Chapter 15 Use non standard communications software or equipment Appendix A Use a Micro PC expansion card The User Manual for that card TROUBLESHOOTING No Logon Message 1 Press lt ESC gt again 2 Check the power module make sure the power cord is properly connected between the power module and the power source 3 Check the serial parameters on your PC The default setting should be 9600 baud no parity 8 data bits 1 stop bit 4 Make sure the serial cable is properly connected between the 5083 and your PC or terminal Installation 14 5 Make sure the serial cable is working properly by perform ing a point to point check on the connectors Refer to Appendix B for corresponding connector signal and pin numbers
5. 62 USING 2 nir ere rn tri reete cre dr nine 62 Connecting the Keypad to a 5600 Digital 1 0 Card 63 Commands eee i poete etie rre fb n c d gd 64 CHAPTER 12 HIGH CURRENT PORTS 65 Waligeo Uladte E TED 65 Considerations for High Current Outputs ssss 65 CHAPTER 13 WATCHDOG TIMER 67 Watchdog Latch iscsi ie ie rra par ei aa 67 CHAPTER 14 CALENDAR CLOCK 69 DS 1216EM SmartWatch nicer iaaii 69 Commands E E E nennen nnne eene nennen nnn 70 CHAPTER 15 INTERRUPT HANDLING 71 dgiugoeD auio QM ES E E 71 Interrupt Generation acer rentre nete eei de ies 71 Programming Example iis ginari eene eene 71 COMMANGS me EE 72 APPENDIX A COMPONENTS nnn 73 Custom Communication Cable sssesseeeeee 73 Power MOGOULG cessa pesomag ases Erro seq a eed ERR Ea 73 Using Other Serial Communications Software ss 74 APPENDIX B TECHNICAL INFORMATION 77 SPOUT CAI OMS ic M PEE a EEA 77 Jumper Configurations ccce tenete renes 81 Connector PINGUS ccs Errare FERT XE iia anini 82 PC B sS PIl OUS unione ri te a aa 85 APPENDIX C ANALOG INPUT e 87 WARRANTY vi PREFACE This manual provides all the information required to install configure and operat
6. To save a program type LIST set up your communications program to receive a file then press RETURN The serial port COM1 J 1 does NOT use handshaking or control lines Set up serial communications software to transmit a file when downloading a program to the 5083 Non Octagon Components 76 Appendix B TECHNICAL DATA SPECIFICATIONS e CPU e Z80181 Z80 code compatible 9 216 MHz Memory e 29K CAMBASIC IV ROM e up to512K static RAM e up to 32K nonvolatile memory EEPROM 5083 Digital 1 0 The 5083 has 40 digital I O lines using one 82C55 chip and the CPU chip Twenty four of the I O lines are terminated with a 26 pin IDC connector The remaining 16 I O lines are terminated with I DC connectors for a keypad and display All lines have 10K pull up resistors Y ou can use an MPB 8 16 or 24 opto module rack by connect ing the rack to J 2 with a CMA 26 cable Drive Current 2 5 mA max per line sink or source TTL compatible Output Low Voltage 0 45V max at 2 5 mA 1V max at 12 mA opto rack compatible Output High Voltage 2 4V min Keypad Input J 6 Connector J 6 may be used with a 4x4 keypad It will also accept four switch contacts Debouncing and scanning are done with software commands Use Octagon KP 1 KP 2 16 or KP 3 keypad and cable O address is EOH Display Port J 7 Can be used with any LCD display with up to 80 characters 1 O address is E2H Serial Ports J 1 J 4 5 Th
7. pin PC serial connector COM J1 During program development COM 1 is used to establish the communications link between your PC and the 5083 When used for programming or with the INPUT statement COM 1 will only accept ASCII characters with values from 0 to 127 When used with the INKEY and COM functions it will also return ASCII data from 0 to 255 During run time COM1 can be used as a general purpose serial port However it does not support hardware handshaking Serial Ports 31 COM J4 COM2 can be used as a general purpose serial port It cannot be used to download or edit your programs It supports two hardware handshake lines CTS and RTS The BIT command can be used to monitor the logic levels of the CTS line and control the RTS line The following example demonstrates how to monitor the hand shake lines TO us 80 The following program refers to COM2 only 90 100 CTS BIT amp 82 5 COM2 CTS is bit 5 of port address amp 82 110 IF CTS lt gt 1 THEN 100 f not OK to send keep monitoring 120 130 Program continues when receiver is ready to accept character from COM2 140 150 GOSUB 1000 160 200 The following instruction sets COM2 RTS high 210 une 220 BIT amp 80 4 0 COM2 RTS is bit 4 of port address amp 80 300 The following instruction sets COM2 RTS low 310 320 BIT amp 80 4 1 COM2 RTS is bit 4 of port address amp 80 1000 Send character here COMS J5
8. signals into a range compatible with the LTC1290 Two of the companies are listed below Octagon offers the AIN 5B board that can house the special modules and provide an easy interface to any Octagon card containing an analog input section e Analog Devices Inc Industrial Products Division One Technology Way Norwood MA 02062 9106 800 426 2564 e Burr Brown Corporation 6730 S Tucson Blvd Tucson AZ 85706 800 548 6132 Appendix C 88 WARRANTY Octagon Systems Corporation Octagon warrants that its stan dard hardware products will be free from defects in materials and workmanship under normal use and service for the current established warranty period Octagon s obligation under this warranty shall not arise until Buyer returns the defective product freight prepaid to Octagon s facility or another specified location Octagon s only responsibility under this warranty is at its option to replace or repair free of charge any defective component part of such products LIMITATIONS ON WARRANTY The warranty set forth above does not extend to and shall not apply to 1 Products including software which have been repaired or altered by other than Octagon personnel unless Buyer has properly altered or repaired the products in accordance with procedures previously approved in writing by Octagon 2 Products which have been subject to power supply reversal misuse neglect accident or improper installation 3 Thedes
9. the power off nothing will happen Applying a 5V input toa CMOS card will cause the current to flow through the input and out the 5V power pin This current attempts to power up the card Most inputs are rated at 25 mA maximum When this is exceeded the chip may be damaged Failure on power up Even when there is not enough current to destroy an input described above the chip may be destroyed when the power to the card is applied This is due to the fact that the input current biases the IC so that it acts as a forward biased diode on power up This type of failure is typical on serial interface chips Using CMOS Circuitry 3 Serial and parallel Customers sometimes connect the serial and printer devices to the Micro PC while the power is off This can cause the failure mentioned in the above section Failure upon power up Even if they are connected with the Micro PC on there can be another failure mechanism Some serial and printer devices do not share the same power AC grounding The leakage can cause the serial or parallel signals to be 20 40V above the Micro PC ground thus damaging the ports as they are plugged in This would not be a problem if the ground pin is connected first but there is no guarantee of this Damage to the printer port chip will cause the serial ports to fail as they share the same chip Hot insertion Plugging cards into the card cage with the power on will usually not cause a problem Octagon urges
10. 10V and 5V The AOT statement is used to write data with CAMBASIC The output response time is 5 uS Digital 1 0 Port and Opto Rack Interface The 5083 has 40 I O lines to interface with logic devices switch inputs LEDs and drive an opto mounting rack The input and output levels are 0 5V logic compatible Eight of the digital 1 0 lines are also supported as an LCD display port while another eight lines are also supported as a keypad port The remaining 24 I O lines can be programmed as inputs or outputs in groups of four and eight Matrix Keypad Port This port directly supports all Octagon 16 position keypads The KEYPAD command in CAMBASIC IV automatically scans and debounces the keypad and interrupts the program when a key is pressed Overview 6 Display Port The display port interfaces to the LCD series displays The DISPLAY command in CAMBASIC IV supports LCD displays up to 80 characters at this port High Current Drivers The 5083 has eight high current outputs for driving LEDs lamps relays small motors etc Each line can switch DC loads up to 100 mA 50V COM1 COM2 and COMS Serial Ports Three programmable RS 232 serial ports are standard on the 5083 The baud rate parity length and number of stop bits are software programmable for all ports Watchdog Timer The watchdog timer is a fail safe against program crashes or processor lockups It times out every 1 2 seconds Autorun On Power up Autorun refe
11. 2 Install the DS 1216EM SmartWatch into socket U 14 with the index mark pointing towards the 5083 gold contact fingers 3 Install the EEPROM into the top of the SmartWatch 4 The SmartWatch is shipped with its internal oscillator turned off to maximize battery life Toturn it on type CONFIG CLOCK ON You need to do this only once 5 To test the clock type DATES 01 15 91 PRINT DATES 0 If the date prints out as shown below the dock is working properly 01 15 94 Calendar Clock 69 6 Y ou are now ready to set the time Use the TIME state ment as follows TIMES 11 23 45 To read the time type PRINT TIMES 0 NOTE Writing to the clock will not affect any information stored in the EEPROM COMMANDS The following is a list of the CAMBASIC IV commands for the calendar clock 5083 Calendar Clock Commands Command Function Reads sets date from calendar clock TIME Reads sets timer for calendar clock Calendar Clock 70 Chapter 15 INTERRUPT HANDLING INTRODUCTION The 5083 can be mounted in a passive backplane for use with external interrupt devices You can use a switch closure magnetic pick up or other device capable of switching between 45V and ground for external interrupt generation Refer to the following table for 5083 interrupt connections 5083 Interrupt Input Sources Edge Conn Pins INT2 4 High IRQ4 B24 INTERRU
12. 630 IF DCD lt gt 1 THEN 620 1000 Send character here NOTE For further information on the Zilog Z80181 processor please contact Zilog for the technical manual 4DC 2519 02 Serial Ports 33 CHANGING THE SERIAL PARAMETERS Autobaud on COM1 During program development when you power on the 5083 the system displays a nonsense message if the baud rate of your PC is not set to 9600 If you press the ESC key the autobaud feature automatically adjusts the baud rate to 300 1200 2400 4800 or 9600 and a communications link is established with your PC The autobaud feature also configures COM 2 to match the parameters of COM1 The serial parameters of COM3 are not affected by the autobaud feature CONFIG BAUD Command The default parameters for all ports are 9600 baud 8 data bits no parity and 1 stop bit The CONFIG BAUD command allows you to change these parameters to fit your application needs The following example shows a typical configuration 1 CONFIG BAUD a b c d a COM port b baud rate c of data amp stop bits d even odd parity 10 Configure COM 1 for 9600 baud 8 data bits no parity 2 stop bits 20 30 CONFIG BAUD 1 6 5 0 40 50 Configure COM2 for 2400 baud 7 data bits even parity 2 stop bits 60 70 CONFIG BAUD 2 4 3 0 80 100 Configure COM3 for 300 baud 7 data bits odd parity 1 stop bit 120 130 CONFIG BAUD 3 1 2 1 For further information please refer to the CAMBASIC IV Pro
13. 64 keypd type 30 ON KEYPADS GOSUB GETKEY Enable keypd task 100 MAI Idle loop 110 GOTO MAIN 200 GETKEY K ypd service routine 210 AS KEYPADS 0 Get key 220 PRINT AS Echo key pressed 230 RETUR Line 10 X specifies the address of port A Y specifies the status of Port A as an input or output If you are using a display Y should be zero If you are not using a display Y can be 1 or O input or output Line 20 The value 64 indicates that you are using a keypad larger than 4x4 This example is for a 64 key keypad X is the address of the port you are using When using the 5600 Digital I O Expansion Card the value for X depends upon the address of the port and connector you are using Please refer to the 5600 I O Expansion Card User s Manual for information on determining your 5600 port address COMMANDS The following is a list of the CAMBASIC IV commands for the keypad 5083 Keypad Commands Command Function CONFIG KEY PAD Sets keypad parameters KEYPAD 0 Returns the last key from the keypad port ON KEYPAD Enables keypad tasking SYS 12 Returns keypad string table address Keypad Port 64 Chapter 12 HIGH CURRENT PORTS INTRODUCTION The high current port can be used to drive relays LEDs solenoids and similar devices The port includes eight I O lines at J 2 on the 5083 These outputs switch load to ground If you do not u
14. In addition to CTS and RTS COM3 also supports DTR and DCD COM3 can also be configured for a baud rate of 19200 These special features make this serial port ideal for modem operations The following program is an example of how COM3 might be used in a typical application Serial Ports 32 TO uus 80 The following program refers to COM3 only 90 100 CTS BIT amp E8 5 COM3 CTS is bit 5 of port address amp E8 110 IF CTS lt gt 1 THEN 100 fnot OK to send keep monitoring 120 130 Program continues when receiver is ready to accept character from COM3 140 150 GOSUB 1000 160 200 The following instructions set COM3 RTS high 210 sa 220 OUT amp E8 5 Indicates access to Z80181 reg 5 230 OUT amp E8 0 COM3 RTS is bit 1 of Z80181 reg 5 300 The following instructions set COM3 RTS low 310 3x 320 OUT amp E8 5 Indicates access to Z80181 reg 5 330 OUT amp E8 2 COM3 RTS is bit 1 of Z80181 reg 5 400 The following instructions set COM3 DTR high 410 420 OUT amp E8 5 Indicates access to Z80181 reg 5 430 OUT amp E8 0 COM3 DTR is bit 7 of Z80181 reg 5 500 The following instructions set COM3 DTR low 510 4 520 OUT amp E8 5 Indicates access to Z80181 register 5 530 OUT amp E8 amp 80 COM3DTR is bit 7 of Z80181 reg 5 600 The following instructions monitor COM3 DCD line 610 620 DCD BIT amp E8 3 COM3 DCD is bit 3 of Z80181 reg 5
15. drops dramatically W Approximately 20 of the returned cards are problem free These cards typically have the wrong jumper settings or the customer has problems with the software This causes frustration for the customer and incurs a testing charge from Octagon m Of the remaining 80 of the cards 90 of these cards fail due to customer misuse and accident Customers often cannot pinpoint the cause of the misuse W Therefore 72 of the returned cards are damaged through some type of misuse Of the remaining 896 Octagon is unable to determine the cause of the failure and repairs these cards at no charge if they are under warranty The most common failures on CPU cards are over voltage of the power supply static discharge and damage to the serial and parallel ports On expansion cards the most common failures are static discharge over voltage of inputs over current of outputs and misuse of the CMOS circuitry with regards to power supply sequencing In the case of the video cards the most common failure is to miswire the card to the flat panel display Miswiring can damage both the card and an expensive display m Multiple component failures The chance of a random component failure is very rare since the average MTBF of an Octagon card is greater than 11 years In a 7 year study Using CMOS Circuitry 2 Octagon has never found a single case where multiple IC failures were not caused by misuse or accident It is very pro
16. gramming Guide Serial Ports 34 MULTIDROP COMMUNICATIONS NETWORK You can use your 5083 Microcontroller with a multidrop communi cation network by connecting COM2 or COM3 to the network with an MTB 485 converter The MTB 485 converts the serial port to RS 422 or RS 485 With the MTB 485 you can connect up to 32 units including one or more 5083 Microcontrollers PCs and other devices over a 4 000 foot range Figure 6 1 shows an example of a multidrop communications network The network includes a host and one or more devices The host transmits signals to all the devices in the network The signal includes an identifier as well as commands or data for one or more devices The signal is received by all devices and ignored by all devices except the one identified at the beginning of the signal The identified device will transmit any required response back to the host There are several different communication protocols which estab lish how to encode the device identity in the signal For example you might set up your protocol so that the host sends a message in this format 03C4A52237 The colon indicates that this is a message for everyone in the network the 03 specifies which device actually needs to hear the message and the rest of the information is the actual data or instructions You can also have an identifier such as 00 that identifies the message for all devices in the network Y ou can create your own protocol
17. manual for more technical specifications USING OTHER SERIAL COMMUNICATIONS SOFTWARE PC SmartLINK is a serial communications software packaged designed by Octagon It provides communications between a PC and other equipment If you are using a software package other than PC SmartLINK you may need to make some modifications before your serial communications will work Please note that although other packages may be successfully used they are not supported by Octagon Some issues and considerations e CAMBASIC IV is an incremental line compiler As you type in a line of your program for example 1000 IF A 3 then print A 3 CAMBASIC compiles that line into an intermediate code The time needed to compile the line depends on the complex ity of the statement and how many statements have already been compiled The longer and or more complex the pro gram the longer it takes to compile It also takes longer to download a program that is replacing an existing program CAMBASIC must finish compiling one line before beginning the next line When the line has been compiled CAMBASIC sends a pacing prompt the gt character which is recog nized by PC SmartLINK When PC SmartLINK detects the pacing prompt it sends the next line of code to CAMBASIC Non Octagon Components 74 CAMBASIC uses the carriage return line feed sequence followed by the gt as the pacing prompt Y our communications program should wait for
18. signal A properly sized filter capacitor will cut off high frequencies that can cause inaccurate readings The filter capacitor should be a monolithic ceramic type and one should be placed on each input of the differ ential channels The dielectric characteristics should be of NPO or CGO grade The lead spacing of the capacitors should be 0 1 in The ideal size for the capacitors will depend upon your specific application J ust for purposes of discussion let s talk about a 1000 pf capacitor If your source output resistance is 50 ohms or less the cut off frequency of the filter would be approximately 300 kHz If your source output resistance is in the 500 ohm range the cut off frequency of the filter would be approximately 140 kHz In summary the optional input capacitors are intended to be used only on channels using the differential mode The filter capacitors should be installed on both the plus and minus inputs Channels Appendix C 87 that are programmed for the single ended mode do not require the filter capacitors Signal Conditioning Devices such as RTDs and thermocouples generate signal levels that can not be read directly by the LTC1290 A thermocouple for example will typically generate an output signal in the millivolt range The LTC1290 expects an input voltage range of either 0 5 volts or 5 volts There are several companies that provide analog signal conditioning modules that will convert low level
19. the minimum and maximum voltages that could be read using this voltage range 1V to 45V Readings from a 4 20 mA loop can be converted to engineering units of measurement by performing scaling calculations in your program Analog Inputs 51 K is the scaling constant The formula for determining the value of K is similar to that described earlier except the count range changes Since the measurement range is 1 to 5V the count range is reduced by 2096 to 3277 K 5 3277 K 0015258 There is an additional factor that needs to be introduced Since the lowest value that can be read in our example is 1V this offset must be subtracted from all readings This offset is computed by subtracting the range count of the A D converter by its reduced amount which is the effective range offset count range new count range offset 4096 3277 offset 819 The program line then becomes variable 0061 AIN 1 819 NOTE f the current loop line breaks the system returns a negative value CALIBRATION The A D converter can be calibrated using the 5083 internal voltage reference or an external voltage reference For 12 bit accuracy you must use a voltmeter with an accuracy of 0 0296 or better To calibrate 1 Connect the digital voltmeter ground lead to the cathode side of D1 2 Connect the digital voltmeter lead to the test point TP1 at the upper right hand corner 3 Adjust trim pot R7 for 5 000 VDC Analo
20. 0 D BIT 1 2 Status of the switch is returned in the variable D as a zero closed or a one open Digital 1 O Lines 42 COMMANDS The following is a list of the CAMBASIC IV commands used for digital I O 5083 Digital I O Commands Command Function BIT Function returns status of bit at I O address BIT Statement sets a bit to 0 or 1 at an I O address CONFIG PIO Initializes 82C55 drivers CONFIG COUNT Configures an I O line for counter input CONFIG FREQ Sets the I O address of the frequency inputs CONFIG TIMER Configures an I O line for a timed output DINP Returns 16 bit value from I O DOUT Writes 16 bit value to I O INP Returns a byte from I O ON BIT Declares I O line to monitor logic level ON INP Causes interrupt when preset input pattern is detected our Writes a byte to I O Digital 1 O Lines 43 This page intentionally left blank Digital I O Lines 44 CHAPTER 8 ANALOG INPUTS INTRODUCTION The 5083 has eight analog input channels that are programmable as single ended or differential with 0 5V or 4 5V ranges The resolution is 12 bits on both ranges A precision reference is induded These channels can be used to measure voltages from transducers 4 20 mA current loops thermistors etc Conversion time is 130 uS 500 uS in CAMBASIC The input impedance is 1 Mohm Voltages as high as 4 16V will not damage the converter The inputs are terminated with a 20 pi
21. 0 DIM F 1000 30 FOR X 0 TO 999 40 F X AIN 0 50 NEXT Datalogging on a Timer Tick Some applications require that a set of analog data be logged at fixed intervals The ON TICK construct can be used to log data at intervals from 0 01 to 655 35 seconds The program below logs 800 analog samples 100 per channel The interval between sampling is one second 10 DIM F 800 20 ON TICK 1 GOSUB 50 30 This is a dummy loop 40 GOTO 30 50 FOR X 0 TO 7 60 F I AIN X 65 INC I 70 NEXT 75 IF I 800 THEN ON TICK 1 GOSUB 80 RETURN F 0 to F 7 will contain the analog data for the first sampling of the eight channels F 8 to F 15 will contain the second sampling and soforth In line 75 the ON TICK interrupts are shut off when 800 Refer to the CAMBASIC IV Programming Guide for more information on the ON TICK and related statements Analog Inputs 49 MEASURING HIGH VOLTAGES Voltage ranges higher than 5V can be measured by placing a resistor in series with the input Analog Input Voltages Input Voltage Resistor 5 0 6 200 KQ 10 1 0 Ma 12 5 15 Mo 24 3 8 Mo If you have a voltage range other than that listed above use the following formula to determine the series resistance Rs Vi x 200 000 1 000 000 Rs is the resistor value in ohms in series with the input Vi is the maximum input voltage NOTE If the result of your calculation is negative or zero a series resistor is not n
22. 1 O write Serial EEPROM data out 50H 5FH I O read DAC output 60H 7FHH Z80181 I nternal 80H BFH 6 Keypad Eo 7 Display E2H Expansion 100H 3F FH 1EOH 1EFH Reserved 2EOH 2EFH Reserved 3E0H 3EFH Reserved Technical Data 80 JUMPER CONFIGURATIONS 5083 User Device Select W1 29C256 EEPROM Pins umpered 3 4 5 6 27C256 EPROM 3 4 5 6 default NOTE The on card EEPROM programmer cannot be used with a 27C256 The EPROM must be programmed off card and then installed in U 14 on the 5083 5083 Autorun Select W1 Pins J umpered Function 1 2F Autorun enabled Not jumpered Autorun disabled default 5083 RAM Select W3 RAM Size 32K 128K Pins J umpered 2 3 1 2 512K default 5083 Watchdog Timer Command Toenable OUT amp 40 1 To disable OUT amp 40 0 To strobe OUT amp 50 0 Technical Data 81 CONNECTOR PINOUTS 5083 COMI 2 3 serial ports J 1 4 J 5 ye fm je e crs 6 m e e DTR 7 In e o fe fm Gnd 9 Out e e e 45V 10 Out e e e Technical Data 82 5083 Digital 1 O J 2 P Port B high Line1 21 8 16 ue fa a os Line3 25 6 17 Linea 24 1 14 Lines 22 3 11 Lines 20 5 12 Line7 18 7 9 V Pin2 Gnd Pin 26 50
23. 5083 User s Manual Doc 03282 Rev 0106 OCTAGON SYSTEMS CORPORATION 9 6510 W 91st Ave Westminster CO 80030 Tech Support 303 426 4521 COPYRIGHT Copyright 1990 95 2006 Octagon Systems Corporation All rights reserved However any part of this document may be reproduced provided that Octagon Systems Corporation is cited as the source The contents of this manual and the specifications herein may change without notice TRADEMARKS Micro PC PC SmartLink Octagon Systems Corporation the Octagon logo and the Micro PC logo are trademarks of Octagon Systems Corporation QuickBASICG is a registered trademark of Microsoft Corporation ROM DOS is a trademark of Datalight SmartSocket and SmartWatch are trademarks of Dallas Semiconductor IBM PC is a register trademark of IBM Corpora tion NOTICE TO USER The information contained in this manual is believed to be correct However Octagon assumes no responsibility for any of the circuits described herein conveys no license under any patent or other right and makes no representations that the circuits are free from patent infringement Octagon makes no representation or war ranty that such applications will be suitable for the use specified without further testing or modification Octagon Systems Corporation general policy does not recommend the use of its products in life support applications where the failure or malfunction of a component may directly t
24. 83 Keypad Port J 6 Function Gnd 10 Column 1 6 Column 2 3 Column 3 2 Column 4 7 Technical Data 83 Function 45V Gnd Data 4 Contrast Data 6 Data 5 nc Inc nc Inc Data 0 Data 3 Data 2 Data 1 5083 Display Port J 7 10 11 12 13 14 Technical Data 84 PC BUS PINOUTS Microcontroller Side A Pin Description A1 1 0 CH CK NMI Al7 A14 Not used A2 D7 1 0 A18 A13 Not used A3 D6 1 0 A19 A12 Not used A4 D5 1 0 A20 All Not used A5 D4 1 0 A21 A10 Not used A6 D3 1 0 A22 AQ O A7 D2 1 0 A23 A8 0 A8 D1 1 0 A24 A7 O a9 DO 1 0 a25 A6 0 a10 1 0 CH RDY l A26 A5 0 A11 AEN Gnd A27 A4 0 A12 A19 Not used A28 A3 O a13 A18 Not used A29 A2 0 A14 A17 Not used A30 Al O Ais A16 Not used 31 AO O A16 A15 Not used active low Technical Data 85 Microcontroller Side B Bl GND B2 RESET B3 45V B4 IRQ2 B5 5V B6 DRQ2 B7 12V B8 Reserved B9 12V B10 Analog Gnd B11 MEMW B12 MEMR B13 low B14 IOR B15 DACK3 B16 DRQ3 O B17 O B18 l B19 l B20 Not used B21 Not used B22 Not used B23 Not used B24 l B25 Not used B26 Not used B27 Not used B28 O B29 o e Not used B31 Not used DACKI DRQ1 DACKO CLOCK IRQ7 IRQ6 I
25. 9 amp 11 13 amp 15 fna o cus 11 cne s cH7 15 Daco 17 Inc o Inc input is specified as 1 for single ended and 0 for differential polarity is specified as 1 for a 0 to 5V range and 0 for 5V range Analog Inputs 46 Below are examples of the CONFIG AIN command Single ended mode 0 to 45V input range CONFIG AIN chan 1 1 The result from the AIN function will be zero for 0 000V and 4095 for a 44 9988V chan may range from 0 7 Differential mode 0 to 45V input range CONFIG AIN chan 0 1 Either input may range from 0 to 5V However if the input is more positive than the input the result will always be zero The result from the AIN function will be zero for a difference of 0 000V and 4095 for a difference of 4 9988V chan can be O 2 4 or 6 e Single ended mode 4 5V input range CONFIG AIN chan 1 0 The result from the AIN function will be zero for 5 000V 2048 for 0 000V and 4095 for 4 9988V Differential mode 5V input range CONFIG AIN chan 0 0 The result will be the difference of the two readings The result from the AIN function will be zero for a difference of 5 000V 2048 for a difference of 0 000V and 4095 for a difference of 4 9988V Analog Inputs 47 ACCESSING ANALOG DATA Once the system has been initialized analog data can be accessed using the AIN function S AIN channel This command will assign the analog value of a specified cha
26. C Motherboard Card Edge Pins A1 A1 amp B1 Figure 2 2 Edge Connector Orientation To install the 5083 in the card cage 1 Turn power module or supply off 2 Slide the 5083 into the card cage The components will face left or up depending on the type of card cage 3 Push firmly into the backplane socket 4 The serial cable VTC 9F for the 5083 has a 10 pin IDC connector on the 5083 end and a connector that is compat ible with the PC you are using on the other end Plug the 10 pin connector on the cable into COM 1 J 1 on the 5083 Please refer to Creating a Custom Communications Cable in Appendix A if you are making your own serial cable B Plug the other end of the serial cable into COM 1 of your PC If your PC has only one serial port it is probably COMI If you have two serial ports check your computer manual to see which is COMI If you are already using COM 1 you can use COM2 See the PC SmartLINK Manual for informa tion on using COM2 instead of COM 1 Installation 11 10 11 Copy PC SmartLINK onto your hard drive and type SL RETURN Turn on your power module If the baud rate of your PC is set to 9600 the following message appears on your screen Press lt ESC gt If the baud rate of your PC is not set to 9600 a nonsense message appears instead Ignore the nonsense message and continue with the next step Press the ESC key The system will automatically ad
27. C IV Programming Guide for more specific information Knowing the status helps to determine if there are any characters in the buffers or if a communication error has occurred It is important to check for communication errors especially if you are using the ON COM tasking statement This ensures the integrity of the string that generated the interrupt Serial Ports 37 that is whether the interrupt was generated because the string was transmitted properly or because there was a communications error COMMANDS The following is a list of the CAMBASIC IV commands used for serial I O functions Command CLEAR COM CLS COM CONFIG BAUD conic COM INKEYS INPUT uist on COM PRINT PRINT PRINTS TAB 5083 Serial 1 O Commands Function Resets serial input buffer Clears screen Returns string from autobuffer Sets serial port parameters baud rate start and stop bits parity and data length Sets serial input buffer Returns character from serial buffer Receives data from serial port Outputs program listing Enables serial tasking Outputs data through serial ports Prints formatted strings or number Prints list of numbers as characters Tabs to specified position Serial Ports 38 Chapter 7 DIGITAL I O LINES INTRODUCTION Digital I O lines can be used to interface with opto module racks operate switches turn on low current LEDs and interface with
28. M Y ou can set up your system to autorun your program or series of programs When autorun is on the program in the EEPROM is loaded into RAM and begins to execute immediately on power up You can also link multiple programs so that the first program to run calls the second which calls the third which calls the fourth The EEPROM is write protected with a software lock so accidental writes on power on or off are almost impossible You cannot disable or overwrite the lock except when executing the SAVE command This means you cannot POKE data into the EEP ROM CONFIGURING THE EEPROM Before the EEPROM can be used to save programs jumper block W1 must be configured for the autorun enable option This is the factory default setting Storing in EEPROM 25 5083 Autorun Select W1 Pins umpered Function 1 2F Autorun enabled Not jumpered Autorun disabled default Next the EEPROM must be configured using the CONFIG SSD command This command configures the EEPROM for either one 32K program type 0 or four 8K programs type 1 It is executed only when you install a new EEPROM or want to change the configuration of an existing EEPROM To configure the EEPROM enter CONFIG SSD type Type refers to the size of EEPROM and the number and size of files stored there Refer to the CAMBASIC IV Programming Guide for additional information WARNING CONFIG SSD erases the EEPROM Any pro grams
29. MBASIC suspends operation until you enter the terminator character carriage return If the buffer fills 256 bytes and you have not entered a carriage return all subsequent characters will be discarded Whether this will be a problem depends on your particular application INKEYS Function Characters may be removed one at a time with this function A null string is returned when the buffer is empty In this mode you have access to the full 256 bytes If you don t read the buffer and the buffer fills all subsequent characters will be discarded The INKEYS funcion may be used anywhere in the program ON COMS Multitasking Statement Characters are automatically buffered until a termination condi tion which you specify is reached The program will then jump to a subroutine that removes the entire string from the buffer In this mode you have access to only 128 of the 256 bytes at a time If the number of characters in the buffer reaches 128 before meeting your termination conditions the program will still jump to the subroutine If you don t read the buffer and the buffer fills to 256 characters all subsequent characters will be discarded The advantage of this method is that the whole string is captured without halting program execution Refer to the Multitasking Chapter in the CAMBASIC IV Programming Guidefor more information COM1 AND COM2 PORT STATUS Use the SYS command to check the status of the COM port Refer to the CAMBASI
30. ON CABLE The 5083 requires an RS 232 serial communications cable to interface to the PC If you are not using a VTC series cable you can make your own communications cable 1 Determine if your PC requires a male or female connector 2 Refer to the following table for cable connections needed with the 5083 5083 Custom Communication Cable 3 TxD Transmitted data 3 3 5 RxD Received data 2 2 POWER MODULE The 5083 needs a 5V power module which is generally purchased and installed with your card cage If you are not using the Octagon power module you can use any well regulated power module that can furnish at least 200 mA Power module voltage should be in the 5 4 0 25V range when measured at the connector pins Ripple should be less than 50 mV If you are using a switching power module excessive high frequency noise may cause erratic operation The noise plus the power module voltage must not vary outside the 5V 0 25V range Non Octagon Components 73 To use your power module with the 5083 Control Card Connect the negative lead from your power module to the terminal marked DG on the backplane Connect the 5 lead to the terminal marked 5 The leads should be no longer than 18 inches and must be 18 gauge or larger Please note that with some expansion cards for example the 5700 12 bit Analog Input Card you will need 12 volts power module Refer to the expansion card s user s
31. PORT The 5083 has a dedicated LCD display port J 7 with built in contrast control Supported displays range in size from two lines by 20 characters to four lines by 20 characters WARNING The Display port lines are unbuffered and connect directly to the microcontroller chip Z80181 Care should be taken to avoid static discharge as this could damage the processor LCD or DP Series Displays N LCD DP IFB a a P di CMA 26 24 rd OR N Ribbon Cable Sl k Es ES Figure 10 1 Display Configurations Display Port 57 t J2 5083 Micro controller 5083 Micro controller 5600 Digital O CONNECTING A DISPLAY UsingJ 7 The most common configuration uses connector J 7 which is configured as an output and directly supports an LCD display If you don t use these lines to connect your display you can use them as general purpose digital I O lines 1 Connect one end of the display cable included with your display to the display 2 Connect the other end of the cable to J 7 on the 5083 3 You are now ready to initialize the display The example below is for a 4x20 LCD display Notice that all DISPLAY statements end with a semicolon so that a carriage return line feed is not sent 10 CONFIG DISPLAY amp E2 6 0 Config display port 20 AS OCTAGON S BUILT IN Build display strings 30 BS DISPLAY PORT IS 40 C EASY TO USE 50 DISPLAY 0 1 A Display strin
32. PT GENERATION An interrupt is generated when a logic signal level on an interrupt input switch goes high for 10 uS If you indude an ON ITR n GOSUB label command in your program it will branch to the subroutine label when the interrupt is generated The subroutine designated by this command is executed after the current CAMBASIC IV statement completes execution The average latency is about 0 5 mS PROGRAMMING EXAMPLE The following programming example shows how to set up the interrupt and service routine When the IRQ3 line goes high the interrupt service routine is executed and the message Door Open is printed Interrupt Handling 71 20 ON ITR 3 GOSUB 500 Sets interrupt for line 500 your program continues 500 interrupt routine here 510 PRINT Door Open 520 DR 1 Sets flag to signal door open 530 RETURN ITR 3 Ret from interrupt routine to normal program flow COMMANDS The following is a list of the CAMBASIC IV commands used for interrupt functions 5083 Interrupt Commands Command Function ON ITR Enables a program branch on an interrupt RETURN ITR Re enables an interrupt and returns program control Interrupt Handling 72 Appendix A COMPONENTS This appendix contains information which may be helpful to you if you are using non Octagon components with your 5083 Microcon troller For additional information please refer to the user manuals supplied with your equipment CUSTOM COMMUNICATI
33. RQ5 IRQ4 IRQ3 DACK2 T C ALE Aux 45V OSC Aux Gnd Not used Not used Not used O Not used Not used Not used l l Not used Not used Not used Not used Not used active low Technical Data 86 APPENDIX C ANALOG INPUT ANALOG INPUT The analog input circuitry includes the LTC1290 I C from the Linear Technology corporation Ph 408 432 1900 The LTC1290 contains a serial I O successive approximation A D converter The chip s 8 channel input multiplexer can be configured for either single ended or differential inputs or combinations thereof For input protection we have added current limiting resisters and a diode clamp array to the circuit In addition you can install capacitors in the circuit for implementing a low pass filter to reduce noise Differential Mode Option The use of the differential input mode is useful when the signal source transmits both a plus and a minus signal If you are reading signals generated from strain gauges pressure transduc ers or any device that generates a differential output you can use the differential mode Input Filter Capacitors It is very important that the signals especially the minus signal remain as stable as possible when using the differential mode If a signal is noisy or varies in level the resulting conversion data will be in error It is possible to add filtering capacitors that help reduce the effect of any extraneous noise on the
34. a gt character at the beginning of each line otherwise you will lose charac ters when the program gets too big To upload a program transfer it from the 5083 RAM to your PC your PC needs to receive a file Refer to your communi cations software documentation for details The 5083 Microcontroller sends out a clear screen com mand on power up or reset This command is essentially an escape sequence that dears the screen You may see the symbol lt on your screen in response to the command Ignore the symbol It will not affect any other aspect of your system If your communications setup runs at a baud rate other than 9600 you will get a nonsense message when you power up Ignore the nonsense message and the symbol lt if it appears and press the E SC key the logon message should appear See Chapter 2 for more information CAMBASIC IV sends out escape sequences to control functions on your PC If you are not using PC SmartLINK you may get unpredictable results on your software package or terminal If you are having problems turn off the escape sequences while in CAMBASIC IV by typing CONFIG TERM 1 The CLS command sends out an lt ESC gt which may appear as on your screen Non Octagon Components 75 Saving and loading CAMBASIC IV programs using another communications program depends upon its command set Usually you must setup your communications program to receive or transmit a file
35. am from the EEPROM enter DEL filename RUNNING A PROGRAM FROM EEPROM Torun a program from the EEPROM enter RUN filename The file will load from the EEPROM to RAM and execute immedi ately It has the same effect as entering LOAD filename and then entering RUN SERIAL EEPROM The 5083 has a serial EEPROM located at U 18 You can save up to 128 bytes of data to the serial EEPROM using the SAVE command This command copies 128 bytes of data starting from amp 8000 in memory into the serial EEPROM To store your data enter SAVE amp 8000 The LOAD command copies 128 bytes of data from the serial EEPROM into memory starting at location amp 8000 To load data into RAM enter LOAD amp 8000 AUTOMATIC PROGRAM EXECUTION ON POWER UP Your 5083 Microcontroller is shipped with autorun configured as the default setting On power up CAMBASIC IV checks the contents of the files in the solid state disk SSD If the first four Storing in EEPROM 28 letters of the first file are BOOT it will load the file into RAM and run the program It ignores any other part of the filename For example any one of the following will autoexecute if it is the first program stored on the SSD BOOT BOOT PUMP2 BOOT 12 1 90 The following files will not autoexecute BOOM ABOOT 12BOOT During program development give your autoexecute file any name then RENAME it to BOOT when it comes to run time To auto
36. ammed as one group of 8 lines or two groups of 4 lines as all inputs or all outputs The 82C55 has three ports with eight parallel I O lines bits per port Each port has a unique I O address Port A and Port B can be programmed as all inputs or all outputs Port C can be pro grammed in one group of eight lines all inputs or all outputs or as two groups of four lines upper and lower C The four lines in upper or lower C can each be programmed as all inputs or all outputs When a line is configured as an output it can sink a maximum of 2 5 mA at 0 4V and can source over 2 5 mA at 2 4V When driving opto modules the output can sink 15 mA at 1 0V The keypad and display ports can also be used as general purpose digital 1 0 lines CONFIGURING THE 82C55 DIGITAL I O LINES On power up or reset all ports are inputs Use the CONFIG PIO command to reconfigure I O lines The following programs demon strate typical configurations Digital 1 O Lines 40 Example 1 J 2 Digital 1 0 10 Connect an 8 16 or 24 position opto rack toJ 2 30 CONFIG PIO 0 1 1 1 0 1 Configures lower port C for outputs all others for inputs 100 OUT 2 3 Outputs a 3 to lower port C 110 B INP 0 Gets status from port A Example 2 J 2 Digital 1 0 10 Connect a STB 26 to J 2 30 CONFIG PIO 0 0 0 1 1 Configures 82C55 ports A amp B as low outputs C as all inputs 40 Perform other initialization routines 100 OUT 0 1 S
37. amming Examples 5 cemere 23 Saving amp Retrieving a Variable sess 23 Saving amp Retrieving a String 23 Saving amp Retrieving an Array sseeeeee 23 Comwmnands ideni eden eec teer eer ee dh oa 24 CHAPTER 5 STORING IN EEPROM 25 litr od t iO p meena 25 Configuring the EEPROM 3 pee aree a pg 25 Saving a Program in EEPROM enr tier tte e 26 Loading Programs to RAM sisirin rete aa 27 Renaming a Program in the EEPROM eene 27 Deleting a Program From EEPROM eem 28 Running a Program From EEPROM eene 28 Automatic Program Execution sssrinin 28 Preventing AUTORUN iiec ci rerit rr cn Rd Rie 30 COMMANGS ooa eR Gp bep ERIS 30 CHAPTER 6 SERIAL PORTS 31 litr OAU O disap EIE 31 COMI J 31 COM2 ic anmeiePPORIDPIDBIOII MUI EN ct IEEE 32 e EIL 32 Changing the Serial Parameters sssssssssseeeee 34 Autobaud on COM iieri eet rude eu 34 CONFIG BAUD Command eee 34 Multidrop Communications Network eene 35 Accessing COM 1 COM2 and COM3 Input Buffers 36 COMI and COM2 Port Status ier eite cens 38 Comltnatds xr cette dette IC ELLE 38 CHAPTER 7 DIGITAL I O LINES 39 litr odU ION Mee
38. and Function Save or return a value from extended memory The PEEK and POKE commands save and retrieve byte values DPEEK Returns 16 bit value from memory DPOKE Writes 16 bit value to memory address PEEK Returns string from memory PEEK Returns floating point number from memory POKE Writes byte into memory location POKE Sends string to memory address POKE Stores data in memory Storing in RAM 24 Chapter 5 STORING IN EEPROM INTRODUCTION Programs are stored in the EEPROM which is installed in socket U14 You can store one program with a maximum size of 32K if you are using a 32K EEPROM or you can store up to four pro grams each with a maximum size of 8K Refer to the CONFIG SSD command in the CAMBASIC IV Programming Guide for storage options The 5083 Microcontroller is shipped with a 32K EEPROM in socket U14 The EEPROM is nonvolatile retains memory even when power is disconnected has an unlimited number of read cycles and each memory location can be written to more than 10 000 times Programs are not run from EEPROM Instead the program is downloaded to RAM in socket U15 Programs in RAM can be run or modified then uploaded to either your PC or the EEPROM This chapter indudes directions for loading and storing your program in the EEPROM Please refer to Chapter 2 for information on transferring programs between RAM and your PC and to Chapter 4 for more on storing information in RA
39. apt to baud rates of 300 1200 2400 4800 or 9600 and display a logon message showing the current version of CAMBASIC IV and the amount of free memory available CAMBASIC IV tm c 1985 92 Octagon Systems Corporation Vxx X All rights reserved Bytes free 33518 If you don t get the proper logon message refer to the Troubleshooting section at the end of this chapter The system is now in immediate mode and is ready for you to start programming with CAMBASIC IV Type the following test program 10 FOR X 0 TO 2 20 PRINT Hello 30 NEXT 40 PRINT Now type RUN Installation 12 The system will display Hello Hello Hello UPLOADING amp DOWNLOADING PROGRAMS Downloading programs means transferring them from your PC to RAM on your 5083 Uploading means transferring them from RAM on the 5083 back tothe PC This section explains how to do both of these procedures if you are using PC SmartLINK Please refer to Appendix A if you are using other communications soft ware Uploading Your Program In the previous section you created a test program on the 5083 To upload that program and save it to the disk on your PC 1 Start PC SmartLINK on your PC 2 Hold down the lt ALT gt key and type U for upload 3 Type in the filename of the program to be uploaded Downloading Your Program Totransfer a program from the hard drive on your PC back to the 5082 1 Start PC SmartLINK on your PC
40. bable that multiple component failures indicate that they were user induced Testing dead cards For a card that is completely nonfunctional there is a simple test to determine accidental over voltage reverse voltage or other forced current situations Unplug the card from the bus and remove all cables Using an ordinary digital ohmmeter on the 2 000 ohm scale measure the resistance between power and ground Record this number Reverse the ohmmeter leads and measure the resistance again If the ratio of the resistances is 2 1 or greater fault conditions most likely have occurred A common cause is miswiring the power supply Improper power causes catastrophic failure f a card has had reverse polarity or high voltage applied replacing a failed component is not an adequate fix Other components probably have been partially damaged or a failure mechanism has been induced Therefore a failure will probably occur in the future For such cards Octagon highly recommends that these cards be replaced Other over voltage symptoms In over voltage situations the programmable logic devices EPROMs and CPU chips usually fail in this order The failed device may be hot to the touch It is usually the case that only one IC will be overheated at a time Power sequencing The major failure of I O chips is caused by the external application of input voltage while the Micro PC power is off If you apply 5V to the input of a TTL chip with
41. but it must be consistent throughout the network For example you could use the symbol gt instead of the colon To receive a string use the CAMBASIC IV commands CONFIG COM and ON COM The device will generate an ON COM interrupt when it receives a string from the host You may want to use the LEFT function to capture the first three characters and to determine if those characters of the string match the particular device s address essentially parsing out the command If the first three characters match the device then the software parses the next character determines what it means moves to the next character and so on Serial Ports 35 The MTB 485 automatically turns the transmitter on and off For more information on the MTB 485 please refer to the MTB 485 Product Sheet 5083 Microcon troller Micro PC Control with PC 485 card with RS 485 card with RS 485 interface with RS 485 interface Printer Figure 6 1 Multidrop Communications Network ACCESSING COM1 COM2 AND COM3 INPUT BUFFERS CAMBASIC IV supports three different methods of reading the input buffers The following are examples of each method You may need to consult the CAMBASIC IV Programming Guide for more information Serial Ports 36 INPUT Statement This removes all characters in the buffer up to the terminator character and puts them into a CAMBASIC IV variable When you use the INPUT statement CA
42. c system configuration With this configuration you can e Use your PC s editor or word processor to write your program e Download the program to the 5083 e Edit and alter the program on the 5083 e Save the program back to disk or to on board EEPROM CAMBASIC IV an operating system and compiler designed specifically for control and data acquisition applications is in duded as part of your 5083 Microcontroller You do not need any other software to run programs on the 5083 You will need communications software such as PC SmartLINK to link your PC to the 5083 card 5083 Microcontroller card cage and power module Figure 1 1 Basic System Configuration Overview 5 MAJOR FEATURES Resident CAMBASIC IV Software The 5083 indudes CAMBASIC IV software for program develop ment This software is designed for developing control and data acquisition programs Its syntax is very similar to Microsoft BASIC Industrial command extensions have been added to help you interface with both built in and external real time hardware Programmable Analog Inputs Eight input channels are programmable as single ended or differ ential with 0 5V or 4 5V ranges The resolution is 12 bits on both ranges Conversion time is 130 uS 500 uS in CAMBASIC The AIN function does the A D conversion and returns the result to CAMBASIC High Resolution Analog Output There is one channel of 12 bit analog output The ranges are 0 5V 0
43. cations This is important if your terminal s communications become garbled or otherwise unreadable Most often this happens because the 5083 is continually sending out data and the receiving unit cannot handle all of it Please refer to Using Other Serial Communications Software in Appendix A for additional information Installation 16 Chapter 3 ADDING MEMORY INTRODUCTION The 5083 Microcontroller is shipped with a 128K static RAM and a 32K EEPROM in sockets U 15 and U 14 respectively This chapter describes these memory chips and how to add memory to the 5083 card To store information in RAM please see Chapter 4 To store programs in the EEPROM or to autorun programs see Chapter 5 TYPES OF MEMORY You can use 32K 128K or 512K RAM in your 5083 Microcontroller The RAM chip you select is installed in socket U15 RAM is used to temporarily store data variables and user programs It provides volatile memory storage unless you are using a battery backup the DS 1213D DM SmartSocket for example You can also download programs from your PC to RAM and load informa tion or programs from RAM back to your PC disk The 5083 supports a 32K EEPROM The EEPROM is used to store programs EEPROMs are nonvolatile and may be written to more than 10 000 times The number of read cydes is unlimited Programs are written to the EEPROM by using the on card programmer Programs are read from the EEPROM downloaded written to the syste
44. d by copyrights or patents No license is conveyed under the rights of Octagon or others
45. e the 5083 Microcontroller By using this manual you will be able to e Interface the 5083 to your IBM compatible PC and the Micro PC Expansion Cards Set up communications between the 5083 and a terminal or PC Gain an understanding of the operation of 5083 hardware using CAMBASIC IV programming language and the monitor software for C and assembly programming This manual assumes that you are familiar with some type of BASIC programming software If you are not experienced with BASI C type software you may want to refer to some of the excellent books on BASIC which are available through your local bookstore Refer also to the CAMBASIC IV Programming Guide for information and examples of all commands NOTE The 5083 uses a Z80181 processor Additional information on this component can be obtained from Zilog technical manual DC 2519 02 phone 408 370 8000 CONVENTIONS USED IN THIS MANUAL 1 Information which appears on your screen output from your system or commands or data that you key in is shown in a different type face Example 1 CAMBASIC IV tm c 1985 92 Octagon Systems Corporation V xx x all rights reserved Bytes free 33518 Preface 1 Example 2 Press the ESC key Italicized refers to information that is specific to your particular system or program for example Enter filename means enter the name of your file Names of other sections or manuals are also italicized Warning
46. ecessary WARNING If any input voltage exceeds 5V or is less than 5V all channel readings may be erroneous CONVERTING ANALOG MEASUREMENTS Input readings can be converted to engineering units of measure ment by performing scaling calculations in your program The AIN command returns values from 0 4095 To change these readings to other units use the following calculation variable K AIN n Analog Inputs 50 n is the A D channel to read K is the scaling constant K is obtained by dividing the highest number in the range of your units by the maximum AIN count 4095 Example 1 If you want to measure the results of an A D conversion in volts and the voltage range is 0 to 45V divide 5 by 4095 to obtain the value of K K 5 4095 K 001221 To obtain the final value for the equation in volts variable 001221 AIN n Example 2 If you want to measure a 0 to 200 PSI pressure transducer with a 0 to 45V output divide 200 by 4095 to obtain the value of K K K 200 4095 0488 To obtain the final value for the equation in PSI variable 0488 AIN n Measuring 4 20 mA Current Loops The 5083 can measure devices with 4 20 mA current outputs with slightly reduced resolution A 4 20 mA current loop is converted to voltage by pladng a shunt resistor across the input of the channel to ground An analog converter with a 0 to 45V range would require a 250 ohm shunt resistor This resistor value provides
47. een a PC and other equipment and may be used with any PC software package including CAMBASIC IV Refers to all versions of PC Smart LINK Resetting the 5083 hardware and soft ware by pushing the reset switch Has the same results as disconnecting power to the system without the potential side effects of a cold reset Memory used by CAMBASIC IV for program data and variable storage 0 5V logic levels Transferring a program or data from the 5083 to a PC Preface 3 XON XOFF A sender receiver protocol in which data transmission is suspended until the equipment receiving the data is ready to accept the incoming information TECHNICAL SUPPORT If you have a question about the 5083 Microcontroller and can t find the answer in this manual call our Technical Support They will be ready to give you the support you need When you call please have the following at hand e Your 5083 Microcontroller User s Manual A description of your problem The direct line to Technical Support is 303 426 4521 Preface 4 Chapter 1 OVERVIEW INTRODUCTION The 5083 Microcontroller is a 4 5 in x 4 9 in computer that contains all the hardware and software necessary to create a control system It can be used alone or in conjunction with Octa gon Micro PC expansion cards The 5083 uses one slot of the Micro PC card cage All communica tion between the 5083 and your PC is done through the serial ports Figure 1 1 shows the basi
48. ets port A bit Otoal 110 D INP 2 Reads all lines on port C 120 B BIT 2 1 Reads port C bit 1 130 BIT 1 3 1 Turns on bit 3 of high current port B NOTE For Port B a 1 turns on a high current line a 0 turns it off For further information please refer to the CAMBASIC IV Pro gramming Guide OPTO MODULE RACK INTERFACE You can interface digital I O lines from J 2 to an 8 16 or 24 position opto module rack One end of the CMA 26 cable plugs into J 2 and the other plugs into an MPB 8 MPB 16 or MPB 24 mounting rack You can also use a CMA 26 cable to connect J 2 on the 5083 toa STB 26 terminal board and then to the opto rack The STB 26 has two 26 pin connectors one of which plugs into J 2 the other plugs into the opto rack Digital I O Lines 41 For either configuration run a separate line to 5V and ground on the opto module rack Use the following table to determine the corresponding opto channel for a particular port 5083 Opto Rack Interface INTERFACING TO SWITCHES AND OTHER DEVICES The STB 26 terminal board provides a convenient way of interfac ing switches or other digital 1 O devices to the 82C55 digital port on the 5083 Microcontroller All 82C55 lines have 10K pull up resistors I O lines at connector J 2 can be connected to the STB 26 with a CMA 26 cable Parallel 1 O devices are then connected to the screw terminals on the STB 26 Y ou can determine switch status as follows 30
49. g Inputs 52 COMMANDS The following is a list of the CAMBASIC IV commands for the analog inputs 5083 Analog Input Commands Command Function AIN Returns result of A D conversion CONFIG AIN Initializes the analog channel Analog Inputs 53 This page intentionally left blank Analog Inputs 54 CHAPTER 9 ANALOG OUTPUT DESCRIPTION The analog output channel can be configured to operate in three voltage ranges The voltage ranges must be jumpered in hardware Refer to the following table for jumper settings for each output channel Analog Output Select Voltage Range W2 DACO 0 10V 4 5 45V Ba The output for channel 0 is located at pin 17 on J 3 NOTE External analog output channels can be connected to the 5083 with a STB 20 Terminal Board Sending Data to an Analog Output The AOT command is used to send data to an analog output The syntax is AOT channel value channad specifies the analog channel to write data to and can only be 0 value indicates the binary value you wish to output It is specified from 0 to 4 095 The following examples show how to specify a voltage 0 10V range AOT channel 409 5 volt Analog Output 55 0 5V range AOT channel 819 volt 5V range AOT channel 409 5 volt 2047 5 Refer to the CAMBASIC IV Programming Guide for more informa tion on the AOT statement Analog Output 56 Chapter 10 INTRODUCTION DISPLAY
50. gh Current Ports 66 Chapter 13 WATCHDOG TIMER The watchdog timer is a fail safe against program crashes or processor lockups The following table shows how to enable disable and reset the timer 5083 Watchdog Timer Command To enable OUT amp 40 1 To disable OUT amp 40 0 To strobe OUT amp 50 0 Once the watchdog time is enabled it must be reset at a maximum of 1 2 second intervals otherwise the system will reboot WATCHDOG LATCH A watchdog latch allows the addition of a buzzer or light in series with a button which can be reset should the watchdog timeout The latch is accessed through J 9 5083 Watchdog Latch 2 Output 3 Gnd The following is an example circuit for the watchdog latch The LED could be replaced by a relay for driving devices that require higher voltage or current The SCR output used is a Trecor EC103B or a Motorola MCR100 4 Refer to the appropriate data sheets for maximum ratings Watchdog Timer 67 N C Switch O s e V 3 Light or Buzzer Figure 13 1 E xample Watchdog Latch Circuit Watchdog Timer 68 Chapter 14 CALENDAR CLOCK DS 1216EM SMARTWATCH The Dallas DS 1216EM is a 28 pin DIP socket which contains a calender dock and a dual battery system with a minimum life of 5 years Accuracy of the clock is about 1 minute month at 25 C To install the DS 1216EM SmartWatch at U14 1 Remove the memory chip from socket U14
51. gs 60 DISPLAY 1 1 BS 70 DISPLAY 2 1 C 80 END NOTE If your LCD does not display a good contrast between the characters and the background adjust the LCD contrast pot Using J 2 If you are using an LCD display larger than 4x20 or are using a DP series vacuum fluorescent display with the 5083 you must connect the display to the digital I O port J 2 using an LCD or DP IFB board 1 Connect the cable included with your display to the display and the IFB 2 Connect a CMA 26 cable from the IFB toJ 2 on the 5083 Display Port 58 3 You are now ready to initialize the display The following program demonstrates how to drive a 4x20 LCD via the J 2 digital port 10 CONFIG PIO 0 0 0 0 0 0 Config dig I O port 20 CONFIG DISPLAY 0 6 0 Config display type 30 AS OCTAGON S BUILT IN Build display strings 30 BS DISPLAY COMMAND 50 cS IS EASY TO USE 60 DISPLAY 0 1 AS Display strings 70 DISPLAY 1 1 B 80 DISPLAY 2 1 C 90 END CONNECTING A DISPLAY TO A 5600 DIGITAL I O CARD Y ou can also connect your display to the optional 5600 or 5600 48 Digital 1 O Expansion Cards with a LCD or DP IFB This is especially useful if you are using a keypad larger than 4x4 or want to use J 2 for something other than a display 1 Connect the cable induded with your display to the display and the IFB 2 Connect the cable induded with your keypad if you are using one to the ke
52. hreaten life or injury It is a Condition of Sale that the user of Octagon products in life support applications assumes all the risk of such use and indemnifies Octagon against all damage IMPORTANT Please read before installing your product Octagon s products are designed to be high in performance while consuming very little power In order to maintain this advantage CMOS circuitry is used CMOS chips have specific needs and some special requirements that the user must be aware of Read the following to help avoid damage to your card from the use of CMOS chips Using CMOS Circuitry 1 Using CMOS Circuitry in Industrial Control Industrial computers originally used LSTTL circuits Because many PC components are used in laptop computers IC manufac turers are exclusively using CMOS technology Both TTL and CMOS have failure mechanisms but they are different This section describes some of the common failures which are common to all manufacturers of CM OS equipment However much of the information has been put in the context of the Micro PC Octagon has developed a reliable database of customer induced field failures The average MTBF of Micro PC cards exceeds 11 years yet there are failures Most failures have been identified as customer induced but there is a small percentage that cannot be identified As expected virtually all the failures occur when bringing up the first system On subsequent systems the failure rate
53. ign capability capacity or suitability for use of the Software Software is licensed on an AS IS basis without warranty The warranty and remedies set forth above are in lieu of all other warranties expressed or implied oral or written either in fact or by operation of law statutory or otherwise including warranties of merchantability and fitness for a particular purpose which Octagon specifically disclaims Octagon neither assumes nor authorizes any other liability in connection with the sale installa tion or use of its products Octagon shall have no liability for incidental or consequential damages of any kind arising out of the sale delay in delivery installation or use of its products SERVICE POLICY 1 Octagon s goal is to ship your product within 5 working days of receipt 2 Ifa product should fail during the warranty period it will be repaired free of charge For out of warranty repairs the customer will be invoiced for repair charges at current stan dard labor and materials rates 3 Customers that return products for repairs within the warranty period and the product is found to be free of defect may be liable for the minimum current repair charge RETURNING A PRODUCT FOR REPAIR Upon determining that repair services are required the customer must 1 Obtain an RMA Return Material Authorization number from the Customer Service Department 303 430 1500 2 If the request is for an out of warranty repai
54. ion is to place a capacitor for example 0 1 uF across the switch contact This will also eliminate radio frequency and other high frequency pickup Using CMOS Circuitry 4 TABLE OF CONTENTS ldizzel P 1 Conventions Used in This Manual seen 1 Symbols and Terminology essseeeeeneenenen nnns 2 Technical SUpport eite crm tinent xtti n e oet he 4 CHAPTER 1 OVERVIEW e eenen nennen nnn nnn 5 lr ErOCIUCELODL sii oed E E rr rud 5 MajOr F eatliliGs iini terr eei sf i da e te re a un 6 CHAPTER 2 INSTALLATION seus 9 Equipmeht ec recte reete ee Cerea EHE eR 9 Installing the 5083 Microcontroller esnene 10 Uploading amp Downloading Programs eeeee 13 Uploading Y our Program crt e epe ee 13 Downloading Y our Program niente 13 Where ToGo Fron Here dicii ie o qu iR RES 14 TrEoubleshootitig ater eire ete ne Pete RE 15 CHAPTER 3 ADDING MEMORY 17 Aalugo o Tau a EN 17 Ty pes of Memory zudem per utei ie iei 17 Adding Memory ee reiner te tre ie 17 Installing RAM Chips seeeemmmme mene 17 Installing a Battery Backup Module sees 18 Installing EEPROM Chips emm 19 CHAPTER 4 STORING IN RAM 21 Atr OAU ION e 21 Progr
55. m RAM in U 15 and run from system RAM Y ou can also use a 32K EPROM in the 5083 It also provides nonvolatile memory and can be used to store programs However to store programs to the EPROM you must use an off card programmer ADDING MEMORY Installing RAM Chips The 5083 is shipped with a 128K static RAM installed in socket U15 The card is designed to accept 32K 128K or 512K RAM chips Adding M emory 17 To install a RAM chip 1 Turn off power to the 5083 2 Remove the memory chip from socket U 15 3 Install the new memory chip in socket U 15 4 Make the appropriate jumper connections in jumper W3 5083 RAM Select W3 Pins umpered 2 3 32K 128K 1 2 512K default NOTE Improper setting of W3 jumper may result in lack of operation Installing a Battery Backup Module Y ou can use a battery backup module such as the Dallas DS 1213D DM SmartSocket for nonvolatile storage of system vari ables and data stored in your system RAM The DS 1213D DM is a 32 pin module with built in power fail circuitry and a dual battery system The DS 1213D provides battery backup for a low power 32K or 128K static RAMs The DS 1213DM battery backs 128K or 512K RAMs To install the SmartSocket 1 Turn off power to the 5083 2 Remove the memory chip from socket U 15 3 Install the DS 1213D or DS 1213DM into socket U 15 with the index mark pointing towards the 5083 gold contact fingers 4 I
56. n IDC connector This chapter shows you how to initialize and use the analog input feature of this card Additional technical information is found in Appendix C CONNECTING TO THE 5083 Analog devices interface to the 5083 via a 20 pin IDC connector at J 3 and supports either eight channels single ended or four chan nels differential A STB 20 terminal board provides a connection for field wiring You can use 12 to 22 gauge solid or stranded wires to connect equipment to the screw terminal The STB 20 connects to the 5083 using a CMA 20 cable CMA 20 To 5083 Ribbon Cable Connector J3 li J1 e Series Resistor if required Bo 1g LI esteries sensors ete Qo 3 3 Jo Qo 4 4 0 Qo 5 5 oQ Qo 6 6 loQ Qo 7 7 o To 4 20 mA Q0o 8 8 oQ transducers Qo 9 9 o Qo 10 10 09 STB 20 220 ohm Ground lead Figure 8 1 Connecting External Devices to the 5083 via STB 20 Analog Inputs 45 INITIALIZING ANALOG CHANNELS Each analog channel must be initialized using the CONFIG AIN command You can have up to eight single ended inputs four differential inputs or a combination The syntax is CONFIG AIN channel input polarity channel ranges from 0 to 7 for single ended inputs Refer to the following table for corresponding J 3 connector pins to the 5083 channels 5083 Analog Port J 3 Single E nded Pin Differential Pin 1 amp 3 5 amp 7
57. nnel to variable S The value returned will always be in the 0 4095 range because the A D converter is 12 bits Thus 0 corresponds to 0 000V and 4095 corresponds to 44 9988V When using a channel in the bipolar range the value returned is interpreted differently Zero counts is now 5 000V 4095 is 4 9988V and 2048 is 0 000V To convert the returned values to voltage use the following formulas Unipolar A200122 AI N channel Bipolar A 00244 AIN channel 5 The AIN function requires about 500 uS to access a channel of data Additional time is needed to store the data The example below takes 1 000 data samples and stores them into memory using an array which takes four bytes per entry The second example takes only two bytes per entry but takes longer to process The third example is the same as the first but shuts off task checking to maximize throughput In all examples the CONFIG AIN statement is not shown The program below takes about 2 1 mS per data point and requires 4000 bytes of data storage 10 DIM F 1000 20 FOR X 0 TO 999 30 F X AIN 0 40 NEXT Analog Inputs 48 The program below takes about 2 7 mS per data point and requires 2000 bytes of data storage 10 F amp 7000 20 FOR X 0 TO 999 30 DPOKE F AIN 0 40 F F 2 50 NEX The program below takes about 1 8 mS per data point and requires 4000 bytes of data storage This is because the multitasking has been shut off 10 CONFIG TASK OFF 2
58. nstall the new memory chip into the top of the module Adding M emory 18 5 Make the appropriate jumper connections in jumper W3 5083 RAM Select W3 RAM Size 32K 128K Pins umpered 2 3 1 2 512K default NOTE Special low power memory chips must be used or battery life will be drastically reduced Installing EEPROM Chips The 5083 is shipped with a 32K EEPROM installed in socket U14 the user socket To change the device you need to remove the original chip install the new device and change the jumper settings in jumper block W1 NOTE Improper setting of W1 may result in lack of operation Toinstall an EEPROM chip 1 Turn off power to the 5083 2 Remove any memory chip from socket U 14 3 Install the new EEPROM in socket U 14 4 Make the appropriate jumper connections in jumper block WI 5083 User Device Select W1 29C256 EEPROM Pins J umpered 3 4 5 6 27C256 EPROM 3 4 5 6 default NOTE The on card EEPROM programmer cannot be used with a 27C256 The EPROM must be programmed off card and then installed in U 14 on the 5083 Adding M emory 19 This page intentionally left blank Adding M emory 20 Chapter 4 STORING IN RAM INTRODUCTION Although RAM is volatile it is usually the most convenient means of temporarily storing data program variables etc When perma nent storage is required a battery backu
59. other devices that have TTL input or output for example printers and scales Figure 7 1 shows a typical opto rack configuration Teas 8 7 8 8 3 OB MO g eOooooopepoeeosedqd CMA 26 Ribbon Cable Digital 1 0 Po 28 Ac s Cu MPB Opto R OR ack S _ CMA 26 Ribbon Cable Ni 5083 lt Microcontroller X CMA 26 Ribbon Cable STB 26 Terminal Board Figure 7 1 T ypical Opto Rack Configuration Apply power to the 5083 Microcontroller before WARNING applying an input voltage to the digital I O lines This prevents excessive currents from flowing and damaging input devices ORGANIZATION OF CONNECTORS AND PORTS The digital I O lines on the 5083 are supplied by a 82C55 chip The 82C55 is located in socket U1 which is connected toJ 2 J 6 and J 7 are the keypad and display ports However they may be used as general digital I O ports Digital I O Lines 39 Input and Output Ports On power up and software or hardware reset all the 82C55 digital I O lines in J 2 are configured as inputs All lines are TTL logic level compatible 0 5V and have 10K pull up resistors to the 5V supply 5083 Digital I O Port J 2 Description 8lines which can be programmed as all inputs or all outputs 8lines which can be programmed as all inputs or all outputs 8 lines interfaceto a high current driver 8lines which can be progr
60. p module can be added This chapter describes the memory usage of CAMBASIC IV and how to save and retrieve information from the static RAM User programs and CAMBASIC IV variables reside in segment 0 of RAM Except for program and variable space the remainder of RAM space is available for user data When using a 128K or 512K RAM it is recommended that user data be stored in segment 1 and higher so that there will be no conflict with CAMBASIC opera tions With a 32K RAM only segment O0 is available so care must be taken to properly reserve RAM space for user data Memory Map amp FFFFF 4 4 Solid state Disk U14 amp 80000 3 4 512K RAM amp 27000 128K RAM amp 10000 System M amp F000 RAM U15 32K RAM amp 7000 lt CAMBASIC ROM U13 0000 Figure 4 1 M emory Map Storing in RAM 21 amp 10000 4 Stack amp string space lt SYS 3 Available RAM q SYS 2 Program amp variables L amp 7000 128K amp 512K RAM System amp EC00 4 Stack amp string space lt SYS 3 Available RAM Program amp variables amp 7000 lt SYS 2 32K RAM System Figure 4 2 32K 128K and 512K RAM The following program demonstrates how to reserve 100 bytes of Allocate 100 bytes for user data e g assembly program space in segment 0
61. r a purchase order number or other acceptable information must be sup plied by the customer 3 Indudea list of problems encountered along with your name address telephone and RMA number 4 Carefully package the product in an antistatic bag Failure to package in antistatic material will VOID all warranties Then package in a safe container for shipping Write RMA number on the outside of the box For products under warranty the customer pays for shipping to Octagon Octagon pays for shipping back to customer 7 Other conditions and limitations may apply to international shipments DM NOTE PRODUCTS RETURNED TO OCTAGON FREIGHT COLLECT OR WITHOUT AN RMA NUMBER CANNOT BE ACCEPTED AND WILL BE RETURNED FREIGHT COLLECT RETURNS There will be a 15 restocking charge on returned product that is unopened and unused if Octagon accepts such a return Returns will not be accepted 30 days after purchase Opened and or used products non standard products software and printed materials are not returnable without prior written agreement GOVERNING LAW This agreement is made in governed by and shall be construed in accordance with the laws of the State of Colorado The information in this manual is provided for reference only Octagon does not assume any liability arising out of the application or use of the information or products described in this manual This manual may contain or reference information and products protecte
62. r DP IFB Keypad Port 62 2 Connect a CMA 26 cable from the IFB toJ 2 on the 5083 3 You are now ready to initialize the keypad The following example is for a 64 key keypad 10 CONFIG PIO amp 0 0 0 0 1 1 Set up PIO port 20 CONFIG KEYPADS 8 64 amp 0 Use 64 keypad type 30 ON KEYPADS GOSUB GETKEY Enable keypad task 100 MAIN Idle loop 110 GOTO MAIN 200 GETKEY K ypd service routine 210 AS KEYPADS 0 Get key 220 PRINT AS E cho key pressed 230 RETURN NOTE The CONFIG PIO statement is required for a 64 key keypad Other size keypads may require modification to the statement For example the follwing is required for a 16 key keypad connected to J 2 CONFIG PIO amp 0 0 0 0 1 0 CONNECTING THE KEYPAD A 5600 DIGITAL I O CARD Y ou can also connect your keypad to the optional 5600 or 5600 48 Digital 1 O Expansion Cards with a LCD or DP IFB This is especially useful if you are using a keypad larger than 4x4 or want to use J 2 for something other than a keypad 1 Connect your keypad cable induded with your keypad from the keypad to the IFB If you re using a 4x4 keypad usethe 10 pin connection for larger keypads use the 16 pin connection 2 Connect the IFB to the selected port on the 5600 Digital 1 0 Expansion Card 3 Y ou are now ready to initialize the keypad Keypad Port 63 10 CONFIG PIO x 0 y 0 1 1 Set up PIO port 20 CONFIG KEYPADS 8 64 x Use
63. r chip Z80181 Care should be taken to avoid static discharge as this could damage the processor J6 5083 Micro 16 Key or larger controller KP Series Keypad J2 N 5083 N ipe Micro MA controller LCD DP IFB Figure 9 1 K eypad Configurations Keypad Port 61 CONNECTING THE KEYPAD UsingJ 6 The most common configuration uses J 6 which is already config ured If you don t connect your keypad to these lines you can use them as general purpose digital O lines 1 Connect one end of the keypad cable induded with your keypad to the keypad 2 Connect the other end of the cable to J 6 on the 5083 card 3 Y ou are now ready to initialize the keypad The example below is for a 16 key keypad 10 CONFIG KEYPADS 8 Use def 16 kp type 20 ON KEYPADS GOSUB GETKEY Enablekp task 100 MAIN Idle loop 110 GOTO MAIN 200 GETKEY Kp service routine 210 AS KEYPADS 0 Get key 220 PRINT AS Echo key pressed 230 RETURN Using J 2 If you are using a keypad with more than 16 keys you must connect it to the digital I O port J 2 using an LCD or DP IFB board The DP IFB is used with vacuum fluorescent displays and the LCD IFB for liquid crystal displays NOTE When using the LCD IFB or DP IFB for a keypad interface the high current driver in U2 must be replaced with a DIP shunt 1 Connect the cable included with your keypad to the LCD IFB o
64. ree RS 232C serial ports COM1 J 1 supports the RxD and TxD signals COM 2 J 4 supports the RxD and TxD signals as well as Technical Data 77 the RTS and CTS handshake lines COM3 J 5 supports the RxD and TxD signals as well as the RTS CTS DCD and DTR hand shake signals EEPROM Programmer Programs 32K including 5083 EEPROMs Order Octagon 29C256 Atmel 32K 29C256 20PC Speed for all EEPROMs must be 200 nS or faster Pushbutton Reset The pushbutton reset switch will reboot the system Power Requirements 5V H 5 9170 mA typical The RS 232C supply voltages are generated on card When using opto mounting racks with the system the 5V supply requirements increase by 12 mA per opto module Environmental 40 to 70 C operating 40 to 85 C nonoperating RH 5 to 95 noncondensing Size 4 5 in X 49in 12 45 X 11 43 cm Technical Data 78 Memory Map Memory Map r amp FFFFF 4 Solid state Disk U14 t amp 80000 512K RAM gt amp 27000 128K RAM amp 10000 System amp F000 32K RAM RAM U15 gt amp 7000 lt CAMBASIC ROM U13 L 0000 44 Technical Data 79 I O Map 5083 I O Map J 2 Digital 1 0 00 03 Watchdog enable 40H Serial EEPROM chip select 41H Serial EEPROM data in 42H Serial EEPROM shift dock 43H A D chip select 44H Watchdog strobe 50H 5FH
65. rs to the automatic execution of a program on power up or reset When the autorun is on the program stored in the EEPROM in socket U6 will automatically execute on power up or reset AutoBaud The AutoBaud feature automatically determines and operates at the baud rate of your PC The 5083 will match baud rates of 300 1200 2400 4800 and 9600 On Card Programmer Once your program has been debugged you can store it in the EEPROM by using the on card programmer and the SAVE command Overview 7 Battery backed RAM The static RAM on the 5083 may be battery backed for saving process data during power down 128K and 512K RAMs may be battery backed with the DS 1213DM SmartSocket Battery life is typically 10 years at room temperature Calendar clock A battery backed calendar may be added to the system by insert ing the DS 1216EM SmartWatch into the EEPROM socket and plugging the EEPROM into the DS 1216EM The dual battery system in this module has a life of about 10 years at room tem perature Overview 8 Chapter 2 INSTALLATION The 5083 is designed to be ready to program from the time you plug it in Installation is simple and straightforward The 5083 requires one slot in the Micro PC card cage and plugs directly into the backplane motherboard WARNING Always use antistatic procedures when handling any electronic components The greatest dangers occur when the card is plugged into a card cage and when cable
66. run a program 1 Configure jumper block W1 1 2 for autorun ON this is its default 2 If the EEPROM will store one 32K file enter CONFIG SSD 0 If the EEPROM will store four 8K files enter CONFIG SSD 1 NOTE This command is only executed once when first configuring the EEPROM This command will erase any existing data in the EEPROM 3 SAVE your program from RAM tothe EEPROM The first four letters of the filename must be BOOT 4 On power up or reset the program BOOT will automatically download to RAM and execute Storing in EEPROM 29 Preventing Autorun When troubleshooting a program it may be necessary to disable the autorun option This is espedally true for those programs that have been configured to ignore the break lt ESC gt key To prevent autorun 1 Power off the 5083 2 Remove the jumper at W1 1 2 3 Power on the system 4 Replace the jumper at W1 1 2 5 Use the RENAME command to rename BOOT to any name not beginning with BOOT COMMANDS The following is a list of CAMBASIC IV commands used in storing and running programs saved in the EEPROM 5083 Commands to Store and Run Programs Command Function CONFIG SSD Sets up EEPROM as a disk DEL Deletes program from EEPROM FILES Displays SSD files LOAD Downloads program from EEPROM to RAM LOAD Downloads data from serial EEPROM toRAM RENAME Renames SSD files RUN Downloads and runs the
67. s always appear in this format WARNING The warning message appears here Paired angle brackets are used to indicate a specific key on your keyboard for example lt E SC gt means the escape key lt CTRL gt means the control key F 1 means the F 1 function key All addresses given in hexadecimal SYMBOLS AND TERMINOLOGY Throughout this manual the following symbols and terminology are used w Denotes a jumper block and the pins to connect NOTE Information under this heading presents helpful tips for using the 5083 WARNING Information under this heading warns you of situations which might cause catastrophic or irreversible damage Autorun Automatic execution of a program on power up or reset Preface 2 Download Free Memory Immediate Mode Industrial Command Extensions LCD Multidrop Network PC SmartLINK Reset System RAM TTL Compatible Upload Transferring a program or data from a PC to the RAM on the 5083 also refers to loading the program stored in the EEPROM tothe RAM The amount of memory available for program and data storage The system is on and ready for you to use CAMBASIC IV Specialized CAMBASI C IV commands designed for industrial programming applications i e AIN AOT BIT Liquid Crystal Display A method of multiprocessor communica tion using RS 485 A serial communications software package designed by Octagon It provides communications betw
68. s are plugged into the card To avoid damaging your card and its components 1 Ground yourself before handling the 5083 Microcontroller and before inserting or removing cables 2 Disconnect power before removing or insert ing the 5083 3 Do not insert or remove chips from the board while power is applied EQUIPMENT You will need the following equipment or equivalent to use your 5083 5083 Microcontroller Micro PC Card Cage Power Module VTC 9F Cable PC SmartLINK Please refer to Appendix A if you are making your own serial cable using a communications program other than PC SmartLINK or using other non Octagon components Installation 9 INSTALLING THE 5083 MICROCONTROLLER Before installing the 5083 refer to Figure 2 1 for the location of various connectors and jumpers Watchdog Latch Output LCD Contrast Adjust Serial EEPROM Reset COM1 Digital Vo User Device lype Select m BASIC ROM User oF OM w Analog yo 5V Only 5 QoQ Operation Land RAM Size DAC Output Reference Select Range Select Adjust Figure 2 1 5083 Component Diagram WARNING Take care to correctly position the 5083 in the card cage The VCC and ground signals must match those on the backplane Figure 2 2 shows the relative positions of the 5083 edge connector and the motherboard connector Installation 10 A31 Card Edge Pins A31 amp B31 5083 Microcontroller Micro P
69. se this port to drive high current devices you can replace the output driver chip U2 with a DIP shunt jumper and use the lines as general purpose digital 1 0 lines The lines are TTL compatible with the DIP shunt in place The address of the high current port is 01 On power up all high current outputs are OFF A 1 or ON written to the high current port causes the output to switch low or ON NOTE When ON the saturation voltages are incompatible with TTL logic levels and should not be used to drive other logic devices Considerations For High Current Outputs Each of the high current outputs can sink 100 mA at 50V e Incandescent lamps have a cold current of 11 times that of their hot current It is recommended that lamps requiring more than 50 mA not be used When inductive loads are used protection diodes or other schemes must be used Supply amp i 1N4002 To High Current Output Figure 12 1 Inductive Load Protection Circuitry High Current Ports 65 Configuring outputs in parallel for higher drive is NOT recommended and could result in damage since the outputs will not share current equally If external devices such as 24 VDC relays are driven the ground of the external 24V supply must be connected to J 2 pin 26 and NOT the power ground Failure to do so will produce a ground loop within the 5083 and can cause erratic operation Hi
70. specified program SAVE Saves program to EEPROM SAvE Saves data to serial EEPROM Storing in EEPROM 30 Chapter 6 SERIAL PORTS INTRODUCTION The 5083 has three serial ports COM 1 COM2 and COM3 which can be used for interfacing to printers terminals or other serial devices Each port can be programmed independently with built in CAMBASIC IV commands to operate on an interrupt driven basis Each serial port has 256 character input and output buffers Characters are stored in the input buffer and removed from the output buffer on an interrupt driven basis Information is handled through the serial port without slowing down program execution For example when executing a PRINT statement the processor sends the characters to the output buffer which prints in the background while the program continues to run If the output buffer fills program execution stops until there is room in the buffer If the input buffer fills all subsequent characters are discarded All three serial ports support XON XOFF software protocol when transmitting so that a remote device can tell the 5083 to start and stop data transmission XON and XOFF are special characters chosen to establish a flow control protocol When XON is received transmission is temporarily suspended until XOFF is received Use a VTC 9F cable to connect the ports to the external serial equipment The pinout of the connector allows you to plug the cable directly into a 9
71. stored in the EEPROM cannot be recov ered SAVING A PROGRAM IN EEPROM To store a 32K program or the first of four 8K programs to the EEPROM enter SAVE filename The filename can have up to 12 characters Though compiling typically takes about 5 seconds it can take as long as 15 seconds with very long or complex programs The programming status displays on the screen compile program verify Storing in EEPROM 26 The prompt gt appears when the program has been successfully saved to the EEPROM If the program does not properly write to the EEPROM an error message appears Failed XXXX gt XXXX is the hexadecimal address where the program failed If you have configured the EEPROM to store four 8K programs subsequent programs can be stored using the SAVE command SAVE BOOT SAVE secondprog SAVE thirdprogram If you plan to autorun your program on power up the first four letters of the first filename on the EEPROM must be BOOT The filename can be anything you choose up to twelve characters total LOADING PROGRAMS TO RAM To examine the sizes and filenames of the files saved in the EEPROM enter FILES To load a program from EEPROM into RAM enter LOAD filename RENAMING A PROGRAM IN THE EEPROM To rename a program that is stored in the EEPROM enter RENAME oldname newname DELETING A PROGRAM FROM EEPROM Storing in EEPROM 27 To delete a progr
72. that you do not do this However the card may be dam aged if the right sequence of pins contacts as the card is pushed into the socket This usually damages bus driver chips and they may become hot when the power is applied This is one of the most common failures of expansion cards Using desktop PC power supplies Occasionally a cus tomer will use a regular desktop PC power supply when bringing up a system Most of these are rated at 5V at 20A or more Switching supplies usually require a 2096 load to operate properly This means 4A or more Since a typical Micro PC system takes less than 2A the supply does not regulate properly Customers have reported that the output can drift up to 7V and or with 7 8V voltage spikes Unless a scope is connected you may not see these transients Terminated backplanes Some customers try to use Micro PC cards in backplanes that have resistor capacitor termina tion networks CMOS cards cannot be used with termination networks Generally the cards will function erratically or the bus drivers may fail due to excessive output currents Excessive signal lead lengths Another source of failure that was identified years ago at Octagon was excessive lead lengths on digital inputs Long leads act as an antenna to pick up noise They can also act as unterminated transmission lines When 5V is switch onto a line it creates a transient waveform Octagon has seen submicrosecond pulses of 8V or more The solut
73. ypad and the IFB 3 Connect a CMA 26 cable from the IFB to the 5600 port you want to use The 5600 has four 26 pin connectors All four are identical and all havethree ports A B and C Display Port 59 4 You are now ready to initialize the display 10 CONFIG PIO x 0 0 0 0 0 Config dig I O port x addr of port A 20 CONFIG DISPLAY 0 6 x Config display type 30 A OCTAGON S BUILT IN Build display strings 40 B DISPLAY COMMAND 50 C IS EASY TO USE 60 DISPLAY 0 1 A Display strings 70 DISPLAY 1 1 B 80 DISPLAY 2 1 C 90 END COMMANDS The following is a list of the CAMBASIC IV commands for the display 5083 Display Commands Command Function Specifies which multi line display you want to use with the display statement For moreinformation on specific displays refer to the CAMBASIC IV Programming Guide CONFIG DISPLAY DISPLAY Displays the strings at the row and column specified Display Port 60 Chapter 11 KEYPAD PORT INTRODUCTION Y ou can use 4x4 16 key and larger keypads with the 5083 Microcontroller You can connect a 4x4 keypad directly to J 6 on the 5083 with the cable included with your keypad Larger keypads must be connected to an interface board IFB the IFB is then connected to either J 2 on the 5083 or to a port on the 5600 Digital I O Expansion Card WARNING The keypad port lines are unbuffered and connect directly to the microcontrolle
Download Pdf Manuals
Related Search
Related Contents
Epson Photo 700 User's Manual Atelier acrylamide des 20 et 21 octobre 2003 SRM450v2 Active Sound Reinforcement SPEAKER Sweep 2000M-CL-65 User Manual informe de la xvi reunión técnica de oficinas gubernamentales Multiple Analysis Cement System (MACS II) Instruction Manual Technics SX-PR54/M User's Manual HD Web Cam 760 Pro user manual Copyright © All rights reserved.
Failed to retrieve file