Realtime control, interception of microsecund pulses is possible with BS or Prop ?
CuriousOne
Posts: 931
Hello.
The question is as follows:
We have two data lines, clock and data. The clock pulses are sent each 10 microsecond, data pulse is sent on fall of clock pulse and may be up to 20 times longer than clock pulse. The task is as follows: capture both clock and data pulses and forward them to output, but analyze the data pulses and replace certain sequence of pulses with another sequence. The sequence length to be analyzed and modified is 11 data pulses, which can take up to 2.2 millisecond in total.
Is this doable with parallax products?
The question is as follows:
We have two data lines, clock and data. The clock pulses are sent each 10 microsecond, data pulse is sent on fall of clock pulse and may be up to 20 times longer than clock pulse. The task is as follows: capture both clock and data pulses and forward them to output, but analyze the data pulses and replace certain sequence of pulses with another sequence. The sequence length to be analyzed and modified is 11 data pulses, which can take up to 2.2 millisecond in total.
Is this doable with parallax products?
Comments
The Propeller's instruction time is 50ns (for most instructions). Spin operations take on the order of a few us. For an example of speed, there's an asynchronous serial I/O driver that handles over 750KB with the low level I/O written in assembly language. There's a similar serial I/O driver written all in Spin that can handle 19.2KB.
Then it should be fairly straight forward to use the falling edge of the clock pulse to start one of the counters and the appropriate edge of the data pulse to stop it. The value in the counter would indicate the type of data pulse. One cog could decode the incoming pulses and store the result in hub memory, a second cog processes (converts/transfers as required) the data sequences, and a third cog outputs the processed data and clock pulses.