I am interesting in implementing a communication link between a Canon digicam (or any other digicam...) and a microcontrolled unit (e.g. Pic driven or whatever). Could you share your experience?
What kind of microcontroller should I use?
Hi,
First of all you will need to know the communication specification of the camera you want to use. This specs are generally not available. Then you will need a cpu like avr, with some ammount of memory around it, if you want to download pictures. Then, you have to connect with the camera using a usb host controller. I suggest uhc124 or similar from www.transdimension.com .
Actually, i do not like to download any picture from the camera but more upload small files (about 1 kBytes) to the camera memory card.
Concerning the AVR, do you mean the "ATMEL AVR FAMILY BOARDS"?
Do you have any idea if I could use a pic microcontroller to controll the USB host (from transdimension or Philips maybe?)
So, as far as i understand, the global system may be composed of a USB Host controller connected to a microprocessor/microcontroller(?), a power supply and a A/B USB cable?
Hi,
Yes AVR from atmel. If you are familiar with pics, no problem. I am not familiar with philips usb host controller, but transdimension is designed for embedded systems (8bit data). If you have enough pins, you can connect it to whatever you wish, pic, 51, avr, etc. Generally, the system in configuration described by you should be enough.
Right, let's say we have the following constellation:
-PIC ucontroller (with enough pins and enough memory)
-Transdimension USB host controller
Where should I go next? Here is what I think:
- get insight in the USB "on the go" protocol
- get info on the digicam specs but if not available... reverse engineer the signal sent by a PC trying to do exactly the same than my embedded system using either the Gphoto2 tool under linux or the Canon (in my case) SDK.
the roadmap is good, but with few comments:
-reverse engineering on usb protocol is not that easy as with rs232, but not impossible
-it is preferably to obtain communication specs. if you try to communicate with camera with reverse engineered commands, strange results may appear. even if the chances are very low, you have to consider that you may damage the camera. several types of data are sent/received to/from a digital camera. of course, the most important are file communications data (which in fact is you primary interest) but also other potentially "dangerous" data may flow through usb (system commands, firmware update commands, etc.) . with these you should take care. good luck.
Considering the reverse engineering part; do you have any recommendation.
Here is what i am planning:
- introduce a sniffer on the usb bus
- launch a command from the pc, e.g. "capture picture"
- trigger a logic analyzer at the launch command
- save the trace
- analyze the trace considering the USB protocol standard
- ... work hard ...
- implement the trace in the microcontroller and send it to the camera via the USB host controller.
Considering the reverse engineering part; do you have any recommendation.
Here is what i am planning:
- introduce a sniffer on the usb bus
- launch a command from the pc, e.g. "capture picture"
- trigger a logic analyzer at the launch command
- save the trace
.....
1. Which USB host controller development board should I use?
2. Keeping in mind the low power consumption which host controller chip is preferable?
3. For debugging purpose, and considering a low amount of transfered data, is a software based USB sniffing (Bus Hound, USB Monitor, Snoopy, etc...) a reliable solution?
4. Comments and development guidelines are very welcomed!