MediaWiki:Sitenotice:
2024-03-02: The wiki ran out of disk space, so things were not working. This has been resolved by adding another 5GB of quota ;-) Thanks to Tim Lindner for reporting the issues. 2020-05-17: If a page gives you an error about some revision not being found, just EDIT the page and the old page should appear in the editor. If it does, just SAVE that and the page should be restored. OS-9 Al (talk) 12:22, 17 May 2020 (CDT)

X10 Lighting Control

From CoCopedia - The Tandy/Radio Shack Color Computer Wiki
Revision as of 05:06, 30 March 2014 by Luis46coco (talk | contribs)
Jump to navigation Jump to search

X10 control card for TRS80 Color Computer, Hardware & Software, includes CM17A

It can be used for control Christmas Lights in the house. Put your CoCo to work controling lights & Appliances (other X10 components required)

Control X10 events on/off at specfic times up to 100 events.

Key in X10 commands to control up to 256 devices

Includes:

X10 card with Real Time Clock & CM17A firecracker transmitter

Circuit Schematic

Tech Note of theory of operation

Installation instructions

Basic and Machine Language programs on cassette tape

Hardcopy listing of source code


MANUAL

                  Copyright 2012 by:  John E. Hieber
   Tech-Note: Add Real Time Clock to the TRS-80 Color Computer 
              CoCo 1/2/3.  This tech-note also includes a circuit
              to control the X10 CM17A (Firecracker) transmitter.
   Sheets 1 thru 6 show schematics for alternate interface 
   circuitry to the DS1302 Real Time Clock.  A section of the 
   circuitry implements control of the CM17A transmitter.
   Addresses FD00-FDFF are used for these functions.
   A. Principle of operation for the DS1302.  Address lines A2-A5
      are used for the DS1302 several interface lines.
   1. A3 is used for the CE (chip enable) pin.  Assembly code 
      TST  FD08 will set CE to high level.  TST FD00  will set CE
      to a low level.
   2. A2 controls the CLK (clock) pin.  Code TST  FD04 will set 
      CLK high and TST  FD00 will set it low.
   3. To enable data bits to the I/O (input/output) pin A4 is used.
      Code TST  FD10 enables the data path to the DS1302.  Code
      TST  FD00 will disable the path.
   4. To send data bits (0/1) to the DS1302 (commands and 
      data), A5 is used in conjunction with A4 of item 3 and A3 of 
      item 2.  To send a bit=1 (A5), CE line must be high, I/O line
      must be high then CLK line must go high.
      A code sequence like:
          TST  FD08
          TST  FD38 or FD28 for bit=0
          TST  FD3C or FD2C for bit=0
      will send a data bit (A5)to the DS1302.
   5. To read data bits from the DS1302, after a command is sent
      requesting the value of hour, minute, second, etc.  The data
      path to the DS1302 must be disabled during reading.  A data
      bit is clocked from the DS1302 by setting the CLK pin low.
      A code sequence like:
          TST  FD08
          LDA  FD08
          TST  FD0C 
      will transfer a data bit from the DS1302.
   6. Data is sent and received (to/from) the DS1302 low order 
      bit (LSB) first.
