10.2 Special Function Registers |
The SP-ICE-3 Card makes the states of several dedicated, single-purpose input channels available in the form of the read-only Special Function Registers: SFR0, SFR1.
SFR | Signals |
---|---|
SFR0 | StartMark, AbortMark, PartSensor, and LaserAlarm |
SFR1 | MOTF Encoder Channels and Part Sensor |
For custom applications, the SFRs can be accessed programmatically via the SfioAPIRead function.
The SP-ICE-3 Configuration Tool (SPICE3Config.exe) can also be used to display the current states of the SFRs.
Please follow 17.1 Accessing the card with the SP-ICE-3 Configuration Tool before moving on to the next step.
Select the SFR tab.
Scroll and resize it, if necessary, so that the SFR0 table is visible.
Each signal (e.g. Abort Mark
) has a group of three bits assigned to it in SFR0:
Name | Description |
---|---|
signal Deasserted | 1 if the state of the signal input has changed from Asserted to Deasserted since the last time SFR0 was read, 0 otherwise. |
signal Asserted | 1 if the state of the signal input has changed from Deasserted to Asserted since the last time SFR0 was read, 0 otherwise. |
signal State | The current state of the signal input: 1 if currently Asserted, 0 otherwise. |
Deasserted | Asserted | State | Description |
---|---|---|---|
0 | 0 | 1 | The signal's state is currently Deasserted, and has not changed since the last time SFR0 was read. |
1 | 0 | 0 | The signal's state is currently Deasserted, and has changed from Asserted to Deasserted since the last time SFR0 was read (i.e. a deasserting edge was detected). |
0 | 0 | 0 | The signal's state is currently Deasserted, and has not changed since the last time SFR0 was read. |
0 | 1 | 1 | The signal's state is currently Asserted, and has changed from Deasserted to Asserted since the last time SFR0 was read (i.e. a asserting edge was detected). |
0 | 0 | 1 | The signal's state is currently Asserted, and has not changed since the last time SFR0 was read. |
1 | 1 | 1 | The signal's state is currently Asserted, and has changed from Deasserted to Asserted and back to Deasserted at least once since the last time SFR0 was read (i.e. at least one asserting and deasserting edge pair was detected). |
Please follow 17.1 Accessing the card with the SP-ICE-3 Configuration Tool before moving on to the next step.
Select the SFR tab.
Scroll and resize it, if necessary, so that the SFR1 table is visible.
Each signal (e.g. Part Sensor
) has a single bit assigned to it in SFR1:
Name | Description |
---|---|
signal | The current state of the signal input: 1 if currently Asserted, 0 otherwise. |