Announcement

Collapse
No announcement yet.

dspic30f4011 4 sample pulses

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

  • #16
    Hi Moodz
    would it be possible to get a copy of the latest code for the 4011 please
    and is it still without the xtal ?
    thanks
    6666

    Comment


    • #17
      Originally posted by 6666 View Post
      Hi Moodz
      would it be possible to get a copy of the latest code for the 4011 please
      and is it still without the xtal ?
      thanks
      6666
      Here it is ... however you need to connect 10 Mhz Crystal.

      The serial port is currently on the programming pins ....

      moodz.

      Metal23_4011.zip

      Click image for larger version

Name:	4011.JPG
Views:	1
Size:	139.8 KB
ID:	330291

      Comment


      • #18
        Thanks Moodz
        and this cct is still valid with 10mhz xtal
        cheers
        6666


        Comment


        • #19
          Originally posted by 6666 View Post
          Thanks Moodz
          and this cct is still valid with 10mhz xtal
          cheers
          6666



          .... it should work ... the rs232 comes out of the ICSP port not as indicated on the drawing ( convenient for pickit2 UART tool ). 10 Mhz instead of 4 Mhz

          I wired up the board but not with an LCD or rotary switch ... works OK on serial port. Let me know if it works or I will change code :-)

          moodz

          Comment


          • #20
            Hi Moodz,
            I compiled successfully the source code you provided (after I specified the new locations for p30f4012.inc and p30f4012.gld files). I also had to set the heap size into Build Options->MPLAB Link30 - I set 1000bytes, is it ok?). When I use the PICKit2 programmer, I get a warning that "Some configuration words not in hex file. Ensure the default values above right are acceptable.".There is a Configure->Configuration Bits tab in MPLab, do we have to select some values in there, or can you provide a configuration in the code?

            Regards,
            Nicolae

            Comment


            • #21
              the heap only needs to be set to 200 bytes ...

              the remaining settings as follows ..

              moodz

              Click image for larger version

