Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Nov 13th, 2007, 12:49 AM   #1
KaibutsuX
Newbie
 
Join Date: Nov 2007
Posts: 3
Rep Power: 0 KaibutsuX is on a distinguished road
Lightbulb USB Newb Question

Hey all,

This is my first post and I'm just looking for some information. I'd done a little bit of research but I'm not even sure what I should be looking for so I was hoping you guys could help.

Here's what I'm interested in. I want to control my Canon 300D SLR via the USB port on my Sony PSP most likely through C++ compiled for my PSP's firmware. All I'm interested in is simply tripping the shutter and holding it open for bulb exposures if times that can be selected in the software.

My problem is I have no idea how USB works or how to access/send signals from code. But I do NOT need to send data, I simply need to emulate closing a circuit in the USB cable. I'm assuming thats what I need to do because I have a self-built shutter release using simple electronics parts. It consists of a box with a toggle switch and a push button. The control then interfaces with the camera via headphone jack. So all the power is supplied via the camera's jack, and when I push the button, the circuit is complete.

But now I want to know how to do this exact same thing but using software and USB. Obviously my USB cable will have one end in my PSP and the other will be spliced into a headphone package.

So if anyone could give me any web resources or any advice on where to start looking to research this I would appreciate it. Obviously I will need to to know the pinout diagrams for USB so that I know which pins to splice to the headphone jack and then I just need to know how to "close the circuit" via software. Don't worry about the PSP stuff, just assume I was doing this on the PC.

I appreciate any help you guys/girls can give me.

Thanks,
Sean
KaibutsuX is offline   Reply With Quote
Old Nov 13th, 2007, 1:12 AM   #2
mrynit
Hobbyist Programmer
 
mrynit's Avatar
 
Join Date: Mar 2006
Location: WA, USA
Posts: 332
Rep Power: 3 mrynit is on a distinguished road
Send a message via AIM to mrynit Send a message via MSN to mrynit Send a message via Yahoo to mrynit Send a message via Skype™ to mrynit
Re: USB Newb Question

first make sure you can even do this. is there a C++ ,or some other language, compiler for your modle/version of the PSP. Look to see if anyone has alread done usb controlling software on a PSP. if the answer is no to any of these then you got a lot of work cut out for you.
__________________
i dont know much about programming but i try to help
mrynit is offline   Reply With Quote
Old Nov 13th, 2007, 2:04 AM   #3
KaibutsuX
Newbie
 
Join Date: Nov 2007
Posts: 3
Rep Power: 0 KaibutsuX is on a distinguished road
Re: USB Newb Question

From what I can see, there are no homebrew apps that utilize USB interface. However I think the PSP situation should be irrelevant right now.

In the simplest example of what I'm trying to accomplish, imagine that you had a USB cord plugged into your PC. Then stick a 5V LED into the other end of the USB cable. What kind of code would be required to close 5V circuit and light the LED?

If that is possible, then I can figure it out from there.
KaibutsuX is offline   Reply With Quote
Old Nov 13th, 2007, 8:59 AM   #4
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Re: USB Newb Question

I would suggest that you do some research on USB. USB is a serial interface comprising 2 data wires (90 ohm impedance) and 2 power wires. Unlike RS-232, there are no "level oriented" signals (RTS, etc.) to switch. All operations are achieved by data communications between the host and the device.

It is not absolutely necessary that the device come with a device driver, though some may. This is because there are several predefined "device classes" for the more common types of devices. A host is supposed to support these classes, but not all do.

You sound a little behind the curve on both the software and hardware characteristics. You might wanna remedy that before you go around sticking paper clips into the socket.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Nov 13th, 2007, 7:04 PM   #5
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Re: USB Newb Question

I did some looking around. There are a number of USB interface boards available, including experimenter's breadboard types. These come with USB controllers on them, set up to provide various kinds of I/O. This one has 12 bits of I/O: 4 out and 8 in. There are 4 LEDs you can jumper to the outputs, and a DIP switch to control the inputs.

It's 29 bucks for the kit, 34 assembled.

You say you need to close a circuit. I don't know if you mean you need a contact closure or to yank a signal to ground or Vcc. If it's a contact closure, you need to know the impedance, so you can choose an appropriate FET, or possibly a mini-relay. You should be able to adapt your existing shutter release.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Nov 13th, 2007, 8:41 PM   #6
KaibutsuX
Newbie
 
Join Date: Nov 2007
Posts: 3
Rep Power: 0 KaibutsuX is on a distinguished road
Re: USB Newb Question

Thanks DaWei, I think this is what I've been looking for.
KaibutsuX is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Disassembly and USB hardware devices -IK- Assembly 5 Jul 9th, 2007 9:48 PM
How to post a question nnxion C++ 10 Jun 3rd, 2005 11:53 AM
How to post a question nnxion C++ 0 Jun 3rd, 2005 8:55 AM
How to post a question nnxion C 0 Jun 3rd, 2005 8:55 AM
Newb question: What is the difference between "\n" and endl? uman C++ 7 Jan 17th, 2005 3:46 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 1:00 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC