
4-3
DATASONICS
User’s Manual
March 1997
4.2.4 Microcontroller
The microcontroller(U8) provides the system timing and computing power.
U8 operates at a clock frequency of 12Mhz controlled by crystal X1. When
power is applied, a power on reset pulse is generated by R16 and C17. This
positive pulse initializes U8. The key pulse is output from Port 2.7, and the
low going pulse generated by the receiver is input to interrupt 1 of U8. The
Key input comes into interrupt 0 of U8. To generate the RS-232 output, U8
sends data to the RS-232 driver(U7). The analog output is generated by
sending data to the 12 bit D to A(U4). The output of U4 is then amplified by
opamp (U5). The Error output is sent out port 2.6 of U8.
4.3 Firmware Description
4.3.1 Main Program
The program generates the key pulse, which causes a 200khz burst to be
transmitted as described in section 4.2.2. The transmission is detected by
interrupt 1, which starts a 1
µ
s timer. If the transmission is not detected, the
program will output “E1" on the RS-232 output. The program then waits
133mS for an echo. Once an echo is received, it stops the timer, and
calculates the range. If no echo is received, the timer is stopped and the
range is assumed to be 99.99 meters. If averaging is enabled this range will
be run through the algorithm described in section 4.3.2. The range or
averaged range is then sent to the RS-232 and Analog outputs, and the error
output is set or cleared as required. If in internal Key mode the microcontroller
will wait 200ms from the previous key before sending another key pulse, thus
starting the whole cycle over again. If in external key mode, the
microcontroller will wait for a low going pulse on the Key In input, before
sending the next Key pulse.
Содержание PSA-916
Страница 2: ......
Страница 7: ...Section 6 Drawing List 6 1...