MagneticSensorChessBoard1987

From BITPlan Wiki
Jump to navigation Jump to search

UniChess87-0044.JPG

Hardware

Front

UniChess87-0035.JPG

Back

UniChess87-0036.JPG

Connectors

UniChess87-0037.JPG UniChess87-0038.JPG UniChess87-0039.JPG

Schematics

Parts:

  1. TTL 74151 8 to 1 Multiplexer TTL74151 Pins.jpeg
  2. TTL 74154 4 to 16 Demultiplexer TTL74154 pins.png

Unichess87-Schematics.JPG

Partlist

  1. chess plan 35 mm fields
  2. 64 Reed Contacts
  3. 16 Black Chess Pieces
  4. 16 White Chess Pieces
  5. 32 magnets
  6. 17 red LEDs
  7. On/Off switch
  8. Male Sub-D Connector 15
  9. Adapter cable Centronics - SUB-D 15 Female
  10. Copper Tape
  11. Aluminum Frame
  12. 1 TTL 74151
  13. 1 TTL 74154
  14. 330 Ohm Resistor
  15. Batteryholder for 3 x AA

Software

Centronics Port Check

DATA SEGMENT PUBLIC 'DATA'

DATA ENDS
DGROUP GROUP DATA
       ASSUME CS:ADDS,DS:DGROUP,SS:DGROUP

ADDS SEGMENT 'CODE'
PUBLIC CheckBrett,Sound

Sound PROC FAR ; Freq,Time: INTEGER;
  PUSH BP
  MOV BP,SP
  PUSH DI
  MOV DI,8[BP] ; Freq;
  MOV BX,6[BP] ; Time;

  MOV AL,0B6H ; Zeitgeber Modus-Register schreiben
  OUT 43H,AL
  MOV DX,14H   ; Zeitgeber Divisor =
  MOV AX,4F38H ; 1331000/Frequenz
  DIV DI
  OUT 42H,AL   ; Zaehler in niederw. Byte Timer 2
  MOV AL,AH
  OUT 42H,AL  ; Zaehler in hoeherw. Byte Timer 2
  IN AL,61H   ; Aktuelle Einstellung Port B
  MOV AH,AL   ; In AH Sichern
  OR AL,3     ; Lautsprecher einschalten
  OUT 61H,AL

Warte:
  MOV CX,2801  ; 10 Millisekunden warten

LS_Ein:
  LOOP LS_Ein
  DEC BX       ; Einschaltzaehler auf 0?
  JNZ Warte    ; wenn nicht Lautsprecher anlassen

  MOV AL,AH    ; Port wiederherstellen
  OUT 61H,AL


  POP DI
  POP BP
  RET 4
Sound ENDP

CheckBrett PROC FAR  ;d,l: INTEGER: BOOLEAN
  PUSH BP
  MOV BP,SP
  CLI
  MOV AX,8[BP]   ; d
  MOV CX,6[BP]   ; l
  MOV DX,0278h
  OUT DX,AL      ; Port[Data]:=D
  INC DX
  IN AL,DX
  XCHG AL,CL
  DEC DX
  OUT DX,AL     ; Port[Data]:=l
  STI
  MOV AX,0
  AND CL,080h
  JNZ FALSE

  INC AX

FALSE:

  POP BP
  RET 4

CheckBrett ENDP


ADDS  ENDS
      END