`
`Copyright@ 1987,1988 by CL9
`
`revision 3.0 By R. Karr, D. Sokol & T.J. Schmidt
`
`CORE Serial Interface
`
`(CS -232) Manual
`
`
`
`Universal Remote Control Exhibit: 1008 Page 000002
`
`CORE Serial Port Schematic ........................... 16
`Figure 1: CORE Display .......................... 9
`Descriptions of the Special Commands .............. 8
`How to Read Key Definitions ................... 7
`CORE Memory Usage ...................................... 6
`Table 2: the special commands ............... 5
`Special CSUI Commands ................................. 5
`Table 1; CORE key equivalents ................ 3
`Getting Started .............................................. 2
`Hardware Protocol. ................................ 1
`Baud Rate ............................................ 1
`Introduction .................................................. 1
`
`Table of Contents
`
`
`
`Universal Remote Control Exhibit: 1008 Page 000003
`
`1
`
`sign (i.e. $20) are hexadecimal values.
`Note: in the descriptions which follow, numbers preceded by a dollar
`
`on p. 15.) Pin 20 (DTR) is connected to +5. Ground is on pin 7.
`Pins 2 and 3 are reversible using an internal switch (see Schematic
`bit and no parity. As shipped, transmit is on pin 3, receive is on pin 2.
`The CORE is configured to transmit (and receive) 8 bits with 1 stop
`
`Hardware Protocol
`
`A 'c'/reset (complete Clear) will reset the baud rate to 19200.
`To reset to 19200 baud, hold the '1' key down while pressing reset.
`To use 9600 baud, hold the '9' key down while pressing reset.
`The CORE is shipped with the baud rate set to 19200.
`
`Baud Rate
`
`memory and/or on disk.
`receive blocks of binary data and store them in your computer's
`to use the special commands, you must also be able to send and
`rate to 9600 or 19200, and send characters as desired. If you are going
`you are able to initialize the serial port on your computer, set the baud
`computer (or system) communicating with the CORE. It assumes that
`regarding programming the CORE.) It also assumes proficiency on the
`with the CORE. (See the CORE Reference Manual for any questions
`This manual is intended to be used by someone who is already familiar
`
`which transmit data between CORE and the host computer.
`keyboard. Also, there are additional functions available with CSUI
`program as if they were physically pressing keys on the CORE's
`control all of the CORE's functions from a keyboard or software
`terminal at a rate of 9600 or 19200 baud. This interface allows users to
`Interface or CSUI) which enables it to communicate with a computer or
`The CORE itself contains a set of routines (called the CORE Serial User
`
`CORE universal remote controller.
`interface cable to communicate between a computer or terminal and the
`This manual describes the procedures for using the CL9 CS-232 serial
`
`Introduction
`
`
`
`Universal Remote Control Exhibit: 1008 Page 000004
`
`3
`
`2
`
`$1F
`$1E
`$10
`$1C
`$18
`$1A
`$19
`$18
`$17
`$16
`$15
`$14
`$13
`$12
`$11
`$10
`$OF
`$0E
`$00
`soc
`$06
`$0A
`$09
`$08
`$07
`$06
`$05
`$04
`$03
`$02
`$01
`$00
`
`Ke:i Value
`
`CORE Ke:i
`
`P.:::
`
`C--
`,
`0-
`...
`a-
`
`-a
`
`[J
`Q
`@]
`~ ,......,
`~ ...
`Ole;)[
`WAfT
`[±]
`l~
`CA>oCO.
`~
`fOIT
`(h
`(ffi
`~
`F
`
`(KtY)
`
`~
`
`AT
`
`~
`
`p
`
`r
`r
`a
`C'
`o
`
`
`
`[
`K
`s
`>
`
`+
`<
`X
`e
`@
`=
`F
`
`E
`
`0
`
`9
`
`8
`
`7
`
`6
`
`5
`
`4
`3
`
`2
`
`1
`
`d
`c
`b
`a
`
`p
`c
`B
`
`A
`
`TABLE 1: ASCII character
`
`4. Any other character will be echoed as a BELL or "G (ASCII 07).
`
`Return, followed by a LineFeed (ASCII $0A = 10)
`3. A Carriage Return or "M (ASCII $00 ;;;;; 13) will echo as a Carriage
`
`CSUI Commands.
`initiate one of the special sequences described in the section on Special
`2. If you send one of the special control characters in Table 2, you will
`
`characters can be received.)
`CORE is sending an infrared signal, the interrupts are disabled and no
`You must wait for the echo before sending the next character. (If the
`CORE will echo the character sent at the completion of the command.
`as it would when the corresponding key is pressed on the CORE itself. The
`1. If you send one of the characters listed in Table 1, CORE will respond
`
`and so on.
`The next character sent to CORE over the serial port will again echo a ""'"
`activation of the serial interface.
`CORE display returns to the PAGE and KEY that was in effect prior to
`CORE_ will sound a reject tone and resume its normal operation. The
`received in an allotted period of time (default timeout = 3 seconds), the
`CSUI then waits for a character from the serial port. If a character is not
`User Interface then outputs a ",.," (ASCII $7E = 126) to the serial port.
`To enter serial mode, send any character over the serial port. CORE Serial
`
`to accept serial input).
`modes first. (Note: If the display is timed out, CORE will always be able
`to characters sent over the serial port. You must manually exit these
`learning a program or editing a definition manually, CORE will not respond
`line. For example, if you are in the middle of setting an event timer,
`with the time on the top line and the location displayed on the bottom
`To begin serial communication, CORE must be in its normal display state,
`
`Getting Started
`
`
`
`Universal Remote Control Exhibit: 1008 Page 000005
`
`5
`
`You can call CL9 Customer Service for information on how to get a software
`the commands may not apply, or there may be differences in application.
`and higher of the CORE software. If you have version 3.E or lower, some of
`Note: the documentation of the Special Commands applies to Version 4.0
`
`correct CSUI software.
`hexadecimal number. If the 2-digit number is 40 or greater, you have the
`You should see a 4-digit hexadecimal number,
`followed by a 2-digit
`upgrade. To find out what version you have, press the -+ key twice on CORE.
`
`~
`
`4
`
`serial receivers.)
`code becal)se it is an alternating bit pattern [0,1,0,1,0,1,0,1, which tends to clear
`initialized to zero for each new or re-tried block. ($55 was chosen as the C-NAK
`checksum re-calculated. This continues until all blocks are sent. The checksum is
`block is incorrect (C-NAK), in which case that block is sent again, and the
`not match, the host sends the CORE a "U" (ASCII $55 = 85) to tell the CORE the
`$20 = 32) to tell the CORE that the block is OK (CACK). If the checksum does
`calculated checksum. If the checksum matches, the host sends a "space" (ASCII
`The host should compare the checksum received from the CORE with its own
`
`(i.e. sum wraps at zero).
`overflow (result greater than 256) occurs when adding, the carry is thrown away
`The checksum is calculated by summing all bytes received or transmitted. If an
`block is sent or received, CORE sends an 8-bit checksum to the host computer.
`Data is transferred in blocks of 256 characters (or less, in some cases). When a
`The protocol for error-free data transfer is as follows:
`
`with a terminal.
`from CORE. Therefore, they are intended to be used with a host computer and not
`Most of the special commands involve transmission of long blocks of data to and
`
`Read a single key definition.
`Read CORE user memory.
`Set timeout.
`Send a program to CORE & run it.
`Carriage Return/Line Feed
`Replace user memory.
`Replace a single key definition
`Read the LCD display status
`Quit CSUI.
`Function
`
`Table 2: ASCII character
`
`"W
`"U
`"T
`"R
`"M
`"L
`"K
`"0
`"C
`
`keyboard commands. The functions are:
`These are additional commands usable only with CSUI, i.e. they are not CORE
`
`Special CSUI commands
`
`certain cases).
`pressing any keys on CORE (the results could be unpredictable in
`However, you should generally wait for CSUI to time out before
`4. CORE will also respond to physical keypresses while in CSUI.
`
`timed event has executed will simply appear solid.
`mode. For example, the bell symbol which normally flashes after a
`3. The cursor and other symbols will not flash or blink when in CSUI
`
`you are operating CORE directly from the CORE keyboard.
`infrared commands while in CSUI. Capturing can only be done when
`create new key definitions for CORE. However, you cannot capture
`2. You can go into learn mode with the ~ key (ASCII "[") in order to
`
`the section on Special Commands.
`increased (even made infinite) using the "T command, described in
`send a command. If desired, the length of the timeout can be
`must be careful to insure that CSUI is awake whenever you want to
`character. If you are writing a software program to use CSUI, you
`sent will NOT be seen as a command but will echo as a ""'" or wakeup
`time, normally 3 seconds. When CSUI times out, the next character
`1. You must be aware that CSUI "times out" after a certain amount of
`
`in the normal manner using the CORE keyboard:
`There are a few differences between operating CORE using CSUI and
`
`Reference Manual for information on the syntax of CORE commands.)
`the CORE keys from a computer or terminal. (Refer to the CORE
`Using the commands in Table 1 only, you can simulate the operation of
`
`The third column shows the key value as it appears in key definitions.
`simulate the CORE keys. CORE ethos the same character that is sent.
`Table 1 shows the ASCII characters which should be sent to CORE to
`
`
`
`Universal Remote Control Exhibit: 1008 Page 000006
`
`7
`
`6
`
`2 words to the IR definition.
`another length byte and a series of bytes as above. There are never more than
`If the 2nd word is present (as determined by Byte 2 above), there will be
`
`Bytes 3 -L:
`Byte 2: if bit 1 is set, there is a 2nd word. If bit 1 = 0, there's no 2nd word
`therefore the first word goes from Byte 1 to Byte L.
`Byte 1: length of 1st word of IR code (L). The length Includes byte 1;
`Byte 0: $21 or $23
`
`rest of 1 st word.
`
`The structure of the IR data is as follows:
`
`course, do not show up in the display).
`followed by several bytes of data representing the IR code itself (these bytes, of
`code, and is represented by a backward C symbol. Both of these values will be
`the C symbol on the display. A value of $23 refers to a "one-shot" type of IR
`3. A program value of $21 refers to an infrared (IR) code, and is represented by
`programmed intervals.
`2. A program value of $22 represents the h symbol that can appear in
`program 03 88 09 (all hexadecimal) translates to P 1-2 on the CORE display.
`1. If the high bit is set, the character is displayed with a dash. For example, the
`In addition, there are a few special values that may show up.
`
`Table 1 shows the key values for each CORE key.
`Each key on the CORE keyboard has a value from 0 to 31 ($1F).
`
`How to read key definitions
`
`F. Following the last definition are the bytes $0F-$FF-$00.
`That is, location 0-0 is first, followed by 0-1 (if present), etc. up to F(cid:173)
`The key definitions are sorted in ascending order by Page and Key.
`
`Length.
`Program: the program contains the number of bytes specified above in
`program
`program, and the next byte in memory will be the start of the next
`length of the program to follow. If the length is zero, there is no
`Length: a one-byte binary value from $00 to $FA representing the
`$FF.
`access Page location, e.g. location a-is represented as Page $0A, Key
`location of the program. A Key value of $FF is used to represent a direct(cid:173)
`Key: a one-byte binary value from $00 to $OF representing the Key
`Location of the program.
`Page: a one-byte binary value from $00 to $OF representing the Page
`
`structured in the following way:
`The key definitions, which normally begin at location $4280, are
`
`7D08: End of Key Definitions
`7D06: Start of Key Definitions (initialized to $4280; can be higher)
`7D04: Last Byte of Event Queue
`7D02: Next Event in Queue
`7DOO: Start Event Queue (normally points to $4200)
`Some important pointers (all pointers are two bytes, in low/high format)
`
`normal operation.
`$7900-$7FFF contains variables and workspace used by CORE during
`
`$4280 -?
`$4200
`The CORE usable memory space is from locations $4200 to $7FFF.
`
`User Key Definitions
`Event Queue
`
`knowledge of CORE data structures and memory usage.
`When using the special CSUI commands, it can be useful to have some
`
`CORE Memorv Usage
`
`
`
`Universal Remote Control Exhibit: 1008 Page 000007
`
`9
`
`8
`
`0 z
`~
`
`Figure 1: CORE Display
`
`Bit # = (Segment # -1 ) Mod 4
`Byte# = Integer((Segment # -1) -:-4)
`
`(Byte 0). The general formula =
`1, 2, 3 and 4 correspond to bits 0, 1, 2 and 3 of the first byte
`32nd bytes are actually meaningless). For example, segments
`first 30 bytes received with the "D command (the 31st and
`numbered from 1 to 120. These segments correspond to the
`segments as they are numbered on the CORE display. They are
`the next page shows the layout of the
`The diagram on
`
`relevant (the upper 4 contain junk and should be ignored).
`the CORE's LCD display. Only the lower 4 bits of each byte are
`1. 32 bytes representing the current state of each segment on
`
`68). CORE then sends the following data:
`The host sends a "0 (ASCII 04). CORE echoes a 0 (ASCII $44 =
`
`transmitted.
`status. The condition of each LCD segment and the display status is
`Description: This command is used to read the CORE's display
`
`Command: Read LCD display ("D).
`
`location that was active before CSUI was entered.
`to normal operation. The display will revert to the PAGE-KEY
`Description: This command is used to quit CSUI. The CORE returns
`
`Response: CORE sends back a "C" (ASCII $43 = 67)
`Command: Exit serial Interface mode ( AC)
`
`DescriPtions of the Soecial Commands
`
`
`
`Universal Remote Control Exhibit: 1008 Page 000008
`
`11
`
`10
`
`echo.)
`waiting 3 seconds, you can continue to send the "K until you receive the correct
`2. Wait 3 seconds, then send the 1'\K command in its entirety again. (Instead of
`this time is ignored).
`the current command and walt about 3 seconds for more Input (any Input during
`1. send any character other than C-ACK or C-NAK. This causes CORE to abort
`
`Recommended procedure: if you get an incorrect checksum from CORE:
`
`memory.
`received incorrectly by CORE, some garbage could get stored in your CORE's
`dangerous to try to recover from this, because if the Page, Key or Count were
`(incorrect) checksum + 2nd checksum (data only) ] mod 256. It's a little
`forgets to clear the checksum so that what it sends following the retry will = (1st
`First of all, on a retry, CORE expects data only (step 6). Then, on step 7, CORE
`
`error in the checksum and you send the C-NAK (ASCII $55 = 85)
`* Note on checksum: It's a little tricky to deal with the case where there is an
`
`If checksum is OK, sends C-ACK (ASCII $20 = 32). *
`1-byte checksum of bytes received
`Data block (0 to $FA bytes)
`Count byte (binary number of bytes of data to follow = $00 to $FA)
`keys)
`Key (binary number between $00 and $OF, or $FF for direct-access
`Page (binary number between $00 and $OF)
`K (ASCII $4B = 75)
`"K (ASCII $0B= 11)
`
`4. Host:
`3. Host:
`2. CORE:
`1. Host:
`The sequence goes as follows:
`
`8. Host:
`7.CORE
`6. Host:
`5. Host:
`
`erased.
`location in the CORE. Any previous key definition stored at the location is
`Description: This command is used to load a single key definition to a Page-Key
`Command: Replace a key definition ( AK)
`
`Bit 7 = is unused.
`Bit 6 = cursor is flashing
`Bit 5 = single step is flashing
`Bit 4 = 2ND is flashing.
`Bit 3 = EDIT is flashing.
`Bit 2 = Alarm symbol is flashing.
`Bit 1 = location is flashing (Edit mode)
`Bit 0 = bell is flashing.
`
`particular segment is flashing.
`3. 1 byte indicating which segment(s) are flashing. A 1 indicates a
`
`13 = on the Page (top line, left of dash)
`11 = on the Key (top line, right of dash.)
`9 = right arrow
`1-8 = position on the edit line
`0 = left arrow
`
`ignore the upper 4 bits)
`2. 1 byte indicating where the cursor is on the display. (again,
`
`
`
`Universal Remote Control Exhibit: 1008 Page 000009
`
`13
`
`12
`
`definitions, but the end of your program should not go past $7900.
`program as high in memory as possible, to avoid overwriting your key
`will overwrite whatever Is In memory. You should generally put a
`Note: if you are going to download a program to CORE memory, you
`
`Steps 6-7 repeated for # of blocks specified in step 4.
`
`If not OK, sends C-NAK (ASCII $55 = 85) & repeats block
`
`block.
`If checksum is OK, sends C-ACK (ASCII $20 = 32) & next
`1-byte checksum
`1st 256-byte block
`number of blocks (binary number between 1 and $FF) ..
`should be a value between $41 and $7F.
`at location $6000). Low byte must be $00; high byte
`present, the program will automatically download and run
`binary number in low/high format.
`(if this value is not
`optional address to load and run program: this is a 2-byte
`R (ASCII $52 = 82)
`AR (ASCII $12 = 18)
`
`3. Host:
`2. CORE:
`1. Host:
`The sequence goes as follows:
`
`7. Host:
`6. CORE:
`S.Host:
`4. Host
`
`CORE).
`superset of 6502 machine language (i.e. 6502 code will run on the
`loading. The CORE uses a Mitsubishi M50743 processor, which runs a
`the program will be loaded at $6000. The program will execute after
`language program to CORE's RAM and run it. If no address is specified
`Description: This command is used to load and execute a machine
`
`(ASCII $0D) AND line feed (ASCII $0A = 10)
`Character sent: "M (ASCII $0D = 13). CORE echoes a carriage return
`
`Command: Carriage Return (AM)
`
`stored in CORE's memory.
`Note: Using this command destroys all key definitions previously
`
`Steps 4-5 repeated for 63 blocks.
`
`If not OK, sends C-NAK (ASCII $55 = 85) & repeats block
`block.
`If checksum is OK, sends C-ACK (ASCII $20 = 32) & next
`1-byte checksum
`1st 256-byte block
`L (ASCII $4C = 76)
`"L (ASCII $0C = 12)
`
`5. Host:
`4. CORE:
`3. Host:
`2. CORE:
`1. Host:
`The sequence goes as follows:
`
`previously been saved on disk using the AU command
`Normally this command will be used to load a user file that has
`
`other variables.
`memory) used to save the key definitions and event queue, as well as
`This is the area of memory (locations $4100 through $7FFF of CORE
`Description: This command is used to replace the CORE user memory.
`
`Command: Download a program to RAM and run It ( AR)
`
`Command: Replace user memory ( AL
`
`
`
`Universal Remote Control Exhibit: 1008 Page 000010
`
`15
`
`14
`
`If checksum is OK, sends C-ACK (ASCII $20 = 32). *
`1-byte checksum of bytes sent
`Data block (0 to $FA bytes)
`programmed.
`($00 to $FA). A
`is not
`echoes Page, Key. Then sends length of program to follow
`access keys)
`Key (binary number between 0 and $F, or $FF for direct(cid:173)
`Page (binary number between 0 and $F)
`W (ASCII $57 = 87)
`"w (ASCII $17 = 23)
`
`4. Host:
`3. Host:
`2. CORE:
`1. Host:
`The sequence goes as follows:
`
`from the CORE's memory.
`Description: This command is used to read an individual key definition
`
`same 256-byte block again.
`if not OK, sends C-NAK (ASCII $55 = 85) & CORE sends
`sends next 256-byte block
`if checksum is OK, sends C-ACK (ASCII $20 = 32) & CORE
`1-byte checksum
`1st 256-byte block
`U (ASCII $55 = 85)
`"U (ASCII $15 = 21)
`
`5. Host:
`4. CORE:
`3. CORE:
`2. CORE:
`1. Host:
`The sequence goes as follows:
`
`Steps 4-5 repeated for 63 blocks.
`
`locations $4100 to $7FFF. The number of blocks transmitted is 63.
`Description: This command is used to read the CORE's memory, from
`
`Command: Read data from CORE's memory ( 1\U)
`
`done, the timeout is set to the default.
`NOTE: The default timeout is about 3 seconds. Whenever a c/reset is
`
`"T "A sets the timeout to 1 second ("A= ASCII 1).
`
`Examples: "T 1 sets the timeout to 49 seconds ( "1" = ASCII 49).
`
`= 84).
`The host sends a "T (ASCII $14 = 20). CORE echoes a "T" (ASCII $54
`
`CORE operation. The timeout can be from 1 to 51 seconds, or infinite.
`which is the amount of time that CSUI will run before exiting to normal
`Description: This command allows the user to alter the CSUI timeout,
`
`the "W command again.
`this is to send a C-ACK, so CORE will not repeat the data, and then send
`If CORE sends the wrong checksum back, the easiest way to deal with
`
`[1st (incorrect) checksum + 2nd checksum (data only) ] mod 256.
`checksum, so that what it sends following the retry will =
`Page, Key or Length byte). In addition, CORE forgets to clear the
`send the C-NAK (ASCII $55 = 85), CORE will re-send the data ONLY (no
`the checksum is wrong. If there is an error in the checksum and you
`* Note on checksum: It's a little tricky to deal with the case where
`8. Host:
`7. CORE:
`6. CORE:
`
`length of $00 means key
`
`5. CORE:
`
`CSUI will never time out. A number greater than 51 will default to 51
`The host then sends a binary number between 0 and 51. If zero is sent
`
`Command: Read a single key definition ( 1\W).
`
`Command: Set length of CSUI timeout (1\T)
`
`
`
`Universal Remote Control Exhibit: 1008 Page 000011
`
`16
`
`PIN 2
`CORE TRANSMITS ON
`
`PIN 3
`CORE TRANSMITS ON
`
`[§~I
`
`CARD EDGE
`
`101(
`R-4
`
`+SV
`
`CORE SERIAL PORT SCHEMATIC-o.sokol
`
`