Announcement

Collapse
No announcement yet.

DSPIC30F4012 v230 Source Code

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

  • G'day all,

    I'm impressed that you've all struggled through all these hurdles to keep the design working. It's been really frustrating for me, reading this thread, as all the answers are there...

    You need to bypass the MCU exactly as per the Microchip specs (or better), otherwise you'll be introducing all sorts of switching problems. Use 0.1uF mono caps next to the VCC and GND pins, and add a 1uF tantalum (NOT electrolytic) cap next to one pair of power pins as well. That should stabilise the cpu a lot, and may fix some reliability issues.

    The miniature crystals aren't AT-cut, so the PIC crystal circuit will have most likely damaged them. You can use the low-profile versions of the "hip flask" crystal cases, with the same footprint, they'll be fine. But watch crystals aren't robust enough, even with the built-in soft start oscillator, to work at all reliably. But that's why the little crystals didn't work.

    Overclocking and raising the supply voltage will dramatically affect reliability and will compromise the ADC operations. You're better off lowering the supply voltage to 4.5V or so, that will make the chip overheat far less, and should improve the reliability somewhat. Remember, the DIP package was only designed to dissipate an absolute, utter maximum of 400mW or so - at 25C - so if the chip is hot, stick a DIP heatsink to help remove some of the heat.

    Overclocking won't improve the ADC sample rate one bit (no pun intended). In fact, it will severely compromise the S&H cap parameters, and will affect the stability of the ADC reference - even if you're using an off-chip reference. The ADC can sample at 1nS resolution, so could someone explain what the purpose of overclocking is trying to achieve?

    Finally, has anyone considered using a bootloader? This would dramatically help anyone who wants to use one of these chips without needing to have a programmer. I could happily burn in a bootloader for anyone, then you can use a simple serial port to upload the new code. No ICSP required. Plus, the bootloader won't affect the functional code, and will work perfectly in the field. ANd you won't need to change anything in the existing codebase - just instead of flashing a whole chip each time, just connect up a serial port, upload the new code, hit reset, and it's up and running. Let me know if you'd think this might be helpful.

    I'm more than happy to help out in any way with this design - hopefully to improve it to the point where you won't need to overclock or overpower the circuit. Hopefully that might make your lives a little less hassled!

    Let me know if any of this can help.

    Oh, and moodz, did you ever build the circuit you mentioned in post 35? The one with the tunable earth balancing? Or has that evolved into your patented design now? If not, would it be possible to maybe publish what you had at that time, I'd really like to have a look at it, and maybe design a board so that others can build it as well. But of course, not if there are secrets in it!

    Cheers guys, and I really hope some of this is useful for youse all!
    -PtB

    Comment


    • Hi Pete
      a simple pcb for the 4012 project would be really handy if you are inclined
      thanks.
      6666

      Comment


      • ....note .... The only reason for picking the 4012 chip was because it was a dip and could be socketed / soldered etc etc ... However things have moved on and the 16 bit core is not quite as nimble or power efficient as the 32 bit cores when it comes to the DSP code that is now sitting in the PI code. Generating the timing for samples and tx is a no brainer ... It's the DSP RX processing that makes the difference. This is one reason why the original code is overclocked ...the other is to get nanosecond timing granularity. No need to overclock the uno32 ... It's fast enough (for now)
        bootloader is available on the 32 ... It was for 4012 also .. Just never integrated.
        ...the ultimate pi controller lives in an FPGA though as this solution naturally decentralises the processing function.

        Comment


        • Ah. OK, I'm really pleased you've thought of these things already, obviously the boot loader stuff would be a later addition anyway...

          FWIW, I don't have any problems doing PCBs for anyone for anything (but see below for caveats). I'm putting together a slightly "upmarket" version of BW's sampling monstrosity, purely as an educational tool for myself, (well, that, plus to ease me back into the Altium work cycle again!!). So 4x6, since the pinouts are going to be similar, if you'd like the 4011 version with a 4012 layout, I'd be happy to help out. Otherwise, I'd be delighted to dust off my brain and put it to work for a good cause. You are a good cause, right? :=)

          I guess I need to say, since I'm finding myself skipping all over the many, many design revisions in the many, many threads here, I may not be au faƮt with every name and every revision... so if you have a specific design you'd like realised. just let me know where the schematic is (forum/thread/post #, unless they're all in the same thread, naturally!), and I'll take it from there. Once I've done it once for each design, I'll be fine, it's just learning all the TLAs and project names and so on. Anything you can do to help me get up to speed with where stuff is, will be greatly appreciated. Oh, and footprints - like the rotary encoder, it's been used in many projects, so everyone calls it "the" encoder, but I haven't found the datasheet yet. So if there are parts like that which are specific to a design, just point me to the thread or part number, and I'll design and footprint it. And if you want it mounted offboard, let me know, and I'll just SIL it (or DIL, or whatever pin count is appropriate).

          At the same time, my intention is to collate the data (schematics, parts lists, and PCB layouts) and - with the authors' permission!! - put them all in one collection.

          Obviously, that depends on whether or not moodz (in this case) is happy for us to a) bring his invention to life, and ii) put it in a location where every nitwit and his mate might be able to access them. That latter point is a big concern, but for the moment, I'm happy enough to provide each member with what they need, and keep a kind of 'custodianship' of the material so it doesn't get into the wrong hands, if that makes sense. Obviously, that implies (or actually, explicitly requires!) a level of trust in me, and of course I do understand if you'd prefer to manage the material yourselves, or at least leave it attached to forum posts so people do have to go looking for it!

          I hope this makes sense... And moodz, of course I (and I suspect every fair-minded member) will understand if you don't want your older designs confusing people, in which case, a yea or nay will be sufficient. I won't go against any designer's wishes for any reason.

          Hope this makes sense and isn't too much trouble for everyone?

          Cheers,
          -PtB ('B' as in 'busy boy' )

          Comment


          • Originally posted by Pete the Builder View Post
            Ah. OK, I'm really pleased you've thought of these things already, obviously the boot loader stuff would be a later addition anyway...

            FWIW, I don't have any problems doing PCBs for anyone for anything (but see below for caveats). I'm putting together a slightly "upmarket" version of BW's sampling monstrosity, purely as an educational tool for myself, (well, that, plus to ease me back into the Altium work cycle again!!). So 4x6, since the pinouts are going to be similar, if you'd like the 4011 version with a 4012 layout, I'd be happy to help out. Otherwise, I'd be delighted to dust off my brain and put it to work for a good cause. You are a good cause, right? :=)

            I guess I need to say, since I'm finding myself skipping all over the many, many design revisions in the many, many threads here, I may not be au faƮt with every name and every revision... so if you have a specific design you'd like realised. just let me know where the schematic is (forum/thread/post #, unless they're all in the same thread, naturally!), and I'll take it from there. Once I've done it once for each design, I'll be fine, it's just learning all the TLAs and project names and so on. Anything you can do to help me get up to speed with where stuff is, will be greatly appreciated. Oh, and footprints - like the rotary encoder, it's been used in many projects, so everyone calls it "the" encoder, but I haven't found the datasheet yet. So if there are parts like that which are specific to a design, just point me to the thread or part number, and I'll design and footprint it. And if you want it mounted offboard, let me know, and I'll just SIL it (or DIL, or whatever pin count is appropriate).

            At the same time, my intention is to collate the data (schematics, parts lists, and PCB layouts) and - with the authors' permission!! - put them all in one collection.

            Obviously, that depends on whether or not moodz (in this case) is happy for us to a) bring his invention to life, and ii) put it in a location where every nitwit and his mate might be able to access them. That latter point is a big concern, but for the moment, I'm happy enough to provide each member with what they need, and keep a kind of 'custodianship' of the material so it doesn't get into the wrong hands, if that makes sense. Obviously, that implies (or actually, explicitly requires!) a level of trust in me, and of course I do understand if you'd prefer to manage the material yourselves, or at least leave it attached to forum posts so people do have to go looking for it!

            I hope this makes sense... And moodz, of course I (and I suspect every fair-minded member) will understand if you don't want your older designs confusing people, in which case, a yea or nay will be sufficient. I won't go against any designer's wishes for any reason.

            Hope this makes sense and isn't too much trouble for everyone?

            Cheers,
            -PtB ('B' as in 'busy boy' )

            Note on bootloaders ... this is a chicken and egg problem .. the bootloader allows you to "program" code without a programmer however you need a programmer to initially program the bootloader unless the chip / board shipped with one.

            Note on rotary encoders ... theres hundreds of them out there ( they can be cheaper than pots ) like this one ... AU$1.40 each .... http://www.alps.com/WebObjects/catalog.woa/E/HTML/Encoder/Incremental/EC12E/EC12E24404A6.shtml
            Using a pot seems initially to be clever but is actually more costly in reliability, code and CPU resources than a QE ( hence the wide spread use in electronic equipment ).

            There needs to be a top down approach ... whereas most of the discussion to date has been bottom up ( in more ways than one )
            for TOP down there needs to be a system model ....with modular blocks for each major function in the signal chain.

            Here is one I cobbled up for the BW detector from the published schematic ... I already posted it once but here it is again ....

            The timing sigs and soforth would come from the control ( eg UNiPi controller ) not shown.

            Its a good starting point .... ( oooooer ... looks like it came out of a patent diagram )


            Click image for larger version