REV. 1/2013  
   B. Principle of operation for the X10 CM17A.  Address lines 
      A0 & A1 are used for the CM17A two interface lines. Note,
      the IC 1488 interface to the CM17a requires +/-12V. Wires
      must be added internally to bring these voltages to the
      cartridge 40 pin connector (pins 1 & 2).
   7. When the CM17A is in standby both interface line must be at
      low level.  Code TST  FD00 will set both lines at zero.
   8. To cause the CM17A to transmit a bit=0, A1 is high while A0 
      is low.  Code TST  FD02 will set bit=0 state.  Likewise to 
      transmit bit=1, code TST  FD01 which sets A1 low and A0 high.
   9. The CM17A requires the bit state held for 0.25 milliseconds
      followed by standby state held for 0.25 milliseconds, this
      results a 0.5 millisecond pulse for each bit transmitted.
   10. The code sequence to transmit a bit=0:
            TST   FD02
            CALL  HLFDLY    .25 ms delay
            TST   FD00 
     CALL  HLFDLY    .25 ms delay
   11. The code sequence to transmit a bit=1:
            TST   FD01
            CALL  HLFDLY    .25 ms delay
            TST   FD00 
     CALL  HLFDLY    .25 ms delay
   12. A X10 control command consists of 40 bits, a 16 bit header
       a 16 bit command/unit and a 8 bit trailer. 
   C. Circuit components are available which include the IC's and
      DS1302 with the crystal (32.768Kz).  Misc parts such as
      wires, sockets, resistor, capacitors, etc are not included.
   D. Software is available which includes functions for both the 
      Real Time Clock and the CM17A X10 transmitter.  Includes
      both executable code and source code on cassette tape.  A
      hard copy of the Machine Language (ML) code is included.
   E. Contact the author by e-mailing john.e.hieber at juno.com 
      for availability and prices.
   F. Sheet 5 & 6 shows the schematic using programmable peripheral
      interface adapter IC's.  The Z80 PIO and the MC6821.
REV. 1/2013

Basic Program: (Patrial listing)

    10 ' CONTROL X10 DEVICES
    20 ' COPYRIGHT AUG 2011
    30 ' BY JOHN E HIEBER
    40 ' REVISED: 5/12/2013
    50 CLEAR 1000
    60 'MACHINE LANGUAGE LEN=657
    70 'CHK PT FILE LEN=607
    80 BA=PEEK(27)*256+PEEK(28)-657
    90 TB=BA-607
    100 'CHK PT FILE DEFINITION
    110 'BYTE 1 IS # ENTRY IN FILE
    120 'BYTE 2-3 IS TIME FOR FIRST ENTRY
    130 'BYTE 4-7 IS CMD OF FIRST ENTRY
    140 'REPEAT 2-7 FOR EACH ENTRY
    150 IFPEEK(32768)<>ASC("E") THEN 180
    160 DEF USR=BA
    170 GOTO 200
    180 POKE275,INT(BA/256):POKE276,BA-INT(BA/256)*256
    190 'CHK PT FILE WORK AREA
    200 HA=347:'CUURENT HOUR IN BCD
    210 MA=348:'CURRENT MIN IN BCD
    220 FX=349:'FUNCTION CALLED 1-5
    230 A1=350:'ARGUMENTS
    240 A2=351:A3=352
    250 DIM CM$(100),TM(100)
    3350 '-HELP, DISPLAY KB CMDS
    3360 'S9
    3370 PRINT"H, HELP, DISPLAY KB CMDS"
    3380 PRINT"AHHMM NA2, ADD X10 CMD AT HHMM"
    3390 PRINT"THHMM OR T, SET OR SHOW TIME"
    3400 PRINT"NA11, TURN ON MOD A UNIT 11"
    3410 PRINT"FB7, TURN OFF MOD B UNIT 7"
    3420 PRINT"L, DISPLAY LIST OF X10 CMDS"
    3430 PRINT"L20-23 OR LS-SORT LIST"
    3440 PRINT"Z5-8,DELETE ITEMS 5-8 FROM LIST"
    3450 PRINT"ZX, DELETE ALL ITEMS FROM LIST"
    3460 PRINT"S, SAVE CMD LIST TO TAPE"
    3470 PRINT"SI, SAVE CMD LIST->CHK PT"
    3480 PRINT"R, RELOAD CHK PT TAPE->LIST"
    3490 PRINT"RA, ADD CHK PT TAPE->LIST"
    3500 PRINT"X, BACKUP X10 PROGRAM TO TAPE"
    3510 PRINT"XL, BACKUP X10 & LIST TO TAPE"
    3520 PRINT"A,F,L,N,R,S,T,X,Z,H";
    3530 RETURN