Announcement

Collapse
No announcement yet.

PiTone-v2-by-Eddy71 Has anyone on here built this ?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #31
    Originally posted by Eddy71 View Post

    If you are interested in a more complete description, here I argue with the author of the idea of "Pirate" and explain how the details on the indicated node of the circuit work:

    https://md4u-ru.translate.goog/viewt..._x_tr_pto=wapp
    Hi Eddy71,

    thanks for the link. I had a look at it. Now it is more clear how it works. Thanks again.

    GeoMax

    Comment


    • #32
      so while waiting for them to come back from newyear... I guess they can have holidays too been messing with the Pic16lf1823 I can now get it to dump serial comms @ 9600 out of where the motor should be.. planning to output data so I can see it on screen while trying to setup detector..

      Comment


      • #33
        https://www.youtube.com/watch?v=fD57KGaGZBM
        surfdetector so his video needs more views

        Comment


        • #34
          Hi David_1

          This video is excellent!!! It helps a lot to find easy the correct damping resistor for your DIY detector coil without experimenting much.
          Thanks to Surfdetector (for making the video) and David_1 to highlight this to us.

          GeoMax

          Comment


          • #35
            am I really the only one on here with an interest in the PiTone-v2-by-Eddy71 has anyone got a pic16f1823 or pic16lf1823 ? on a detector am a little surprised lol

            Comment


            • #36
              Originally posted by David_1 View Post
              am I really the only one on here with an interest in the PiTone-v2-by-Eddy71 has anyone got a pic16f1823 or pic16lf1823 ? on a detector am a little surprised lol

              Not the PICF1823 but use the PICF88 and the PICF1501 in my HH2 PI detector.
              https://www.geotech1.com/forums/foru...ake-on-the-hh2

              The source code for both are posted in the thread.
              The 16F88 does all the PI timing including reading the adjustment Pot setting (Pots into PIC ADC). The PICF1501 does the audio threshold and tone generation.

              Also, the pin pointer I built uses a PIC1840. This is a design by Teemo in this thread:
              https://www.geotech1.com/forums/foru...ector-project=


              Microchip and many, many PIC's so not likely two of us pick the same one.

              Comment


              • #37
                Originally posted by waltr View Post
                Microchip and many, many PIC's so not likely two of us pick the same one.
                This is true but thanks for the reply, now looking at your links

                Comment


                • #38
                  faraday tape, I bought a 40mm wide tape thinking I could cut it into the width best suited to wind over a coil.
                  https://www.amazon.co.uk/dp/B09HZTFW...roduct_details
                  Click image for larger version

