Sensor
The sensor provides several ways to feed your circuit with data from the external world. You can partially configure the sensor before placing it on the design surface, or provide all the details in the dialog. To launch the sensor dialog, double-click it when the program is in editing mode.
To configure the sensor, first select the sensor type, then provide other data required by the selected type.
Here is a list of the available sensor types:
-
Series
Allows you to provide a series of sensor measurements separated by spaces. Each measure is in the form {cycle}:{value}, where both cycle and value are hexadecimal numbers.
- If the cycle is an even number or 0, it corresponds to a clock change from 0 to 1 (rising edge).
- If the cycle is odd, the clock changes from 1 to 0 (falling edge).For example:
1:4 2:5 6:F 9:4
This will set the sensor output to:
- 4 on the falling edge of the first cycle
- 5 on the rising edge of the second cycle
- F (15 in decimal) on the rising edge of the third cycle, and so on.If you check "Repeat series," the cycle will repeat after the series ends. If unchecked, the sensor will output the last value until power is turned off.
-
Random
In this mode, the sensor outputs random numbers at random clock cycles. You can specify the minimum and maximum number of cycles before a change occurs.
-
Manual
This mode allows you to manually enter a new value in hexadecimal format. The new value will be output after the "Enter" key is pressed or when the input loses focus.
-
Key Code
In this mode, the output will be the number of the key pressed on the keyboard. The key code is an 8-bit number, so if fewer than 8 bits are specified, the number will be truncated.
-
ASCII Code
In this mode, the output will be the ASCII code of the key pressed on the keyboard. The ASCII code is an 8-bit number, so if fewer than 8 bits are specified, the number will be truncated.
-
Sequence
In this mode, the sensor will output the next sequential number starting from 0.
-
Clock
The clock mode will output the current time of day in BCD format, with 32 bits divided into 4 groups of 8 bits each, representing hours, minutes, seconds, and hundredths of seconds.