Jump to content
ELFORUM - Forumul electronistilor

Moquito reppeler cu pic16f627


Recommended Posts

Buna ziua,

Avand in vedere ca au inceput sa apara tantarii care dau "like" la cei cu fereastra deschisa, am gasit un circuit cu pic 16f627 cu un fisier asm.

Link-ul catre pagina> http://320volt.com/en/pic16f627-ultrasonik-kedi-kopek-kovucu-devresi/

Cine ma poate ajuta cu o conversie din asm in hex?

 

; www.endtas.com/robot
; pest repeller source code
; ozkal ozsoy



PM_USED EQU 1

INCLUDE "16F627.INC"


; Define statements.
#define OSC 4

RAM_START EQU 00020h
RAM_END EQU 0014Fh
RAM_BANKS EQU 00003h
BANK0_START EQU 00020h
BANK0_END EQU 0007Fh
BANK1_START EQU 000A0h
BANK1_END EQU 000EFh
BANK2_START EQU 00120h
BANK2_END EQU 0014Fh
EEPROM_START EQU 02100h
EEPROM_END EQU 0217Fh

R0 EQU RAM_START + 000h
R1 EQU RAM_START + 002h
R2 EQU RAM_START + 004h
R3 EQU RAM_START + 006h
R4 EQU RAM_START + 008h
R5 EQU RAM_START + 00Ah
R6 EQU RAM_START + 00Ch
R7 EQU RAM_START + 00Eh
R8 EQU RAM_START + 010h
FLAGS EQU RAM_START + 012h
GOP EQU RAM_START + 013h
RM1 EQU RAM_START + 014h
RM2 EQU RAM_START + 015h
RR1 EQU RAM_START + 016h
RR2 EQU RAM_START + 017h
_freq EQU RAM_START + 018h
_sure EQU RAM_START + 01Ah
_dongu EQU RAM_START + 01Ch
_flag EQU RAM_START + 01Dh
_sayac EQU RAM_START + 01Eh
_sayac1 EQU RAM_START + 01Fh
_PORTL EQU PORTB
_PORTH EQU PORTA
_TRISL EQU TRISB
_TRISH EQU TRISA
#define _isikvar _PORTA_2
#define _PORTA_2 PORTA, 002h
#define _PORTA_3 PORTA, 003h
#define _PORTA_0 PORTA, 000h
#define _PORTA_1 PORTA, 001h

; Constants.
_durs EQU 00000h
INCLUDE "FAREKOV.MAC"
INCLUDE "PBPPIC14.LIB"

MOVE?CB 007h, CMCON
MOVE?CB 0FEh, TRISA
MOVE?CB 000h, TRISB
MOVE?CW 007D0h, _sure
MOVE?CB 002h, PORTA
MOVE?CB 000h, PORTB
SOUNDPIN?T _PORTA_3
SOUND?CC 06Eh, 005h
MOVE?CW 07530h, _freq

LABEL?L _dura 

