RadioLocman.com Electronics ru
Advanced Search +
  

05-21-2008

Microcontroller Displays Multiple Chart or Oscilloscope Timing Ticks

While working with a 10-bit DI-184 module from Dataq to monitor and display vibration-sensor data, I found that, although the chart displays a time index, this time reference is not visible in the saved file. You can add time ticks, representing seconds or minutes, to a chart graphic by using a simple and inexpensive crystal-based microcontroller to generate a sequence of tags on a dedicated chart channel. Figure 1 shows a small, eight-pin 12F508 microcontroller from Microchip Technology that provides multiple timing ticks. Listing 1, the microcontroller’s program, offers four timing sequences. You can select a timing sequence by strapping pins 4 and 6 (Table 1).

Microcontroller Displays Multiple Chart or Oscilloscope Timing Ticks

The 4 MHz crystal maintains a solid instruction-timing reference, and equalized coded branches in the listing maintain accurate timing ticks. You can also configure the 12F508 with an internal, 4 MHz RC oscillator. You base the coded loops on a sequence of exactly 25 instructions, and they provide a fundamental, base-reference loop that is exactly 100 instructions. A 16-bit register counter serves as the multiplier to produce the base timing. For use with scopes, you can recode the listing with minor changes to use 50 instructions or a 50 µsec base-timing-tick minimum. The 8-bit registers in the equalized loop provide multipliers to produce the additionally tiered output. The microcontroller uses two output pins, 5 and 7, as a pseudo 2-bit DAC. This configuration generates one of four voltage levels for timing ticks that display continuously, and you can record them along with application data.

Slices ↓
Radiolocman facebook Radiolocman twitter Radiolocman google plus