Hardware Reference
In-Depth Information
Ploop2
MOV
AL,[DI]
; get a byte
OUT
DX,AL
; and save it to the buffer
INC
DI
; point to next location
CALL Sdelay
; sampling delay
LOOP Ploop2
; go back for more
POP
DS
POP
SS
POP
DI
POP
SI
POP
BP
; restore base pointer
RET
2
; bye!
Playb ENDP
; Delay routine to determine sampling rate
; called by Rec and Playb
; Registers used: BX,CX
; Parameters passed: none
Sdelay:
PUSH CX
; save current byte count
MOV
CX,BX
; sets time delay
Sloop:
LOOP Sloop
;
POP
CX
; restore byte count
RET
; back to the main loop
END
Strain measurement and display
The client is a manufacturer of aircraft undercarriage components and wishes to
carry out a series of strain measurements on structures when a stress is suddenly
applied. In addition, the company wishes to display the response to an impulse
force in real-time using a conventional oscilloscope-type display on the screen
of a PC.
Specification
The measurement interval is to range from approximately 200 ms to 3 s, and
the strain gauges and associated signal conditioning circuitry are expected to
produce signals in the range 250 mV. Eight sets of strain gauges are fitted to
the structural member under test.
Software
The quasi-real-time oscilloscope display can easily be developed in C or Quick-
BASIC. An unrefined (but nevertheless functional) routine is shown below. The
routine displays the analogue signal returned from the strain gauge fitted to
channel 0 (I/O address 300 hex.).
' Transient strain display
' PowerBASIC 3.5
' Runs in full screen mode
Search WWH ::




Custom Search