LABEL?L _enbas 
HIGH?T _PORTA_0
PAUSE?C 00Ah
LOW?T _PORTA_0
MOVE?CW 03E80h, _freq
LABEL?L L00001 
CMPGT?WCL _freq, 0D6D8h, L00002
HPWM?CCW 001h, 07Fh, _freq
PAUSE?C 00Ah
NEXT?WCL _freq, 001F4h, L00001
LABEL?L L00002 
CMPNE?TCL _PORTA_1, 001h, L00003
GOTO?L _enbas
LABEL?L L00003 
MOVE?CW 03E80h, _freq
LABEL?L L00005 
CMPGT?WCL _freq, 0D6D8h, L00006
HPWM?CCW 001h, 07Fh, _freq
PAUSE?C 0C8h
NEXT?WCL _freq, 003E8h, L00005
LABEL?L L00006 
MOVE?CB 001h, _sayac1
LABEL?L L00007 
CMPGT?BCL _sayac1, 0FFh, L00008
MOVE?CB 001h, _sayac
LABEL?L L00009 
CMPGT?BCL _sayac, 0FFh, L00010
CMPGT?BBL _sayac, _sayac1, L00011
MOVE?CB 0F0h, PORTB
GOTO?L L00012
LABEL?L L00011 
MOVE?CB 00Fh, PORTB
LABEL?L L00012 
PAUSEUS?C 00Ah
NEXT?BCL _sayac, 001h, L00009
LABEL?L L00010 
NEXT?BCL _sayac1, 001h, L00007
LABEL?L L00008 
PAUSE?C 064h
MOVE?CB 0FFh, _sayac1
LABEL?L L00013 
CMPLT?BCL _sayac1, 001h, L00014
MOVE?CB 001h, _sayac
LABEL?L L00015 
CMPGT?BCL _sayac, 0FFh, L00016
CMPGT?BBL _sayac, _sayac1, L00017
MOVE?CB 0F0h, PORTB
GOTO?L L00018
LABEL?L L00017 
MOVE?CB 00Fh, PORTB
LABEL?L L00018 
PAUSEUS?C 00Ah
NEXT?BCL _sayac, 001h, L00015
LABEL?L L00016 
NEXTM?BCL _sayac1, 001h, L00013
LABEL?L L00014 
PAUSE?C 064h
MOVE?CB 001h, _sayac1
LABEL?L L00019 
CMPGT?BCL _sayac1, 0FFh, L00020
MOVE?CB 001h, _sayac
LABEL?L L00021 
CMPGT?BCL _sayac, 0FFh, L00022
CMPGT?BBL _sayac, _sayac1, L00023
MOVE?CB 0F0h, PORTB
GOTO?L L00024
LABEL?L L00023 
MOVE?CB 00Fh, PORTB
LABEL?L L00024 
PAUSEUS?C 00Ah
NEXT?BCL _sayac, 001h, L00021
LABEL?L L00022 
NEXT?BCL _sayac1, 001h, L00019
LABEL?L L00020 
PAUSE?C 064h
MOVE?CB 0FFh, _sayac1
LABEL?L L00025 
CMPLT?BCL _sayac1, 001h, L00026
MOVE?CB 001h, _sayac
LABEL?L L00027 
CMPGT?BCL _sayac, 0FFh, L00028
CMPGT?BBL _sayac, _sayac1, L00029
MOVE?CB 0F0h, PORTB
GOTO?L L00030
LABEL?L L00029 
MOVE?CB 00Fh, PORTB
LABEL?L L00030 
PAUSEUS?C 00Ah
NEXT?BCL _sayac, 001h, L00027
LABEL?L L00028 
NEXTM?BCL _sayac1, 001h, L00025
LABEL?L L00026 
PAUSE?C 064h
GOTO?L _enbas
END? 

END

 

 

L.E. Ce vrea sa spuna " I've read the posts all the time and I 've built the PIC16F627 with some modifications. The frequency is measured with a scan frequency or frequency meter between 20 KHz and 60 KHz. 
After loading the original HEX content into the programmer, CONGIG must be repaired to 3F54 
and downloaded."

 

Edited by amudsen
Link to comment

Schema poate fi oricum, problema e că țânțarii nu prea bagă în seamă chestiile astea, că nu-s audiofili. Când are nevoie de sânge, femela de țânțar nu mai ține cont de nimic.Plase la geamuri și dacă vrei să fii sigur, detonezi o pastilă fumigenă cu 10 minute înainte de culcare.Adică o pui pe un bec de veioză și o ții până iese tot fumul din ea.Lași câteva minute, aerisești bine camera și te culci.Sau dai cu spray prin toată camera, lași cinci minute să se sufoce insectele, apoi aerisești și gata.....nu te mai complica cu din astea, că nu au efect.La unele animale mai are efect, dar când le roade rău stomacul, nici acolo nu mai mere nimic.Testat temeinic, nu vorbe...

Edited by validae
Link to comment

Am facut montajul fara mosfet-uri pe un breadboard, prima reactie..... au zburat porumbeii de pe acoperis, dar nu am gasit nici o tantaroaica pentru masurarea stresului :85. Pe osciloscop se vede ca functioneaza, de auzit nu aud nimic, doar cel mic aude cica un tiuit enervant. Continui experimentul.... poate prind vreo femela (tantar).

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.Terms of Use si Guidelines