picaxe just not fast enough.

madguernseyboy

New Member
using the curcit in the pdf below. i have attached a picaxe to a flash gun.

but when i run my program and pop a balloon i dont get to freeze the action. i am just too late to even see the balloon bursting. is the picaxe too slow?

http://www.rev-ed.co.uk/docs/picaxe_sound.pdf

Code:
' *** Directives ***
	#com 3				' specify download port
	#picaxe 20M2			' specify processor
	#no_data				' save time downloading
	#terminal off			' disable terminal window
	


' *************************************************************
' ********************* Begin Main Program ********************
' *************************************************************

' *** Set up the input and output pins ***
 	dirsB = %11111111			' set all portB pins as outputs
 	dirsC = %10010001			' set C pins 65321 as inputs
'	pullup  %00000000			' internal pullup resistor not 
						' used
	gosub WriteLCD					' Update Display text

do

	if MIC = 1 then gosub Fire		        ' If Pin MIC is high 
								' then trigger camera
	if  MODE = 1 then gosub ModeButton	' if Pin MODE is High
								
	if  UP = 1 then gosub UpButton		' if Pin UP is High
								' then add 50 ms
	if  DOWN = 1 then gosub DownButton	' if Pin DOWN is High
								' then sub 50 ms 
debug


loop
any advice welcome.
Thank you
Brendan
 

Technical

Technical Support
Staff member
The main problem is the 'debug' command in the loop - it is very slow to process. Take it out.
You can also speed up the system 8x by adding 'setfreq m32' as the first line in the program
 

KeithRB

Senior Member
If that is still too slow, just cut out the middleman and let the sound trigger trigger the flash directly.
 

nick12ab

Senior Member
And then since you're using a PICAXE 20M2, if after that it's still too slow then you can simply drop in a 20X2 instead which will do 64MHz.
 

hippy

Technical Support
Staff member
It might be a good idea to search the forum for past projects for triggering flash; I recall there were some impressive water droplet photographs. The people doing that may have advice.

The big question is; how soon do you need to trigger the flash after the balloon is first pricked ?

And how are you detecting that burst - from the linked PDF filename; are you using sound ?

I suspect the PICAXE and flash triggering lag will have that missed so it may be better to start the flash and then pop the balloon.
 

madguernseyboy

New Member
Sorry for the slow reply. I have had no Internet.

All great comments. My total circuit allows for lazer triggering so I will look into that aswell as the 20x2

Thanks all
Will keep posted if I ever finish

Mgb
 
Top