2 Cmucams?

I figured a bit of stereovision would be neat this year, and plan to use two CMUCams. My question is this - how would I hook them up? One would obviously be hooked up via the TTL-RS232 converter, and the other one? Into the programming port, possibly?

I looked at Kevin Watsons serial drivers, and this might be a possibility.

Anyone else have any ideas?

yeah you can hook up the second camera to the programming port. in kevin watsons code there is an option for enabling this serial port. It is used in the same exact way as the ttl port

You would actually have to duplicate Kevin’s code, IIRC. Otherwise, I think the states will trample on each other.

I think that many interrupts per second would kill the controller anyways. 11520 interrupts a second x 2.

Again, you don’t have a clue what you’re talking about. Please stop spreading disinformation around the forums.

The camera only generates a few hundred interrupts per second, one per byte received. The serial driver is very efficient and can easilly handle this load.

Furthermore, there is no reason that you couldn’t have two instances of the camera code running, you just need to make sure each instance isn’t using the other’s global variables.

-Kevin

Technically, he is right. in an UART, each byte is 10 bits (1 start, 8 data, 1 stop). running at 115200 continuously gives 115200/ 10 * 2 interrupts / second for the recievers alone.
Of course, the PIC can handle that, considering that the cameras will not continuously send data, however, a few thousand interrupts per second will be generated.

The UART only triggers interrupts when it a packet hits on the Rx side. The CMU cam only puts out a few hundred interrupts per second.

Okay, whatever :rolleyes:

-Kevin

All,

While we did not run 2 cameras, in 2005 we moved the camera to port 1 (programming port) and installed a SMiRF on port 2 to enhance code development.

We had no problems with interrupt overhead.

Regards,

Mike

We can choose to argue about the details, but the point that we agree on is that the Robot Controller can easily handle 2 CMU Cam’s with your code.

I don’t choose to argue about anything. I’m right and you’re wrong. The serial data from the camera generates just over one hundred interrupts per second, not “a few thousand” and certainly not “11520”.

-Kevin

You’re right. I believed that the data packets were larger, but after checking the code carefully I found that I was wrong. Sorry if I seemed too jumpy.