Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   VEX (http://www.chiefdelphi.com/forums/forumdisplay.php?f=162)
-   -   Reading Interrupt Ports (http://www.chiefdelphi.com/forums/showthread.php?t=67726)

ManicMechanic 19-05-2008 16:16

Reading Interrupt Ports
 
I tried posting this in the Programming thread a while ago but didn't get any takers, and the question has come back to haunt me. I use EasyCv2 for Vex and would like to know how to read the values of the 6 interrupt ports (similar to the way that you use GetDigitalInput(I) to read one of the digital input ports). Basically, I want to create something similar to the FVC/FTC competition template, where I can select between autonomous and R/C, but not be limited by the 20 second/2 minute demarcations of the template the way it currently exists. Does anyone know how to do this?

gblake 19-05-2008 20:33

Re: Reading Interrupt Ports
 
Quote:

Originally Posted by ManicMechanic (Post 749107)
I tried posting this in the Programming thread a while ago but didn't get any takers, and the question has come back to haunt me. I use EasyCv2 for Vex and would like to know how to read the values of the 6 interrupt ports (similar to the way that you use GetDigitalInput(I) to read one of the digital input ports). Basically, I want to create something similar to the FVC/FTC competition template, where I can select between autonomous and R/C, but not be limited by the 20 second/2 minute demarcations of the template the way it currently exists. Does anyone know how to do this?

I think that any instructions able to do this will either have to be imbedded in a slug of User Code blocks, or be a chunk of ordinary C code that a User Code block or a User-defined routine refers to.

So... If you are asking if EasyC 2.X exposes a built-in interrupt reader to users, I think you are out of luck. If you are willing to dive into using ordinary C to write an interrupt detector, that is a different kettle of fish.

Invoking a home-brew detector from within an EasyC 2.X routine might be possible. If it is, I'll leave up to someone else to describe how to do that

Nathan 20-05-2008 11:29

Re: Reading Interrupt Ports
 
EasyC Pro in the Vex mode has a block titled "Interrupt Watcher" which would probably work for you?

I don't have access to EasyC v2 for Vex right now so I don't know if there is a similar function.

ManicMechanic 26-06-2008 12:43

Re: Reading Interrupt Ports
 
Quote:

Originally Posted by Nathan (Post 749269)
EasyC Pro in the Vex mode has a block titled "Interrupt Watcher" which would probably work for you?

I don't have access to EasyC v2 for Vex right now so I don't know if there is a similar function.

I haven't found "Interrupt Watcher" in v2, but I did stumble across the answer to my question in a roundabout way. Under the Input menu, the Ultrasonic Sensor command uses interrupts. You could just send out a dummy output and receive the interrupt input.


All times are GMT -5. The time now is 22:17.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi