|
|||||||||||||||||||||||||||||||||||||||
|
| |||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
|
|
![]() |
|
Back View. Power button on the left, Shutter button on the right. |
Schematic of shutter button. There are two signals on the left side of the button and there are two ground contacts on the right. Both signals should be connected to the ground simultaneously. Also they should be connected for 0.5 - 1.5 seconds. Our assembler program for PIC processors can generate pulses - approximately every 8.5 seconds it generates 0.5 sec impulse. |
|
PIC12F509_Timer.asm
You can use this program for small-size PICs, like PIC12F509 or PIC12F675.
The code example: ; Simple program in assembler language for PIC processor (PIC12F509) ; from www.RoboHobby.com ; May be used for timer for Kite Aerial Photography (KAP) ; as a timer program. ; Very esy can be corrected for other PICs. ; ; URL: http://www.RoboHobby.com/genius_g-shot_d612.jsp ; ; list p=12F509 #include count1 EQU 0x08 ;loop variable count2 EQU 0x09 ;loop variable count3 EQU 0x0A ;loop variable count4 EQU 0x0B ;loop variable count5 EQU 0x0C ;loop variable count6 EQU 0x0D ;loop variable ledset1 EQU 0x11 ;value 1 for output to the port ledset2 EQU 0x12 ;value 2 for output to the port GPI2 EQU 0x15 ;GPIO replacement for debug ;********************************************************** ; The program * ;********************************************************** INDF EQU 00H ; PCL EQU 02H ; STATUS EQU 03H ; GPIO EQU 06H ; TRISIO EQU 85H ; FSR EQU 04H ; ORG 0x00 ; clrf GPIO ; movlw b'000101000' ; bcf STATUS,05 ; tris 6 ; movlw 0x17 ; movwf ledset1 ; movlw 0x00 ; movwf ledset2 ; loop1 movf ledset1,w ; movwf GPIO ; cycle1 movlw 0x02 ; movwf count1 ; cycle2 movlw 0xFF ; movwf count2 ; cycle3 movlw 0xFF ; movwf count3 ; cycle4 decfsz count3,f ; goto cycle4 ; decfsz count2 ; goto cycle3 ; decfsz count1 ; goto cycle2 ; loop2 movf ledset2,w ; movwf GPIO ; cycle5 movlw 0x2F ; movwf count4 ; cycle6 movlw 0xFF ; movwf count5 ; cycle7 movlw 0xFF ; movwf count6 ; cycle8 decfsz count6,f ; goto cycle8 ; decfsz count5 ; goto cycle7 ; decfsz count4 ; goto cycle6 ; goto loop1 ; END : ************************************************* |
|
Also you can use our forum - www.RoboHobby.com/forum |
My Skype name is oleg_skp Start Skype text chat
View Skype profile
Start Skype voice call
Add to Skype contact list
Leave voicemail using Skype
Send a file using Skype
Note: To use these links the Skype program should be installed on your computer. You can load it for free from their official site: www.Skype.com
------------------ ICQ: 358189820 Current Status:
|
|