Omega Vehicle Security HH508 Manuel d'utilisateur Page 12

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 20
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 11
10
RS-232 Operation Using Quick BASIC
The following example shows how to send command instruction and receive
data responses over the RS-232 interface using Quick BASIC.
The program example is set up on "COM1".
CLS
E$ = "A"
ST1:
CLOSE #1
OPEN "COM1:1200,E,7,1,DS,RS" FOR OUTPUT AS #1
PRINT #1, E$;
CLOSE #1
OPEN "COM1:1200,E,7,1,DS,RS" FOR RANDOM AS #1
ST2:
INPUT #1, A$
B$ = MID$(A$, 2, 6)
DEC = 0
F$ = "0123456789ABCDEF"
N = 6
FOR I = 0 TO 5
C$ = MID$(B$, N, 1)
N = N - 1
D = INSTR(F$, C$) - 1
DEC = DEC + (16 ^ I) * D
NEXT
DEC = DEC / 1000
C$ = MID$(A$, 1, 1)
Vue de la page 11
1 2 ... 7 8 9 10 11 12 13 14 15 16 17 18 19 20

Commentaires sur ces manuels

Pas de commentaire