RPC-2350 USER'S MANUAL NOTICE TO USER Copyr ight 2001 - Re mote P rocessing Cor poration. All rights reserved. However, any part of this document may be reproduc ed with Remote Proce ssing cited as the source. The infor mation co ntained in this m anual is believe d to be correct.
TABLE OF CONTENTS OVER VI E W MANUAL ORGANIZATION . MANUAL CONVENTIONS . . Symbols and Term inology DEM ONSTR ATION DISK . . TECHNICA L SUPPORT . . . . . . . . . . . . . . . . . . . . . . . . CHAPTER 1 . . . . . . . . 1 . . . . . . . . 1 . . . . . . . . 2 . . . . . . . . 2 . . . . . . . . 2 SETUP AND OPERATION CHAPTER 2 INTRODUCTION . . . . . . . . . . . . . . . . . . . . 1 OPERATING PRECAUTIONS . . . . . . . . . . . . 1 EQUIPMENT . . . . . . . . . . . . . . . . . . . . . . . 2 COMMUNICATION PROGRAM .
RPC-2350 USER'S MANUAL CHAPTER 7 . . . . . . . . 8 . . . . . . . . 8 . . . . . . . . 8 . . . . . . . .9 INTER RUPT S CHA PTER INTER RUPT HAN DLIN G BY CA MBASIC . . HARDWARE INTERRUPTS . . . . . . . . . . . . SOFTWARE INTERRUPTS . . . . . . . . . . . . . COMMANDS . . . . . . . . . . . . . . . . . . . . . . 13 . 1 . 1 . 2 .2 ANALOG I/O CHAPTER 8 C ONNE C T IN G A N A L OG I/O . . . . . . . . . . . . 1 Initializing Inputs . . . . . . . . . . . . . . . . . . 2 Differential Mode . . . . . . . . . . . . . . .
TABLE OF CONTENTS POWER & EXPANSION PORT POWER INPUT . . . . . . . POWER OUTPUT . . . . . . Heat sinking . . . . . . . EXPANSION PORT P1 . . . CHA PTER . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 . 1 . 1 . 1 . 2 RESOU RCES CHA PTER RESOURCE LISTING . . . . . . . . . . . . . . . . Part distributors . . . . . . . . . . . . . . . . . . VF displays . . . . . . . . . . . . . . . . . . . . LCD ’s . . . . . . . . . . . . . . . . . . . . . . . . Stepper Motor C ontrol . . . . . . . . . . . . . .
CHAPTER 1 OVERVIEW is supporte d by Basic com mands. A com plete description of CAMBA SIC comm ands is in the CAMBASIC Programming Guide. CHAPTER SYNOPSIS OVERVIEW CHA PTER 1 Brief description of the RPC-2350 and RPC-2350G How this manual is organized How to get technical support Application disk Program development can take place on your PC, using your word processor, or on the RPC-2350. Programs from your P C can be downloaded using PC SmartLink or other serial communication program.
OVERVIEW CHAPTER 1 The hexadecimal notation used in this manual and by CAM BASIC is the ampersand charac ter (&) before the number. A &8C stands for 8C hexadecimal Information appearing on your screen is shown in a different type. Example: DEMONSTRATION DISK CAM BASIC (tm) V1.4 © 1985-94 Octagon Systems Corporation © 1999 Remote Processing Corporation All rights reserved - free 32434 A disk with many sa mple pr ogram s is included w ith this manual. T his manual references progr ams on the disk.
CHAPTER 2 SETUP AND OPERATION CHAPTER SYNOPSIS SETUP AND O PERATION CHA PTER 2 Running the RPC-2350 for the first time How to run und er D OS and W indows env ironm ents Uploading and downloading programs Handy pr ogram ming techniques Developing in Windows Troubleshooting if it does not work right away INTRODUCTION The RPC -2350 and RPC-2350G are very similar. The major difference is the RPC -2350G has graphics control software and hardwar e.
SETUP AND OPERATION CHAPTER 2 EQUIPMENT Requirements for uploading and downloading programs are discussed. A " Where to go from here" section directs you to the chapters to read to use the various capabilities of the RPC-2350 F inally, a troubleshooting section helps on the most com mon pro blems. You will need the following equipment to begin using the RPC-2350: RPC-2350 embedded controller A PC with a serial port and communications program VTC -9 serial ca ble + 5, 300 m A.
CHAPTER 2 SETUP AND OPERATION download time. board. All programm ing and initial communication between the RPC-2350 and outside wor ld is done through RS-232. DOS mode Start your serial communication program (PC Smar tLink, Proc omm , or other). Set the CO M por t to the one you will be using. The terminal progr am you use depends upon the operating environment. The vast majority of environments are PC ’s operating either DOS or Microsoft Windows.
SETUP AND OPERATION CHAPTER 2 Figure 2-2 Pow er connector detail Ground is connected to “GND” “+ 5V” can be pow er input or output. When W 8 is installed on the RPC-2350G, it is power output. When W8 is not installed, it is power input. See Chapter 16 for more inform ation. Figure 2-3 Pow er and jumper location detail “SWP WR” is a high current switch to ground. See Chapter 6, High current output at P2 for more information. 2.
CHAPTER 2 SETUP AND OPERATION Depending upon the program (Terminal or HyperTerm) you will see progr ess on your scr een in different way s. UPLOADING AND DOWNLOADING PROGRAMS You may need to change the amount of delay between lines. This is set under “P roperties”, ”A SCII Setup”. 1/10 second is usually ade quate for all progr am sizes. You can set it to 10 milli-seco nds if your progr am is small (unde r 500 lines) . A s the progr am gets lar ger, this time should increase .
SETUP AND OPERATION CHAPTER 2 The following setup files are on the 2350 applications disk. Use these to quickly set up yo ur ter minal. Uploading programs is simply a process of receiving an ASCII file. Y ou or your progr am simply needs to send "LIST" to receive the entire program. CAMBASIC.TRM CAMBASIC.HT Downloading a program requires transmitting an ASCII file. CAMBASIC is an incremental line compiler. As you type in (or download) a line, CAMBASIC com piles that line.
CHAPTER 2 SETUP AND OPERATION You can wr ite a program in lower case cha racters. CAM BASIC translates them to upper case. from 1500 to 2500. The program mer m ust determine the number of lines required for each section. Some program mers put "N EW" as the first line in the file. During debugging, it is common to insert "temporary" lines. Adding NEW ensures that these lines are gon e. D ownloadin g time is incr eased wh en the old progr am is still pre sent.
SETUP AND OPERATION CHAPTER 2 stops giving line numbers when two < CR> 's are received. GOT O or GOS UB. 3. U se labels after GO TO and G OSUB statem ents. Do not assign line numbers (except as noted in 4 below) since they will change. Use parenth esis (or brackets) When IF-T HEN statements do not execute properly (and formulas too), break it up using parens. For exam ple: IF A - B*C AND D = C*B - D/8 OR 15 THEN ... 4. O N GO TO and O N GO SUB cannot use labels.
CHAPTER 2 SETUP AND OPERATION TROUBLESHOOTING WHERE TO GO FROM HERE If you w ant to do th is Go to chapter Save a program 3 Autorun a program 3 Know m ore abo ut serial por ts 4 Use the SPI port 4 Using RAM to save variables 5 Storing variables in F lash 5 Configure digital I/O lines 6 Read switch status 6 Use high c urre nt outputs 6 Connect an external opto rack 6 Using calendar/clock 7 Reading vo ltages (Ana log input) 8 Analog output 8 Using a keypad 9 Character display p
CHAPTER 3 SAVING AND LINKING PROGRAMS CHAPTER SYNOPSIS and can be modified. The y can be saved to EPROM for execution later. The RPC -2350 is set to autorun on power up or reset by installing a jumper (W 11). W hen autorun is on, the progr am in E PRO M is loade d into RAM and begins to execute immediately.
SAVING AND LINKING PROGRAMS CHAPTER 3 any static electricity before installing or removing the jumper. Where ‘program’ is 0 or 1 for 128K Flash or 0 to 7 for 512K Flash installed. “SA VE” and “ SAVE 0" ar e the same . Both sa ve to program location 0. Another way to prevent autorun is to rem ove the signature bytes from Flash. This is done by writing &FF ’s into Flash address 0 and 1, segment 8. Use the following steps to do this.
CHAPTER 3 SAVING AND LINKING PROGRAMS When developing program s and testing for linking, make sure you save any changes to Flash before running. Any changes in program length, especially the first (autorun) one, c an have adver se, str ange, or disastrous r esults. When you have saved the changes, pr ess the reset button to simulate an autorun. NEVER start with program 1 (LOAD 1) then have it load program 0.
SAVING AND LINKING PROGRAMS . . 7000 . . 7100 7110 CHAPTER 3 SAVING PROGRAMS VS SAVING DATA IF A = 0 THEN 7100 A program number and F lash segment are related by the following formula: EXIT CLEAR LOAD 1 RUN Flash segment = program number + 8 The above example shows how to link to another program within a subroutine. If you do not use EXIT CLEAR, you will eventually end up with an error. If you intend to save data to Flash, m ake sure you do not write to a program area.
CHAPTER 4 SERIAL PORTS CHAPTER SYNOPSIS SERIAL PORTS CHAPTE R 4 Overview of RPC-2350 serial capabilities Using RS-422/485 Networking with RS-485 Preven ting program stops (breaks) SPI port information DESCRIPTION The RPC -2350 has two serial ports that can be used for interfacing to a printer , ter minal, or other ser ial devices. A SPI p ort is also pr ovided. This chap ter descr ibes their characteristics and how to use them.
SERIAL PORTS CHAPTER 4 character (ASCII value 13H or < Ctrl-S> ) to the RPC2350 will stop transmission until an XON (A SCII value 11H or < Ctrl-Q> ) is received. This does not over-ride the RTS input line when RTS is low. Comm unication flow control There are tw o methods to control transmission: Hardware and software. Both are discussed below. When RTS line in goes low, the RPC-2350 is held off from transm itting out CO M2. The status of this port is read by the BIT statement.
CHAPTER 4 SERIAL PORTS RS-485 mode in the CON FIG BAU D 2 comm and. RS-485 operates in one of two modes: 2 wir e and 4 wire. ( An extr a wire is actually neede d as signal reference. ) There are pr o’s and con’s to 2-wire vs 4wire systems and they are not discussed here. During two wire mode and W6[1-2] is set, the receiver is turned of f when the transm itter is turne d on. This keeps the RPC-2350 from receiving what was just sent out.
SERIAL PORTS CHAPTER 4 40 UNIT$ = ">05" . . . address, com mand, data, and a checksum. See figure 44. The packe t is received by all devices, and ignored by all except the one addressed. 1000 PACKET$ = COM$(2) 1010 A = INSTR(0,PACKET$,UNIT$) 1020 IF A = 0 THEN RETURN . . Line 20 sets up ON CO M$ to interrupt on a < CR> and branch to line 1000. Line 40 sets up this card' s address. Figure 4-4 Data packet Line 1010 checks to see if the rece ived mess age = this card's address. If not, the subroutine ends.
CHAPTER 4 SERIAL PORTS use as a basis to read and w rite to other SP I devices. is empty. In this mode, you have access to the full 256 bytes. If you don' t read the b uffer an d the buffer fills, all subsequent characters are discarded. INKEY$(n) may be used anywhere in the program. 3. Comm and form at is: a = SPI(channel,out_length,data, delay,in_length) Where: channel = 0 to 2, the SPI channel number. COM$(n) retrieves all characters in the buffer, including < cr> ' s and other control co des.
SERIAL PORTS CHAPTER 4 COM1 is J1, the console port. COM2 is J4, the primary port. The table below is the pin out for SPI port J11. Pin No. Description 1 Clock output to device 2 Serial data to external device 3 Serial data from external device 4 SPI 1 select (active low). Used for touch screen select. COMMANDS The following is a list of CAM BASIC commands used for serial I/O. Some variations are not listed here. Refer to the CAMBA SIC Programming Manual for more information.
CHAPTER 4 SERIAL PORTS SERIAL CABLE PIN OUT The following is the pin out between the IDC connector for the RPC-2350 and the D B-9 connector to the PC or term inal. IDC pin # DB-9 pin # Description 1 nc 2 nc Direction from 2350 3 2 Tra nsmit Out 4 7 RTS In 5 3 Receive In 6 8 CTS Out 7 nc 8 nc 9 5 Ground 10 na + 5V Out Note that CTS and RT S are not available on J1.
CHAPTER 5 DATA MEMORY The problem with calculating battery life are variables beyond our reasonable control. First, memory manufacturers specify a ‘typical’ current of 1 to 2 microamps and a maximum of 100 (high temperature operation). Other factors affecting battery life include operating temperature, clock chip, and time the RPC2350 has power applied to it. You can expect the battery to last between 3 to 5 years for operation at 25°C. At 50°C, life is about half as much.
DATA MEMORY CHAPTER 5 PEEK statement to retrieve the variable: 50 B = PEEK(12,1) You can store and retrieve arrays, strings, and variables in this way. There ar e many variations of PEE K and POKE statements. Refer to the CAMBA SIC Programming Manual for additional information and examp les. A list of comm ands appea rs at the end of this chapter. Flash Memory Programs are stored in Flash EPROM. Programs are transferred from Flash to RAM at run time or LOAD. Data may also be stored in Flash.
CHAPTER 5 DATA MEMORY How simple do you want to keep the program How secure does the data have to be (where to store data - Flash or RAM) How often is information updated A CAM BASIC progr am number and Flash segment when using SAVE are related by the following formula: SAVE segment = program + 8 Keep track of where you are writing to. Most programs will only use program area 0. Addresses above &9000 are alw ays available in any prog ram area.
DATA MEMORY CHAPTER 5 program size. As a practical fact, no m ore than about 34K of program can r un at one time. This leaves about 30K in the fir st Flash seg ment and at least this amo unt in the 2nd. Use the SA VE co mma nd to transf er data to Flash. structure it is 28. Next, assign variable names to the offsets in memory data begins.
CHAPTER 5 DATA MEMORY severa l things happen. Data save d at line 1000 is overwritten by the data in line 2000, even though different write addresses were specified. This brings us to the second r eason sector size is impor tant. You are now ready to power up the board. You can now PEE K and POKE data into segments 1-7. CAM BASIC forces the requeste d Flash a ddress do wn to an even sec tor addr ess. In both cases a bove, data is written to the Flash starting at address 0, not at 5 or 42.
DATA MEMORY CHAPTER 5 memory has been allocated before running these SYS comm ands. F ailure to do so may r esult in address returned that are not really free for assem bly language program s. default values (from the program) should be used, since it is uncertain if the first or second set is corrupted. Both data sets would then be re-initialized. A triplica te set is used to r ecover the last set or ind icate that the data in the first set is valid. The pr ocedure and logic is as follows.
CHAPTER 5 DATA MEMORY COMMANDS Line 2000 calls the pro gram listed below . It toggles J2 line 13. IN LD AND OUT LD OR OUT RET The following is a list of CAM BASIC commands used w it h R A M . A,(2) B,A 0FEH (2),A A,B 1 (2),A Command EXAMPLE PROGRAMS The follow ing is a list of CA MBA SIC pr ogram s used to save and load data to and from RAM and Flash. Name Function ARRAY1.BAS Move s floating point ar ray data a r ou nd RA M . ARRAY2.
CHAPTER 6 DIGITAL LINES On power-up or software reset ( or CAMBASIC CALL 0), all digital ports ar e reset to inputs. CHAPTER SYNOPSIS Overview of the digital lines How to program Using high current port Interfacing to opto racks DIGITAL I/O PORT Digital I/O lines on the RPC-2350 are supplied by an 82C55 chip. The chip's lines primarily go to connectors J2 and J3. Lines to J3 also go to J5 and J6. This part assumes you will be using all lines at J3 for digital I/O.
DIGITAL LINES CHAPTER 6 include those that overlap even for a few milliseconds. J3, port A is shared with the LCD character display port J6. If you are using J6, then these 8 lines at J3 are not available. Incandesc ent lamps h ave a " cold" c urre nt of 11 times its operating current. Lamps requiring more than 50 mA. should not be used. J3, port B is connected to a high current sink through U20. See High current output later in this chapter. Two lines are connected to the keypad port.
CHAPTER 6 DIGITAL LINES lines. The MPS-XX series boards accept OPTO-22 G4 series or Grayhill G5 modules. See Chapter 18, RESOURCES , for a list of suppliers. shunt jumper. This keeps logic com patible with ports B and C. If opto channels 8-15 are used as inputs, then U20 must be replaced by a DIP shunt jumper. Use the O PTO comm and to acces s and contr ol opto modules. The LIN E comm and is used to access individual lines on the STB-26 or MPS-X X rack.
DIGITAL LINES CHAPTER 6 Conne ctor pin ou t - J3 Conne ctor pin ou t - J2 J2 Pin # 82C55 Port/bit Description Opto Channel J3 Pin # 82C55 Port/Bit Alternate function Opto Channel 19 A/0 8 19 A/0 LCD port J6 8 21 A/1 9 21 A/1 LCD port J6 9 23 A/2 10 23 A/2 LCD port J6 10 25 A/3 11 25 A/3 LCD port J6 11 24 A/4 12 24 A/4 LCD port J6 12 22 A/5 13 22 A/5 LCD port J6 13 20 A/6 14 20 A/6 LCD port J6 14 18 A/7 15 18 A/7 LCD port J6 15 10 B/0 16 10
CHAPTER 6 DIGITAL LINES COMMANDS The following table lists CAMBASIC commands used for digital I/O. Command Function BIT Function returns status of bit at an I/O add ress BIT Comm and sets a bit at an I/O add ress CON FIG PIO Configures J3 I/O port INP Returns a byte fr om an I/ O address LINE Returns status of an opto line OPTO Sets an opto module output OUT Writes a byte to an I/ O address PUL SE Reads or writes a pulse at a por t.
DIGITAL LINES J2 Pin # 82C55 Port/ bit Opto Channel 19 A/O Exam ple 19 A/ 0 8 21 A/ 1 9 23 A/ 2 10 25 A/ 3 11 24 A/ 4 12 22 A/ 5 13 20 A/ 6 14 18 A/ 7 15 10 B/0 16 8 B/1 17 4 B/2 18 6 B/3 19 1 B/4 20 3 B/5 21 5 B/6 22 7 B/7 23 13 C/0 0 16 C/1 1 15 C/2 2 17 C/3 3 14 C/4 4 11 C/5 5 12 C/6 6 9 C/7 7 26 Ground 2 + 5V CHAPTER 6 Description/ use Start switch Associated CAMBASIC variable, function, or task number ON BIT 0,0,0 GOSUB
CHAPTER 6 DIGITAL LINES J3 Pin # 82C55 Port/ Bit Other use for line Opto Channel 4 B/2 Exam ple Exam ple 19 A/ 0 LCD port J6 8 21 A/ 1 LCD port J6 9 23 A/ 2 LCD port J6 10 25 A/ 3 LCD port J6 11 24 A/ 4 LCD port J6 12 22 A/ 5 LCD port J6 13 20 A/ 6 LCD port J6 14 18 A/ 7 LCD port J6 15 10 B/0 High curr./ Keypad 16 8 B/1 High curr.
CALENDAR/CLOCK CHAPTER 7 The clock will roll over on December 31, 1999 at 23:59: 59 to January 1, 2000 with no problem s. CHAPTER SYNOPSIS Initializing and using the RTC Y2K and Y2.4K issues Using clock interr upts CAM BASIC operating system does not use or need any real time clock values for its operation. A clock is not needed in order for CAMBASIC to operate. DESCRIPTION The cloc k compe nsates for leap year in 2000.
CHAPTER 7 CALENDAR/CLOCK COMMANDS The following is a list of CAMBASIC com mands for the calendar/clock. Command Figure 7-1 RT C interrupt jumper W10 Use the following table to set clock inter rupt periods. “Value” is written to I/O port &14E. Interrupt interval Value 1 second 6 1 minute 10 1 hour 14 Write these values to address &14E to set the interrupt period.
CHAPTER 8 ANALOG I/O protected to ±12V. Readings on other channels are affected when one channel is over range. CHAPTER SYNOPSIS Brief description of analog input capabilities Acquir ing analog da ta High voltage interfacing Conve rting analo g reading s to real w orld units Calibration Analog output discussion 4-20 mA output Analog po wer su pply Conve rsion tim e is under 500 micr o-seconds/ channel. AIN function is used to return a voltage while AOT writes an output voltage.
ANALOG I/O CHAPTER 8 Differential Mode When d ifferential m ode is specified , inpu ts are actu ally pseudo-differential. What this means is that a ground reference is needed. For example, you cannot place a battery be tween ch annel 0 and 1 and get an ac curate reading. T he (-) input must be referenced to ground. An example of where pseudo-differential works is an output from a bridge network.
CHAPTER 8 ANALOG I/O 70 INC I 80 IF I = 100 THEN ON TICK 10 GOSUB 90 RETURN The input range is -2.5V to + 2.5V. The result from an AIN function is 0 for -2.500V , 2048 for 0. 000V, and 4095 for + 2.4998V. Line 80 shuts off interr upts after 100 sam ples. 4. D ifferential, ±2.5V input CONFIG AIN chan,0,0 MEASURING HIGHER VOLTAGES The input r anges fr om -2. 5V to + 2.5 V. The r esult is the difference of the two voltages. AIN will return 0 for a difference of -2.500V , 2048 for a difference of 0.
ANALOG I/O CHAPTER 8 samples, in theory, cancels out any effects of noise. A problem with this is noise tends to group together. Taking 7 readings at one time might show no change from the norm . Another 7 readings might be all high. If possible, try to spread out readings over a period of time (several seconds if possible). divided 5 by 4095 to obtain K. K = 5/4095 K = .001221 Your program could look something like: 1000 C = .001221 * AIN(N) Jumper b lock W13 is used to install filter capacitor s.
CHAPTER 8 ANALOG I/O Figure 8-2 Calibr ation Figure 8-3 Analog output IC’s, jumper, and connector Analog output IC’s are Analog Devices AD7248 type. This part may be ordered under Remote Processing Part number 1454. ANALOG OUTPUT Two o ptional analog o utput channe ls are indep endently configured for three voltage ranges. These ranges are jumpered in hardwar e. Refer to the following table for jumper settings. See Figu re 8-4 for W12 de tail.
ANALOG I/O CHAPTER 8 The following table lists J12 pin number, DAC , and curr ent output. and can be either 0 or 1. channel 0 is on pin 17 and 1 is on pin 19. value is the value to output from 0 to 4095. Output No. Use the following table to convert from a desired voltage to a value. Range Form ula J12 pin DAC driver Current IC 0 2 U11 (AOT 0) U30 1 10 U12 (AOT 1) U31 The follow ing table is J12 pin ou t. 0 to 5V value= V * 819 0 to 10V value= V * 409.5 Pin No.
CHAPTER 8 ANALOG I/O COMMANDS The following is a list of CAMBASIC com mands for analog input an d output. Command Figure 8-5 Cur rent loop IC’s & connector Function CON FIG AIN Configures analog input for voltage range and mode. AIN Returns result of reading for a channel AOT Sends value to D/A converter Use the table below to allocate input channels for your application. Current loop power The cur rent outpu t IC' s requir e at least 12V DC to operate . T he interna l + 12V supp ly may be used.
CHAPTER 9 KEYPAD PORT CHAPTER SYNOPSIS PROGRAMMING THE KEYPAD Operating information Multiple us e note Sixteen and 24 position keypads use all of port C at U19. The 24 position keypad use and additional 2 lines from port B. Por t B drives the high current sink, U20. If you are using the high cur rent dr iver, or have replace d it with a DIP shunt jumper, lines at J3-8 and J3-10 are not usable with a 24 position keypad only.
KEYPAD PORT CHAPTER 9 The table b elow lists J5' s pin out, 82C55 p ort and bit, and its intended function. The following example sets up CAM BASIC to scan a 16 position keypa d. P orts A a nd B are set fo r outputs (presumably to drive the LCD display and high current port) The results are echo' ed to the display.
CHAPTER 10 DISPLAY PORT Simply plug these displays into J6. A contrast adjustmen t pot, R 13, controls the viewing an gle. This pot is adjusted after J6 is properly configured. CHAPTER SYNOPSIS Differences between RP C-2350 and RPC -2350G Programm ing for a display Multiple use note Any number of other LCD displays may be used. See the table at the en d of this sub-section for cable pin out.
DISPLAY PORTS CHAPTER 10 It is possible to write a LCD character driver in Basic. This routine will be slow and take up some space. J6 Pin 82C55 Port/Line DISPLAY CONNECTOR PIN OUT The displa y port uses an 82C5 5 for data and contr ol. The table below lists a pin number and its intended function. A display may not use all lines even though they are available.
CHAPTER 11 SOUND/TIMER OUTPUT CHAPTER SYNOPSIS Uses and limitations of sound/timer output Connecting to a speaker DESCRIPTION SOUN D/T IMER OUTP UT CH APTE R 11 Sound may be used to drive a speaker or generate square wave pulses. Sound timer an d output line is used for other pur poses.
CHAPTER 12 WATCHDOG TIMER Watchdog time is determined by jumper W 1. U se the following tab le to set a timeo ut. CHAPTER SYNOPSIS Uses for a watchdog timer Cautions using watchdog W1 Pins Typical timeout Range DESCRIPTION WAT CHD OG TIM ER CH APTE R 12 A watchdog timer is used to reset the RPC -2350 if the program or C PU "cr ashes". When enabled, the program must write to I/O addr ess &E8 to avoid a reset. T he timeout is adjustable for 150 ms, 600 ms, or 1.2 seconds. [1-2] 1.2 sec.
CHAPTER 13 INTERRUPTS There is an order of pr iority: CHAPTER SYNOPSIS INT 0 INT 1 ON BIT 0 to ON BIT 7 ON KEYPAD ON T ICK 0 to ON TIC K 2 ON C OM$ 1 ON C OM$ 0 ON C OUN T 0 to ON COUNT 7 ON INP 0 to ON INP 7 Discusses types of inter rupts Interr upt prior ity DESCRIPTION INTER RUPT S CHAP TER 13 Interrupts on the RPC-2350 can be broken down into two general groups: Hardware and software. Hardware interr upts are IN T 0 and IN T 1.
INTERRUPTS CHAPTER 13 SOFTWARE INTERRUPTS jumper s from W7 if using e xternal inte rrup ts. IN T1 is tied to a 10K ohm pull up resistor. Software inter rupts are all other “O N” types. T hese interrupts look for an interrupt condition in software. The ON BIT, ON INP, ON KEYPAD$, ON COUNT, and ON TICK r outines either scan or count first then determine if an interrupt should be declared. A ll of the above routines oper ate on a 5 mS interv al.
CHAPTER 14 MULTI-MODE COUNTER CHAPTER SYNOPSIS COUNTER INPUTS AND OUTPUTS The counter chip has four inputs and two o utputs. Reference is made to the LS7166 counter reg isters. These registers are in Appendix A at the end of this manua l. Brief description of the counter High voltage input and level sensing adjustment Use in program Measu ring pulse w idth Measure frequency Two of the inputs, designated as A and B, are counter inputs.
MULTI-MODE COUNTER CHAPTER 14 Specifically, CAMBASIC writes a 2 to the MCR (Master Control Register), reads the 3 counter bytes from the OL (Output latch), and converts it to the proper internal BA SIC for mat. The LS7166 has several count related registers. The PR (Pre set register ) is a kind of holding register . A bit in the MCR (Master control register) transfer s the inform ation to the C NTR (counter ). T he PR is u sed to pre-load the counter .
CHAPTER 14 MULTI-MODE COUNTER inputs to count 130 on tick 0,1 gosub 1000 140 c = 1 :'initialize loop counter 200 bit 0,0,0 210 bit 0,0,1 :'rising edge increments count 220 a=count(8) 230 if a <> c then print "Count error" : end 240 inc c 250 goto 200 1000 print count(8) :'show current count 1010 return CNT R3.BAS interfaces to a quadratur e encoder in x1 mode. The counter is pre-loaded to 100. NOTE: See CAMBASIC resolution limit below.
MULTI-MODE COUNTER CHAPTER 14 J10 Pin out The following is the pin out for J10. J10 pin Signal levels are all TTL logic (0 to 5V). The following signals at J10 ar e used to measur e pulse widths: J10 pin Description Function 1 Ground 2 4.608 M HZ clock output 3 Sound output 4 Gate input 5 + 5V 6 Load counter 4 Counter gate. Measures when low. 7 INT 1 input 7 4.608 M HZ clock output. Tie to J10-9 8 B counter input 9 Clock input.
CHAPTER 15 GRAPHIC DISPLAY PORT printable ASCII characters are available. This set displays a maximum of 15 rows x 32 characters wide.
GRAPHIC DISPLAY PORT POKE SYS(15),0,0 CHAPTER 15 Initially connect th e Back light inver ter gr ound lead to “G ND” on P2 or your pow er supply. :'Slow- no sparkle Ther e is an unfor tunate par adox beca use of this. Sparkle is most noticea ble when d isplays are updated fr equently (5 times/second). The problem is when you want them updated without sparkle, it takes more time.
CHAPTER 15 GRAPHIC DISPLAY PORT lighted pixel (or block) on one layer ca n obliterate another. This CAM BASIC can display 3 character sizes. T he 2 larger sizes are considered a graphic. Each layer can be turned on, off, or flashed. CONTRAST ADJUSTMENT Figure 15-2 Jumper W3 detail There are two contrast adjustment methods for LC displays. Both use the BIAS pot R30.
GRAPHIC DISPLAY PORT CHAPTER 15 starts pr inting the char acter on the 3rd pixe l to the right, and 4th pixel down from the top (coordinates start at 0,0). largest fon t is 32 pixels wide by 48 tall. Small charac ters are pr inted on its own plane. Thus, small text can be turned off if desired. The larger sizes are considered graphics and are printed on the graphics plane. The largest character is positioned based on pixel and small character resolution.
CHAPTER 15 GRAPHIC DISPLAY PORT Scroll up time may be an important factor. It takes about 65 mS to move all 1160 characters of the text up one line. CHANGING AND LOADING FONTS Mediu m and lar ge size char acter fon ts are stor ed in Flash EPR OM U 3. You can change or customize the fonts using the supplied programs and a Windows bitmap graphics program (such as PC Paint Brush). If U3 is missing, damaged or W11 is removed, garbage characters will be displayed. Figure 15-2 The demo progr am CIRC LE.
GRAPHIC DISPLAY PORT CHAPTER 15 DISPLA Y SAVE works only when seg is to RAM. To save a screen to flash, you must use SAVE. LOAD AND SAVE SCREENS Two com mands load and save screen gr aphics. You will have to calculate the address, especially if you have more than one screen.
CHAPTER 15 GRAPHIC DISPLAY PORT to &FF FF. If you use one font, but not the other, you can write in the unused area. graphics. When saving to Flash, you m ust round UP the amount stored to the next Flash sector size. A 128K flash sector size is 128. A 512K flash sector size is 256. If you are unsure w hat you will use in the future , use the 256 byte sector size. ADDITIONAL SCREEN CONTROLS The display is capable of other display modes.
GRAPHIC DISPLAY PORT CHAPTER 15 DISPLAY ON command. The comm and byte value is &59. 3.3 . 1. 2 FC FC1 and FC 0 set the character cursor flash rate. NOTE: Display ON/OFF does not control its power. See DISPLAY POWER ON/OFF below. 3.3 . 1. 3 FP Set the attributes of each screen. FP0 and FP1 are the character screen. FP2 and FP 3 are the graphics layer, or screen. F P4 and FP 5 are not used. Setting a flash rate at 16 Hz does a poor job of a half tone effect. A flash rate of 2 Hz does get attention.
CHAPTER 15 GRAPHIC DISPLAY PORT PRINT AND DISPLAY TIMES Times shown are what it took to execute the entire DISPLA Y comm and. Execution times for a command (not character) shown below. Reverse medium and large characters does not add a significant amount of time. Comm and Time (in milli-Sec) Condition DISPLAY A$;C HR$(13); 1.255 A$ is 20 characters long DISPLA Y (x,y) A$; 1.2 A$ is 20 characters long DISPLAY A$ 62 Timed when cur sor was at bottom of screen . T his is scroll up time.
GRAPHIC DISPLAY PORT CHAPTER 15 CABLE PIN OUTS J13 Pin # The following tables are cable pin outs for LCD and EL displays. J9 is the 20 pin display connector on the board.
CHAPTER 15 GRAPHIC DISPLAY PORT COMMANDS The following commands are used with the graphics display: Command Description CLEAR DISPLAY Clear graphics and character displays. CLEAR DISPLAY C Clear character screen only. CLEAR DISPLAY G Clear graphics screen only. CLEAR DISPLAY LINE Clear small text line at current cursor row.
GRAPHIC DISPLAY PORT Command CHAPTER 15 Description DISPLAY F(x1, y1),(x2, y2) Fill area bounded by (x1,y1) to (x2,y2) DISPLAY F, C(x1, y1),(x2, y2) Clear area bounded by (x1,y1) to (x2,y2) DISPLAY F, X(x1,y1), (x2,y2) XOR ar ea bounded by (x1,y1) to (x2,y2) DISPLAY ON [type] Turn character, graphic, or both screens on DISPLAY OFF [type] Turn character, graphic, or both screens off DISPLA Y P(x, y) Turns a graphic point on or off DISPLAY LINE Draw s or erases a graphic line.
CHAPTER 16 POWER & EXPANSION PORT CHAPTER SYNOPSIS POW ER & E XPAN SION PO RT Power input options Power output options Expansion port description Expansion port pin out CH APTE R 16 POWER INPUT There are differ ent power I/O options for the RPC-2350 and RPC-2350G. Read this carefully to determine which one applies to your board. The RPC -2350 and RPC-2350G have different input power options. T he RPC-2350 oper ates from + 5, ±0.25VDC only. The RPC-2350G operates from either + 5, ±0.25VDC or + 6.
POWER AND EXPANSION PORT CHAPTER 16 Norm ally U23 is very warm to touch (40°C). As current deman d increa ses and/ or supply v oltage decr eases, its tempera ture increase s. U23 uses a heat sink for a TO-220 IC. Suggested heat sink by Aav id is: 5772 02B00000. This par t is available from DigiKey (800 344 4539). EXPANSION PORT P1 The expansion port brings out address, data, and control lines for an external board. This external board can consist of counters, timers, digital I/O, and analog I/O.
CHAPTER 16 POWER & EXPANSION PORT Expansion port connector pin out is listed below. P1 pin # Description 1 Data 0 2 Expansion port address select 3 Data 1 4 6.
CHAPTER 17 RESOURCES List sour ces of acce ssory com ponents VF displays IEE displays, C alifornia. Ph: 818 787 0311 www. ieeinc.com The RP C-2350 can be used in a number of applications. We provide comm on accessories. H owever, your application probably requires something we do not stock. Makes vacuum florescent and LCD displays. Some products available from Allied Electronics. Century series ar e driven th rough a serial por t.
RESOURCES CHAPTER 17 Opto-22 G4 modules are available from Allied Electronics. Grayhill G5 modules are available from D igi-key. Isolated RS-485 and communications B&B Electronics in Illinois. Ph: 815 433 5100 Makes seve ral comm unication and isolation products. RS-232 to RS-485 converters B&B Electronics in Illinois. Ph: 815 433 5100 Makes seve ral conver ter produc ts. Octagon Systems, C olorado Ph: 303 430 1500. The MTB-485 takes RS-232 from your PC and outputs RS485. Ver y easy to use.
TECHNICAL INFORMATION ELECTRICAL Settling time: TEC HNIC AL INF ORM ATION CHA PTER 18 CPU Z8S180, 18. 432 MHZ clock ELECTRICAL Memory CAMBASIC, 32K ROM (U1). Mapped per below. 4-20 mA. output(option) Channels: 2 (each requires its own D/A ), non-isolated Input voltage: 12V to 30V or use on c ard supp ly ( . 15V available) Keypad input 10 lines accept a 16 to 24 position matrix keypad. Scanning and debounce performed in CAMBASIC. Uses 8 lines from J3. 24 position uses additional 2 lines from J3.
TECHNICAL INFORMATION MEMORY AND I/O MAP Environmental Temperature range: -20°C to 70°C. T emperature can go slightly higher if air flows across board. Memor y maps are with respect to the CP U, not CAMBASIC. Humidity: 0% to 95% , non-condensing. For increase d battery life , som e humidity sh ould be pr esent. Vibration: Memory Description 5 g’s maximu m, 5Hz to 500 H z, eac h axis. Address CAM BASIC U1 &00000 - &06FFF (RPC-2350G) &00000 - &05F FF (R PC-2350) Size: 5.0" x 8.0" Maximum height: 0.
TECHNICAL INFORMATION JUMPER DESCRIPTIONS Jumper A * after a jumper position indicates factory default and is jumpered. Jumper Description Description W7[1-2]* INT1 to counter carry W7[2-3] INT1 to counter borr ow W8[1-2] Regulated + 5V output to board + 5V layer. W9[1-2] High voltage interface to counter W10[1-2] Real time clock inter rupt outpu t to INT0 W1[2-3]* Watchdog timer 1. 2 Seconds W1 open Watchdog timer 150 mS W1[1-2] Watchdog timer 1. 2 seconds W2[1-2]* 128K RAM.
TECHNICAL INFORMATION CONNECTOR DESCRIPTION The following table provides a brief function description for each connector and the chapter number where you can find information. Connector Desg. Function Chapter(s) for more info.
TECHNICAL INFORMATION BOARD OUTLINE RPC-2350 board outline and mounting hole locations 18-5