Name:	BW_SIG.JPG
Views:	2
Size:	81.7 KB
ID:	334945
            Last edited by moodz; 02-09-2013, 12:16 PM. Reason: adapted and arranged ....

            Comment


            • Note on the integrating ADC: (Re QED)
              This is a high bit resolution low noise (inherent low-pass filter) ADC. It can achieve approx. 20 or more bits depending on the digital post processing (box-car averager).
              One of the K.O.-criteria of the design too.

              Best architecture to start with. The QED schematics can be found on AEGP forum.

              Aziz
              Last edited by Aziz; 02-09-2013, 06:08 PM. Reason: adapted and arranged ....

              Comment


              • Originally posted by Aziz View Post
                Best architecture to start with. The QED schematics can be found on AEGP forum.
                Registration on the AEGP forum seems to have been disabled. Is there another way I can look at the QED schematics? Thanks.

                Comment


                • Originally posted by joop View Post
                  Registration on the AEGP forum seems to have been disabled. Is there another way I can look at the QED schematics? Thanks.
                  I found these in my archive ->

                  The patent:
                  2010101019.pdf

                  and the schematic:
                  Click image for larger version

Name:	QED_SCHEMATIC.PNG
Views:	2
Size:	120.2 KB
ID:	334951

                  Comment


                  • Originally posted by Qiaozhi View Post
                    I found these in my archive ->

                    The patent:
                    [ATTACH]23271[/ATTACH]

                    and the schematic:
                    [ATTACH]23272[/ATTACH]
                    This isn't up to date. The one "we" have in AEGP forum is much simpler (one mcu).
                    I think one need to be member there to get access to the schematics.
                    Aziz

                    Comment

                    Working...
                    X