Name:	settings.JPG
Views:	1
Size:	68.2 KB
ID:	330383

              Comment


              • #22
                Hey moodz and all, Just getting back in to some detector design after a hiatus and was out detecting the other day and had an idea and I want to know if it has ever been implemented. Using a gyro or accelerometer to adjust the speed of the filter based on head speed, Where I am in central Vic the ground is a bi%$h and can change tone three times in the one sweep the main thing that defines a signal though is how long it is present, so sweeping slow it will be present longer and faster it will just be a blip. Normally this wouldn't be an issue but if you are sweeping fairly fast and hit a hot pocket of ground it comes through as a signal but if you where running the filter update a bit faster it wouldn't. You could make the base update timing user settable and then adjust it according to head speed ?. Hopefully this made sense and im not just rambling.

                Comment


                • #23
                  Originally posted by moodz View Post
                  the heap only needs to be set to 200 bytes ...

                  the remaining settings as follows ..

                  moodz

                  [ATTACH]17930[/ATTACH]
                  Hi Moodz,
                  Thank you very much for the details. It appears there are some settings straight into code that overwrite what you mentioned in the screenshot for the configuration bits (for example, the code instructs for internal RC oscillator, while the config settings are selecting an external crystal). All these are basic things and easy to change for people who have a bit of experience with PIC programming.
                  Also, the Pic Kit 2 software still raises the warning no matter what I tick/untick in the configuration bits, maybe this is a bug in the Microchip software? You indicated protection of the code, if I understand in your settings, but won't this prevent updating the chip with a newer version?

                  Best regards,
                  Nicolae

                  Comment


                  • #24
                    Originally posted by maca404 View Post
                    Hey moodz and all, Just getting back in to some detector design after a hiatus and was out detecting the other day and had an idea and I want to know if it has ever been implemented. Using a gyro or accelerometer to adjust the speed of the filter based on head speed, Where I am in central Vic the ground is a bi%$h and can change tone three times in the one sweep the main thing that defines a signal though is how long it is present, so sweeping slow it will be present longer and faster it will just be a blip. Normally this wouldn't be an issue but if you are sweeping fairly fast and hit a hot pocket of ground it comes through as a signal but if you where running the filter update a bit faster it wouldn't. You could make the base update timing user settable and then adjust it according to head speed ?. Hopefully this made sense and im not just rambling.
                    Hi Maca ... that makes sense ... the filter parameters could be driven off the sweep speed.
                    I will have a think about it and see what we can come up with.

                    moodz.

                    Comment


                    • #25
                      Originally posted by nick_f View Post
                      Hi Moodz,
                      Thank you very much for the details. It appears there are some settings straight into code that overwrite what you mentioned in the screenshot for the configuration bits (for example, the code instructs for internal RC oscillator, while the config settings are selecting an external crystal). All these are basic things and easy to change for people who have a bit of experience with PIC programming.
                      Also, the Pic Kit 2 software still raises the warning no matter what I tick/untick in the configuration bits, maybe this is a bug in the Microchip software? You indicated protection of the code, if I understand in your settings, but won't this prevent updating the chip with a newer version?

                      Best regards,
                      Nicolae
                      Hi Nick .. the original code did use the internal oscillator however there was too much jitter so we switched to a crystal.

                      this is the line of code that does this ...

                      _FOSC(CSW_FSCM_OFF & XT_PLL16 ); // 10mhz * 16 / 4 = 40 mips on ext osc


                      Some other settings like brownout and start up delay and tx pulse polarity are set by ...

                      /* enablebrownout @4.2v, 64ms powerup delay, MCLR pin NOT active */
                      #ifdef BUILD_TXLO
                      _FBORPOR(PBOR_ON & BORV_42 & PWRT_64 & MCLR_DIS & PWMxL_ACT_LO); //TX pulse is active lo
                      #else
                      _FBORPOR(PBOR_ON & BORV_42 & PWRT_64 & MCLR_DIS & PWMxL_ACT_HI); //TX pulse is active hi
                      #endif


                      and finally the code protection settings only prevent the chip being copied ... they dont prevent it being reprogrammed ... this code does this....

                      #ifdef __DEBUG // secret squirrel code protect ... too bad this is open source ;-)
                      _FGS( CODE_PROT_OFF & GWRP_OFF );
                      #else
                      _FGS( CODE_PROT_ON & GWRP_ON);
                      #endif


                      Post up your software versions ... there are bugs ( features ) in different versions.

                      Press help / about MPLAB IDE and then press copy. ( see below ).

                      MPLAB 8.66.00.00 Certified
                      Windows XP 5.1.2600.2 Service Pack 3n\a
                      ICDDB 7.51.00.01 n\a
                      MasterDB 2.24.42.76 n\a
                      PCMDB2k 2.22.01.15 n\a
                      PMFDB4k 2.22.03.00 n\a
                      DLLInfoRec 8.62.01.0 Certified
                      DMCI 1.10.0.6 Certified
                      FieldOrientedControlTI1.00.09.00 Certified
                      ICD2 8.53.6.1 Certified
                      KeeloqPlugin 1.0.0.18 Certified
                      MemGauge 1.00.00.00 Certified
                      MP32MXSK 1.2.0.0 Certified
                      MP32SKCBP 1.1.3.0 Certified
                      MP4KE18E 2.70.00.00 Certified
                      MP4KE18X 2.60.00.00 Certified
                      Mp4keDSC 2.60.00.00 Certified
                      MPAppInOut 1.0.0.0 Certified
                      MPBootloader 1.0.0.5 Certified
                      MPChecksum 2.22.02.16 Certified
                      MPDebugger 3.10.00.00 Certified
                      MPDevice 2.40.00.00 Certified
                      MPDiff 1.01.00.00 Certified
                      MPDisplay2 3.56.02.00 Certified
                      MPDisplays 3.56.02.00 Certified
                      MPE12xxx 4.44.00.00 Certified
                      MPE16xxx 4.62.00.00 Certified
                      MPE17XXX 4.44.00.00 Certified
                      MPE18EXX 4.44.00.00 Certified
                      MPE18HC3 4.44.00.00 Certified
                      MPE18XXX 4.44.00.00 Certified
                      MPEditor4 4.56.00.00 Certified
                      MPEditorStg 1.02.00.00 Certified
                      MPExpress 2.30.00.00 Certified
                      MPForum 3.02.00.00 Certified
                      MPI2KVerify 1.0.0.153 Certified
                      MPICD3 1.0.3.30 Certified
                      MPIce2K 4.64.00.00 Certified
                      MPICE4K 2.64.00.00 Certified
                      MPIceState 1.22.00.00 Certified
                      MPIceStopwatch 1.22.00.00 Certified
                      MPLAB SIM12 2.10.00.00 Certified
                      MPLAB SIM16 2.10.01.01 Certified
                      MPLAB SIM18 3.20.00.00 Certified
                      MPLAB SIM30 4.30.00.00 Certified
                      MPLAB SIM32 0.00.10.06 Certified
                      MPLoader 2.22.00.00 Certified
                      MPLogicDisplay 1.51.00.00 Certified
                      MPMemory 2.3 Certified
                      MPPICkit3 1.0.1.38 Certified
                      MPPICkit3OB 1.0.1.32 Certified
                      MPPm3 2.40.1.47 Certified
                      MPProgram 2.2 Certified
                      MPProject 3.7 Certified
                      MPPromate2 8, 0, 0, 3 Certified
                      MPRealICE 6.0.3.82 Certified
                      MPRecorder 1.01.00.00 Certified
                      MPSim 8.62.01.0 Certified
                      MPSimBreakpoints1.60.0.0 Certified
                      MPSimulator 1.60.00.2 Certified
                      MPSKDE 1.00.01.39 Certified
                      MPSMSK 1.00.01.12 Certified
                      MPStimulus 2.52.00.00 Certified
                      MPStopwatch 2.51.00.0 Certified
                      MPTags 2.00.00.00 Certified
                      MPTask 1.1.1.0 Certified
                      MPTranslator 2.31.00.00 Certified
                      MPUSrcvw4 4.00.01.06 Certified
                      MPWatchUpdateSupport1.1.2.0 Certified
                      PICkit 1 2.0.0.3 Certified
                      PICkit2 0.0.3.63 Certified
                      Picstart 4.40.0.14 Certified
                      RTOSTool 1.10.0.0 Certified
                      SCLStimulus 3.60.00.00 Certified
                      Suite_CCSPic 2.0.0.7 Uncertified
                      Suite_dsPIC 3.10.1 Certified
                      Suite_LSCProxy 2.1.2.0 Certified
                      Suite_Microchip 3.10.6 Certified
                      Suite_PIC32 5.1.7 Certified
                      Vault_CVS 1.2.0.0 Certified
                      Vault_PVCS 1.0.0.3 Certified
                      Vault_VSS 1.4.0.2 Certified


                      regards and happy new year...
                      moodz
                      Last edited by moodz; 12-29-2011, 11:29 PM. Reason: add text

                      Comment


                      • #26
                        Once I have this circuit up and running I want to try and incorporate the gyro in the setup the way I imagine it you would use the velocity to calculate the length of the sweep and then find out how long the signal was present, then based on the known speed and width of the head you could work out approximately how wide the object is. You could then adjust the speed of the filter to cope with the ground and choose to reject objects over a certain size to help with patches of hot rocks .

                        Originally posted by moodz View Post
                        Hi Maca ... that makes sense ... the filter parameters could be driven off the sweep speed.
                        I will have a think about it and see what we can come up with.

                        moodz.

                        Comment


                        • #27
                          Excellent moodz I'll try to implement it you pic and the idea the original device gs 4 !
                          -thank you !!

                          Comment


                          • #28
                            I compiled successfully the source code you provided (after I specified the new locations for p30f4012.inc
                            Nick-F
                            does this mean you have 4 pulses coming out of the 4012 ?
                            care to share your hex please ?

                            Comment


                            • #29
                              Originally posted by moodz View Post
                              Hi Nick .. the original code did use the internal oscillator however there was too much jitter so we switched to a crystal.

                              this is the line of code that does this ...

                              regards and happy new year...
                              moodz
                              Happy New Year, everybody!
                              Hi Moodz,
                              Thanks a lot for explanations. I installed the latest MPLab Suite just a few days ago, so I should have everything up to date. I see the integrated software for PicKit2 is v3.63. However, I was using a standalone version of software for PicKit2, which is v2.61.
                              I am not sure if I can launch the v3.63 independent of the MPLab, I used to do the programming separate from the MPLab. Anyway, I will try with the integrated programming software. At the moment I don't have any board to install the DSPIC into, I'll have to build something.

                              Best regards,
                              Nicolae

                              Comment


                              • #30
                                Originally posted by 6666 View Post
                                Nick-F
                                does this mean you have 4 pulses coming out of the 4012 ?
                                care to share your hex please ?
                                Hi 6666,
                                Not at all, I don't have a board to test the microcontroller, all I've done was to prepare the files and compile them (to generate the hex file). I don't know what pulses are coming out of the microcontroller. Ask Moodz nicely to provide the latest hex file

                                Regards,
                                Nicolae

                                Comment

                                Working...