Welcome, Guest. Please Login or Register
Home Help Search Login Register
Pages: 1 2 
Send Topic Print
Why use a microcontroller? (Read 20559 times)
vic
Ex Member


Re: Why use a microcontroller?
Reply #15 - 06/02/10 at 22:19:21
 
Are you talking about the IsShooting variable ? I should probably comment on this in the other thread about the firmware, but it isn't used. Well, there is this line :
if (IsShooting = 0){

But it is always false. It is an assignment, and not a test (maybe a typo). Even with "==" instead of "=", it wouldn't do anything the ISR doesn't already do.
Back to top
 
 
IP Logged
 
Steve Chapman
Ex Member


Re: Why use a microcontroller?
Reply #16 - 06/03/10 at 01:45:03
 
I see it's not a boolean, though acts like it wants to be one.  I think the Arduino environment isn't using precisely the same syntax as C++, though I could be seriously mistaken. The idea behind the code snippet you mention is to turn the shutter off if the act of plugging in the controller inadvertently clicks the shutter. I don't think it acts as an assignment, although I'll have to double check the Arduino sketch documentation to see if you are correct. update: WRONG! I'm very mistaken.
Back to top
« Last Edit: 06/07/10 at 22:33:56 by N/A »  
 
IP Logged
 
Luke Skaff
Full Member
***
Offline


I love HDR

Posts: 40
East Coast, USA
Re: Why use a microcontroller?
Reply #17 - 06/03/10 at 04:04:26
 
The WR_ pin is pulsed four times from what I am seeing.  When the bracket software on the DS requests the arduino to take a shot two strobes of the WR_ line happen within ~3.5us of each other.  The WR_ line is then inactive for the length of the exposure time and then strobed again twice to signal the arduino to release the shutter at the end of the shot.

I do not think this is intentional (I may be misunderstanding the arduino code) it is probably just how the rumble routine works which is what the bracket software on the DS uses to trigger the arduino.  Steve, was it intended to strobe twice at the beginning and end of each shot?

The scope capture attached is zoomed in on the first two strobes of the four strobe sequence.

Steve & Achim, what is your guys status on the USB interface?  I have started a CPLD design to directly control a vinculum USB host from the GBA port.  It will allow parallel read and writes through DMA and it should be able to run as fast as you can write to the GBA bus.
Back to top
 

0_05s_capture_bracketsoftware2.gif (Attachment deleted)
WWW  
IP Logged
 
Steve Chapman
Ex Member


Re: Why use a microcontroller?
Reply #18 - 06/04/10 at 01:02:00
 
So Vic is correct, thank you Vic, for taking us to task with this alcohol-fueled error:

if (IsShooting = 0){

should be

if (IsShooting == 0){

Chalk it up to lack of care on my part.  (I'm quoting Dr. Hibbert...it's just a joke.)

Since this change makes the firmware untested (again) please hold off using this change on a shoot until I (or you) vet it.
Back to top
 
 
IP Logged
 
Steve Chapman
Ex Member


Re: Why use a microcontroller?
Reply #19 - 06/04/10 at 01:07:37
 
Luke, I didn't know it strobed twice. I think our controller is too busy setting things up in the interrupt service routine to notice the second pulse. Hopefully by correcting the error Vic took us to task for, the device will know to turn off the shutter click when it is powered up, and continue to behave as expected during shooting.
Back to top
 
 
IP Logged
 
Pages: 1 2 
Send Topic Print