A method and apparatus for detecting an event and sampling first value from a pin in response to the event. For example, the event is identified by a signal object of a plurality of signal objects stored in a memory. Each signal object of the plurality of signal objects identifies a single analog input pin and a trigger.

Claim:

What is claimed is:

1. A method comprising: detecting a first event, wherein the first event is identified by a first signal object stored in memory, the first signal object is one of aplurality of signal objects, and each signal object respectively identifies one and only one signal; and sampling a first value from a first pin in response to the first event.

2. The method of claim 1, further comprising: detecting a second event, wherein the second event is specified by a second signal object stored in memory; and sampling a second value from the first pin in response to the second event.

3. The method of claim 2, wherein: the first event occurs at a first rate; the second event occurs at a second rate; and the first rate is different from the second rate.

4. The method of claim 2, further comprising: converting the first value to a first digital value; storing the first digital value in a first register, wherein storing the first digital value comprises accessing the first signal object; converting the second value to a second digital value; and storing the second digital value in a second register, wherein storing the second digital value comprises accessing the second signal object.

5. The method of claim 1, further comprising: modifying the first signal object such that the first signal object specifies a modified first event, wherein the modified first event occurs at a rate different from a rate at which the first eventoccurs.

6. The method of claim 1, further comprising: detecting a first priority associated with the first pin, wherein the detecting the first priority comprises accessing the first signal object.

7. The method of claim 6, further comprising: detecting a second priority associated with the first pin, wherein the detecting the second priority comprises accessing a second signal object, and the second priority is different from the firstpriority.

8. The method of claim 1, further comprising: receiving information about the first signal; specifying a value for at least one parameter of a plurality of parameters included in the first signal object; and storing the first signal object inmemory.

9. The method of claim 1, further comprising: detecting whether a first sample window specified by the first signal object is open.

10. The method of claim 9, wherein sampling the first signal is enabled in response to detecting that the first sample window is open.

11. An apparatus comprising: a control circuit configured to detect a first event; a memory configured to store a plurality of signal objects, wherein each signal object respectively identifies one and only one signal, and the first event isidentified by a first signal object of the plurality of signal objects; and a sampling circuit configured to sample a first value from a first pin of a plurality of pins in response to the first event.

12. The apparatus of claim 11, wherein the control circuit is further configured to detect a second event, wherein the second event is specified by a second signal object stored in memory; and the sample circuit is further configured to samplea second value from the first pin in response to the second event.

13. The apparatus of claim 12, wherein: the first event occurs at a first rate; the second event occurs at a second rate; and the first rate is different from the second rate.

14. The apparatus of claim 12, further comprising: an analog-to-digital converter (ADC) configured to convert the first value to a first digital value and convert the second value to a second digital value, wherein the first signal objectcomprises a register configured to store the first digital value, and the second signal object comprises a register configured to store the second digital value.

15. The apparatus of claim 11, wherein the control circuit is configured to modify the first signal object such that the first signal object specifies a modified first event, wherein the modified first event occurs at a rate different from arate at which the first event occurs.

16. The apparatus of claim 11, wherein the first signal object specifies a first priority associated with the first pin.

17. The apparatus of claim 16, wherein a second signal object specifies a second priority associated with the first pin, wherein the second priority is different from the first priority.

18. The apparatus of claim 11, wherein the control circuit is configured to receive information about the first signal, specify a value for at least one parameter of a plurality of parameters included in the first signal object, and store thefirst signal object in memory.

19. The apparatus of claim 11, wherein the control circuit is configured to detect whether a first sample window specified by the first signal object is open.

20. The apparatus of claim 19, wherein sampling the first signal is enabled in response to detecting that the first sample window is open.