Name:	Faraday tape.jpg
Views:	287
Size:	128.8 KB
ID:	408762
                  so yes with some care you can solder to it, first I soldered a bit of used solder wick, thinking it might be more gentle (Its plastic ?), then I just soldered a wire direct.
                  This tape has a conductive glue so just over winding it makes a connection on both sides.
                  But yes you can melt the tape with a soldering iron

                  Comment


                  • #39
                    Use extra flux.

                    Comment


                    • #40
                      hi friends can ennyone here help me i just use pic16f1824 it seem like pic16f1823 the problem is when led light just one led blinking with sound . what is the problem help . if ennyone can modified hex for pic16f1824 help me friends. [email protected]

                      Comment


                      • #41
                        So I just tried to compile it for the 1824. no clue if it works ? do not have one to try it !
                        Attached Files

                        Comment


                        • #42
                          Hex file are nearly impossible to modify.
                          You require the Source code to load into MPLAB then built for the correct PIC number.

                          Comment


                          • #43
                            Originally posted by waltr View Post
                            Hex file are nearly impossible to modify.
                            You require the Source code to load into MPLAB then built for the correct PIC number.
                            not really, been reworking hex files for many years, the trick is do you really want to spend the time, if that answer is yes
                            start by setting up MPlabx for the real chip importing the hex, then its possible to export the disassembly into a file.
                            At this point its not much use, but you can make choices on what you see, Eddy's code was written in C I Knew this
                            but Eddy was kind enough to tell me which "C".. So then I had more than enough to understand the hex, The code I have now will recompile and byte for byte match the original.
                            But even that is not so useful I then added many comments, but I still can not test it as my PCB's are stuck Chinese new year, Well they are in transit now yay

                            I have a pic here wired to the leds all that code has been tested, I added code to pump out serial rs232.. all in a chip that only had a few words spare, but then its not really the same code...
                            here is the start up code well as I see it
                            bugger the formatting is lost in the cut and paste.
                            sorry for the gibberish but its part of how I keep track of original code.

                            Code:
                            START ;
                            MOVLW 0x57 ;D87 1840 72F 3057
                            MOVWF TEMP1 ;0x77 ; 1841 730 00F7
                            MOVLW 0x20 ;D32 1842 731 3020
                            MOVWF FSR0L ;FSR0L ; 1843 732 84
                            MOVLW 0x00 ; 1844 733 3000
                            MOVWF FSR0H ;0x5 ; 1845 734 85
                            L00Px735 CLRF INDF0 ;CLEAR 87 REG'S ; 0x0 ; 1846 735 180
                            INCF FSR0L, F ; 1847 736 0A84
                            DECFSZ TEMP1, F ; 1848 737 0BF7
                            GOTO L00Px735 ; 1849 738 2F35
                            
                            CLRF TEMP2 ; 1850 739 01F8
                            CLRF TEMP3 ; 1851 73A 01F9
                            CLRF TEMP4 ; 1852 73B 01FA
                            CLRF 0x7B ;
                            CLRF 0x7C ; 1854 73D 01FC
                            CLRF 0x7D ; 1855 73E 01FD
                            CLRF 0x7E ; 1856 73F 01FE
                            ;---------------------------------------------------------------------------------------------------------------------------------------
                            MOVLW 0x20 ;CLEAR 32 REG'S 1857 740 3020
                            MOVWF TEMP1 ; 1858 741 00F7
                            MOVLW 0xA0 ;D160 1859 742 30A0
                            MOVWF FSR0L ; 1860 743 84
                            MOVLW 0x0 ; 1861 744 3000
                            MOVWF FSR0H ; 1862 745 85
                            L00Px746 CLRF INDF0 ;CLEAR 32 REG'S 1863 746 180
                            INCF FSR0L, F ; 1864 747 0A84
                            DECFSZ TEMP1, F ; 1865 748 0BF7
                            GOTO L00Px746 ;CLEAR 32 REG'S 1866 749 2F46
                            CLRF 0x20 ; 1867 74A 01A0
                            ;---------------------------------------------------------------------------------------------------------------------------------------
                            ;0111 1 = 16 MHz HF x1x = Internal oscillator bloc
                            ;0111 1010
                            ; 111 1 = 16 MHz HF
                            ; 1x = Internal oscillator bloc
                            MOVLW 0x7A ;0111 1010 1868 74B 307A
                            MOVLB BANK1 ;0x1;Move literal to BSR 1869 74C 21
                            MOVWF OSCCON ;0x19 ; 1870 74D 99
                            ;---------------------------------------------------------------------------------------------------------------------------------------
                            MOVLB BANK3 ;0x3;Move literal to BSR 1871 74E 23
                            CLRF ANSELA ;0xC; 1872 74F 018C
                            CLRF ANSELC ;0xE; 1873 750 018E
                            MOVLB BANK2 ;0x2;Move literal to BSR 1874 751 22
                            CLRF CM1CON1 ;0x12; 1875 752 192
                            CLRF CM1CON0 ;0x11; 1876 753 191
                            ;?
                            CLRF CM2CON1 ;0x14 ; 1877 754 194
                            CLRF CM2CON0 ;0x13 ; 1878 755 193
                            ;-----------again !
                            MOVLW 0x7A ; ; 1879 756 307A
                            MOVLB BANK1 ;0x1;Move literal to BSR 1880 757 21
                            MOVWF OSCCON ;0x19 ; 1881 758 99
                            MOVLW 0x13 ; ; 1882 759 3013
                            MOVWF WDTCON ;0x17 ; 1883 75A 97
                            MOVLB BANK2 ;0x2;Move literal to BSR 1884 75B 22
                            CLRF FVRCON ;0x17 ; 1885 75C 197
                            MOVLB BANK1 ;0x1;Move literal to BSR 1886 75D 21
                            BCF ADCON1,0 ;00 =VREF+ is connected to AVDD ;0x1E, 0x0; 1887 75E 101E
                            BCF ADCON1,1 ;0x1E, 0x1; 1888 75F 109E
                            MOVLW Adress0x10 ; 1889 760 3010
                            MOVLB BANK3 ;0x3;Move literal to BSR 1890 761 23
                            MOVWF ANSELA ;PORTA; 1891 762 008C
                            MOVLW 0x00 ; 1892 763 3000
                            MOVWF ANSELC ;0xE; 1893 764 008E
                            MOVLB BANK1 ;0x1;Move literal to BSR 1894 765 21
                            BSF ADCON1,4 ;0x1E, 0x4; 1895 766 161E
                            BCF ADCON1,5 ;0x1E, 0x5 ; 1896 767 129E
                            BSF ADCON1,6 ;0x1E, 0x6 ; 1897 768 171E
                            BCF ADCON1,ADFM ;7 0 = Left justified. Six Least Significant bits of ADRESL ;0x1E, 0x7 ; 1898 769 139E
                            BSF ADCON0,ADON ;0 ;0x1D, 0x0 ; 1899 76A 141D
                            MOVLW 0x0C ; 1900 76B 300C
                            MOVWF TEMP2 ; 1901 76C 00F8
                            MOVF ADCON0,W ; 0x1D, W ; 1902 76D 081D
                            ANDLW 0x83 ; 1903 76E 3983
                            IORWF TEMP2, W ; 1904 76F 478
                            MOVWF ADCON0 ;0x1D ; 1905 770 009D
                            MOVLW 0x08 ; 1906 771 3008
                            MOVLB BANK4 ;Move literal to BSR 1907 772 24
                            MOVWF WPUA ; 1908 773 008C
                            MOVLB BANK1 ;0x1;Move literal to BSR 1909 774 21
                            BCF OPTION_REG,7 ;7 0 = Weak pull-ups are enabled by individual WPUx latch values ;0x15, 0x7 ; 1910 775 1395
                            MOVLW 0x01 ; 1911 776 3001
                            MOVLB BANK4 ;Move literal to BSR 1912 777 24
                            MOVWF WPUC ;0xE; 1913 778 008E
                            MOVLB BANK1 ;0x1;Move literal to BSR 1914 779 21
                            BCF OPTION_REG,7 ;7 0 = Weak pull-ups are enabled by individual WPUx latch values ;0x15, 0x7; 1915 77A 1395
                            MOVLW 0x1F ; 1916 77B 301F
                            MOVWF TRISA ; 1917 77C 008C
                            MOVLW 0x0F ; 1918 77D 300F
                            MOVWF TRISC ;0xE; 1919 77E 008E
                            MOVLW 0xF0 ; 1920 77F 30F0
                            MOVLB BANK5 ;Move literal to BSR 1921 780 25
                            ANDWF CCP1CON,F ;0x13, F; 1922 781 593
                            MOVLB BANK2 ;0x2;Move literal to BSR 1923 782 22
                            BSF LATA,Coil5 ;TURN ON SPEAKER0xC, 0x5; 1924 783 168C
                            BCF LATC,Sounder5 ;TURN OFF SPEAKER0xE, 0x5; 1925 784 128E
                            BCF LATC,Motor4 ;TURN OFF SPEAKER0xE, 0x4; 1926 785 120E
                            MOVLW 0xC8 ;D200 1927 786 30C8
                            MOVLB BANK0 ;0x0;Move literal to BSR 1928 787 20
                            MOVWF 0x3C ; 1929 788 00BC
                            CALL TEST_T2CON_Z ;L0X3 ; 1930 789 2003
                            MOVLW 0x01 ; 1931 78A 3001
                            MOVWF 0x3C ; 1932 78B 00BC
                            MOVLW 0xF4 ; 1933 78C 30F4
                            MOVWF 0x3B ; 1934 78D 00BB
                            CLRF 0x3E ; 1935 78E 01BE
                            MOVLW 0xC8 ;D200 1936 78F 30C8
                            MOVWF 0x3D ; 1937 790 00BD
                            CALL L0x2C ; 1938 791 202C
                            GOTO L0xE8 ;GO READ COIL! 1939 792 2.80E+09
                            
                            then with another type of disassembler you can get C'ish code
                            
                            void main()
                            {
                            unsigned int batt_voltage;
                            unsigned int new_sensitivity, old_sensitivity = 1;
                            accumulate_measure_cnt = ACCUMULATE_MEASURE_CNT;
                            measurecnt = accumulate_measure_cnt;
                            sensitivity_flag = TRUE;
                            pulse_flag = FALSE;
                            beepdivider = 2048;
                            beepcnt = 2048;
                            lv_time = LV_TIME_DIVIDER;
                            lv_flag = FALSE;
                            startup_delay = STARTUP_DELAY;
                            cal_cnt = 0;
                            pulse_time_reload = PULSE_TIME_DIVIDER;
                            pulse_time = pulse_time_reload;
                            sensitivity_time = SENSITIVITY_TIME_DIVIDER;
                            motion_cal_cnt = 0;
                            
                            // oscillator
                            OSCCON= 0xF0;
                            // GPIO init
                            // PORT A
                            TRISA.TRISA0 = IN; // sensitivity
                            PORTA.RA0 = 1;
                            TRISA.TRISA1 = IN; // low battery detection
                            PORTA.RA1 = 1;
                            TRISA.TRISA2 = IN; // motion / non-motion switch
                            PORTA.RA2 = 1;
                            TRISA.TRISA3 = IN; // pinpoint button
                            PORTA.RA3 = 1;
                            TRISA.TRISA4 = OUT; // clk out
                            PORTA.RA4 = 1;
                            TRISA.TRISA5 = IN; // clk in
                            PORTA.RA5 = 1;
                            
                            // PORT C
                            TRISC.TRISC0 = OUT; // audio
                            PORTC.RC0 = 1;
                            TRISC.TRISC1 = IN; // comparator in
                            PORTC.RC1 = 1;
                            TRISC.TRISC2 = IN; // comparator in
                            PORTC.RC2 = 1;
                            TRISC.TRISC3 = OUT; // detect out
                            PORTC.RC3 = 1;
                            TRISC.TRISC4 = OUT; // comparator out
                            PORTC.RC4 = 1;
                            TRISC.TRISC5 = OUT; // pulse out
                            PORTC.RC5 = 1;
                            
                            // Analog input pins
                            ANSELA.ANSA0 = 1; // sensitivity potmeter in
                            ANSELA.ANSA1 = 1; // low battery detection
                            ANSELC.ANSC1 = 1; // pulse in
                            ANSELC.ANSC2 = 1; // pulse in
                            
                            // timer 1 gating
                            T1GCON.TMR1GE = 1;
                            T1GCON.T1GPOL = 1; // timer 1 gate active high
                            T1GCON.T1GTM = 0;
                            T1GCON.T1GSPM = 0;
                            T1GCON.T1GSS1 = 1; // comparator 2
                            T1GCON.T1GSS0 = 1; // comparator 2
                            T1CON.T1CKPS0 = 0;
                            T1CON.T1CKPS1 = 0; // timer 1 prescaler = 0
                            T1CON.TMR1CS0 = 1; // timer 1 clock = Fosc
                            T1CON.TMR1CS1 = 0; // timer 1 clock = Fosc
                            T1CON.T1OSCEN = 0; // timer 1 internal oscillator
                            T1CON.TMR1ON = 1; // timer 1 active
                            TMR1H = 0; // initial timer values
                            TMR1L = 0;
                            ​​

                            Comment


                            • #44
                              Use CODE tags (the '#' button in the editor toolbar), or use Courier font.

                              Comment


                              • #45
                                Originally posted by Carl View Post
                                Use CODE tags (the '#' button in the editor toolbar), or use Courier font.
                                sorry did know we had that here ... is it too late to edit ?

                                Comment


                                • Carl-NC
                                  Carl-NC commented
                                  Editing a comment
                                  Be quick, you have 30 min after posting.
                              Working...
                              X