Announcement

Collapse
No announcement yet.

DSPIC30F4012 v230 Source Code

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

  • #61
    After a lot of messing around I have finally got a verify complete on moodz hex file on a 4012

    The pickit3 is plugged into a direct usb port and I had to breadboard an adaptor for the 4012 as the icsp board does not come with a 28 pin zif socket for a 4012. I have ordered a nice 28 pin adaptor off fleabay.
    Now to see if any pulses are coming out of the chip.
    Attached Files

    Comment


    • #62
      Originally posted by 6666 View Post
      After a lot of messing around I have finally got a verify complete on moodz hex file on a 4012

      The pickit3 is plugged into a direct usb port and I had to breadboard an adaptor for the 4012 as the icsp board does not come with a 28 pin zif socket for a 4012. I have ordered a nice 28 pin adaptor off fleabay.
      Now to see if any pulses are coming out of the chip.

      Thats the most comfortable workbench I have seen for a while ... you may have a problem seeing pulses as you have no LCD display or rotary to set the TX period which I think is set to 0 after you program the chip. The last hex file published needs the 10 Mhz crystal also. There is a serial port however it works only with the pickit2 UART tool .... the pickit3 does not have this feature as far as i know. I suppose I could publish a hex file with "default" Tx and sample pulses set so you can test ... I will look into it tonight.

      moodz.

      Comment


      • #63
        Hi moodz
        yes its a comfy work bench
        well I connected only pins 13,20,28 and 8,19,27 and 1 and 10,11,12 and 6,7

        but no pulses,

        I used the first hex code no xtal just to get it going
        but i see you say it needs the lcd and rotary switch to set the tx pulse and samples from zero.
        I was just about to ask if the code has default values but you read my mind

        if its possible to have a default code that would be very handy thanks


        I used the hex code from post 20
        and remembered this


        "ALSO NOTE ... you must wire the ZERO button though .... the code expects you to press this once to commence operation after first power up .... if people dont like this I will remove this "feature"

        just dabbed an earth on pin 12 (the zero button) but no pulses, guess its set to zero in code


        regarding the 10 meg xtal, when did the 4012 code need that ?, I know you changed the 4011 code for the xtal
        I have not tried the TX HI and LOW files yet
        6666

        Comment


        • #64
          Originally posted by 6666 View Post
          Hi moodz
          yes its a comfy work bench
          well I connected only pins 13,20,28 and 8,19,27 and 1 and 10,11,12 and 6,7

          but no pulses,

          I used the first hex code no xtal just to get it going
          but i see you say it needs the lcd and rotary switch to set the tx pulse and samples from zero.
          I was just about to ask if the code has default values but you read my mind

          if its possible to have a default code that would be very handy thanks


          I used the hex code from post 20
          and remembered this


          "ALSO NOTE ... you must wire the ZERO button though .... the code expects you to press this once to commence operation after first power up .... if people dont like this I will remove this "feature"

          just dabbed an earth on pin 12 (the zero button) but no pulses, guess its set to zero in code


          regarding the 10 meg xtal, when did the 4012 code need that ?, I know you changed the 4011 code for the xtal
          I have not tried the TX HI and LOW files yet
          6666
          The latest hex code does not need the zero button press. The satlock button is discontinued ... you need it for the crystal connection. The crystal was added due to TX jitter ... the default TX period is set to 0 after flashing so you wont get any pulses ... I will investigate an update .. you should think about getting an LCD and a rotary or an RS232 interface ..... or you cant change the sample pulse timing.

          moodz

          Comment


          • #65
            Thanks for the update
            I went back over the other thread and realised I missed this about the 4012 'DOH"

            "I have added a 10 Mhz crystal to both the 4011 and the 4012 "

            my LCD has arrived but no switches.
            10mhz xtal like this ?
            Attached Files

            Comment


            • #66
              Originally posted by 6666 View Post
              Thanks for the update
              I went back over the other thread and realised I missed this about the 4012 'DOH"

              "I have added a 10 Mhz crystal to both the 4011 and the 4012 "

              my LCD has arrived but no switches.
              10mhz xtal like this ?
              you got it ... the chip is running a little beyond spec at this speed and power consumption is up but you do get nice timing steps of 25 nanoseconds and faster processing.

              Comment


              • #67
                Originally posted by moodz View Post
                you got it ... the chip is running a little beyond spec at this speed and power consumption is up but you do get nice timing steps of 25 nanoseconds and faster processing.

                Here is the hex file for 2 khz TX default and 50 us tx pulse period.
                Unless you have the serial port or LCD you wont be able to adjust the sample pulses tho.
                moodz

                H20111018.zip

                Comment


                • #68
                  cool thanks moodz, will do asap

                  Comment


                  • #69
                    I have programed my chip with H20111018.zip
                    I got the message program verify
                    so I assume the chip is ok
                    knocked up the cct on breadboard (with and without lcd), but at 4.8 volts
                    it only draws around 8 ma, and no pulses with or without lcd

                    the breadboard connections all seem firm and ok
                    not sure what to try next, maybe make a real pcb

                    Comment


                    • #70
                      Originally posted by 6666 View Post
                      I have programed my chip with H20111018.zip
                      I got the message program verify
                      so I assume the chip is ok
                      knocked up the cct on breadboard (with and without lcd), but at 4.8 volts
                      it only draws around 8 ma, and no pulses with or without lcd

                      the breadboard connections all seem firm and ok
                      not sure what to try next, maybe make a real pcb
                      Please post hi res photo of top and bottom of board and I will see what I can do for you.

                      moodz

                      Comment


                      • #71
                        Hi Moodz
                        the breadboard is just the plugin type
                        so only one side

                        I will knock up a vero board
                        that should be all soldered connections
                        and see what happens
                        this is such a simple project
                        it should be working by now

                        found some info on how to test the LCD
                        so will do that to , to check if its ok

                        edit good news the lcd tests ok

                        I should test the xtal to

                        Moodz can I just check something with you
                        what should be on pin 12, (the old zero button)
                        should it have a 10k R on it or not
                        seeing the software is not looking for an earth to start it ?

                        Comment


                        • #72
                          Originally posted by 6666 View Post
                          Hi Moodz
                          the breadboard is just the plugin type
                          so only one side

                          I will knock up a vero board
                          that should be all soldered connections
                          and see what happens
                          this is such a simple project
                          it should be working by now

                          found some info on how to test the LCD
                          so will do that to , to check if its ok

                          edit good news the lcd tests ok

                          I should test the xtal to

                          Those CPUs have more than one ground and +5 volt supply pin ... make sure all are connected or it wont work.

                          tie the pushbutton input pins high to +5 also if just testing.

                          moodz.

                          Comment


                          • #73
                            I connected pins +4.8v 13,20,28 and Gnd 8,19,27 and R9 pin1 and R1 pin11, r2 pin 12 ,
                            R4 and 5 to pins 6,7, and the xtal to pins 9,10

                            it should work,

                            does it need the full 5v to work ?

                            i'll knock up a cct to test the xtal

                            Comment


                            • #74
                              Originally posted by 6666 View Post
                              I connected pins +4.8v 13,20,28 and Gnd 8,19,27 and R9 pin1 and R1 pin11, r2 pin 12 ,
                              R4 and 5 to pins 6,7, and the xtal to pins 9,10

                              it should work,

                              does it need the full 5v to work ?

                              i'll knock up a cct to test the xtal



                              Have you got the 22pf ceramic caps installed on the crystal pin9 to gnd and pin10 to gnd.



                              Mick

                              Comment


                              • #75
                                Originally posted by 6666 View Post
                                I connected pins +4.8v 13,20,28 and Gnd 8,19,27 and R9 pin1 and R1 pin11, r2 pin 12 ,
                                R4 and 5 to pins 6,7, and the xtal to pins 9,10

                                it should work,

                                does it need the full 5v to work ?

                                i'll knock up a cct to test the xtal
                                If you are relying on the Pickit to supply the +5 it probably will not work ... the supply from the programmer is not clean enough ... thats what I found anyway.

                                moodz

                                Comment

                                Working...
                                X