Loading ...
Sorry, an error occurred while loading the content.

PIC18F2550

Expand Messages
  • Peter Balch
    Has anyone used the PIC18F2550 - or similar? That s the flash USB chip. Preferably using the free compiler from Microchip. I haven t started yet but it looks
    Message 1 of 26 , Oct 11, 2011
    • 0 Attachment
      
      Has anyone used the PIC18F2550 - or similar? That's the flash USB chip.
       
      Preferably using the free compiler from Microchip.
       
      I haven't started yet but it looks like the USB is quite hard to configure and use. Even getting the clock right seems difficult.
       
      There are a variety home-brew projects on the web and it would be nice if someone could say "I copied the xxx project and it worked first time".
       
      I guess I'll be starting with a HID device.
       
      Thanks
       
      Peter
       
       
    • Randy Carter
      Kevin Ross did a presentation on using USB with PIC microcontrollers not to long ago. He showed how to configure the PIC and the Windoze computer so that the
      Message 2 of 26 , Oct 11, 2011
      • 0 Attachment
        Kevin Ross did a presentation on using USB with PIC microcontrollers not to long ago. He showed how to configure the PIC and the Windoze computer so that the USB PIC looked like a new serial port. Communications to and from the PC's programs was done just like there was a real serial port there. I sure hope he left a tutorial somewhere because I forgot most of it.





        ----------------------------------------------------
        "What the detractors and critics of electric vehicles
        have been saying for years, is true. The electric
        vehicle is not for everybody, given the limited range
        it can only meet the needs of 90% of the population."

        Ed Begley Jr.
        ----------------------------------------------------


        ---------- Original Message ----------
        From: "Peter Balch" <peterbalch@...>
        To: <SeattleRobotics@yahoogroups.com>
        Subject: [SeattleRobotics] PIC18F2550
        Date: Tue, 11 Oct 2011 12:22:51 +0100

        



        Has anyone used the PIC18F2550 - or similar? That's the flash USB chip. Preferably using the free compiler from Microchip. I haven't started yet but it looks like the USB is quite hard to configure and use. Even getting the clock right seems difficult. There are a variety home-brew projects on the web and it would be nice if someone could say "I copied the xxx project and it worked first time". I guess I'll be starting with a HID device. Thanks Peter
      • Dennis Clark
        I have used the demo code from Microchip on their PIC USB demo board and had it work first time. Those come with reference schemo s so you can design your own
        Message 3 of 26 , Oct 11, 2011
        • 0 Attachment
          I have used the demo code from Microchip on their PIC USB demo board and had it work first time. Those come with reference schemo's so you can design your own board with it. Since C18 is now free, you ships be able to move right through.

          As for the frequency, you need a 48MHz clock for USB.

          DLC
          --
          Dennis Clark
          While traveling

          On Oct 11, 2011, at 4:34 PM, "Randy Carter" <rwcarter.wa@...> wrote:

          > Kevin Ross did a presentation on using USB with PIC microcontrollers not to long ago. He showed how to configure the PIC and the Windoze computer so that the USB PIC looked like a new serial port. Communications to and from the PC's programs was done just like there was a real serial port there. I sure hope he left a tutorial somewhere because I forgot most of it.
          >
          >
          >
          >
          >
          > ----------------------------------------------------
          > "What the detractors and critics of electric vehicles
          > have been saying for years, is true. The electric
          > vehicle is not for everybody, given the limited range
          > it can only meet the needs of 90% of the population."
          >
          > Ed Begley Jr.
          > ----------------------------------------------------
          >
          >
          > ---------- Original Message ----------
          > From: "Peter Balch" <peterbalch@...>
          > To: <SeattleRobotics@yahoogroups.com>
          > Subject: [SeattleRobotics] PIC18F2550
          > Date: Tue, 11 Oct 2011 12:22:51 +0100
          >
          > 
          >
          >
          >
          > Has anyone used the PIC18F2550 - or similar? That's the flash USB chip. Preferably using the free compiler from Microchip. I haven't started yet but it looks like the USB is quite hard to configure and use. Even getting the clock right seems difficult. There are a variety home-brew projects on the web and it would be nice if someone could say "I copied the xxx project and it worked first time". I guess I'll be starting with a HID device. Thanks Peter
          >
          >
          >
          >
          >
          >
          > ------------------------------------
          >
          > Visit the SRS Website at http://www.seattlerobotics.orgYahoo! Groups Links
          >
          >
          >
        • jamericanfreddy
          PETER i bought the demo board awhile back,havent had a chance to use it do you have a demo board or just the chip
          Message 4 of 26 , Oct 11, 2011
          • 0 Attachment
            PETER
            i bought the demo board awhile back,havent had a chance to use it
            do you have a demo board or just the chip

            --- In SeattleRobotics@yahoogroups.com, "Peter Balch" <peterbalch@...> wrote:
            >
            > Has anyone used the PIC18F2550 - or similar? That's the flash USB chip.
            >
            > Preferably using the free compiler from Microchip.
            >
            > I haven't started yet but it looks like the USB is quite hard to configure and use. Even getting the clock right seems difficult.
            >
            > There are a variety home-brew projects on the web and it would be nice if someone could say "I copied the xxx project and it worked first time".
            >
            > I guess I'll be starting with a HID device.
            >
            > Thanks
            >
            > Peter
            >
          • Alan
            Look at SparkFun’s USB Bit Wacker (UBW), I believe it uses this chip (or a family member) and has quite a bit of documentation. Alan KM6VV From:
            Message 5 of 26 , Oct 11, 2011
            • 0 Attachment

              Look at SparkFun’s USB Bit Wacker (UBW), I believe it uses this chip (or a family member) and has quite a bit of documentation.

               

              Alan  KM6VV

               

              From: SeattleRobotics@yahoogroups.com [mailto:SeattleRobotics@yahoogroups.com] On Behalf Of Peter Balch
              Sent: Tuesday, October 11, 2011 4:23 AM
              To: SeattleRobotics@yahoogroups.com
              Subject: [SeattleRobotics] PIC18F2550

               

              




              Has anyone used the PIC18F2550 - or similar? That's the flash USB chip.

               

              Preferably using the free compiler from Microchip.

               

              I haven't started yet but it looks like the USB is quite hard to configure and use. Even getting the clock right seems difficult.

               

              There are a variety home-brew projects on the web and it would be nice if someone could say "I copied the xxx project and it worked first time".

               

              I guess I'll be starting with a HID device.

               

              Thanks

               

              Peter

               

               




            • Peter Balch
              ... That s this one right? http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en021940
              Message 6 of 26 , Oct 11, 2011
              • 0 Attachment
                > I have used the demo code from Microchip on their
                > PIC USB demo board and had it work first time.

                That's this one right?
                http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en021940
                http://ww1.microchip.com/downloads/en/DeviceDoc/51526a.pdf

                Did you build your own or just buy a Microchip board?

                The demo board uses 4550. Did you use that or a 2550 or 4550? I can't see
                anything in the demo board schematic that suggests it has to be a 4550.

                Does the demo code make the USB appear as a HID or serial port?

                > Those come with reference schemo's so you can design
                > your own board with it.

                The circuit looks reassuringly simple.

                > Since C18 is now free, you
                > ships be able to move right through.

                I'll download it tonight.

                > As for the frequency, you need a 48MHz clock for USB.

                Most of the circuits I've looked at use a 20MHz crystal. I presume they
                divide that by 5 then use the internal freq mult to get 96MHz then div by 2.
                Meanwhile, they presumably use some other weird clock options for the MPU
                speed. Seems like a wacky way of doing things!

                I guess I'd better order a chip or two and get started.

                Thanks for your advice. It's good to know it was straightforward.

                Peter
              • Peter Balch
                From: jamericanfreddy ... Neither yet. I was going to buy a couple of the PIC18F2250 chips tonight. I was wanting to use a 2250 so a 4450 board seemed
                Message 7 of 26 , Oct 11, 2011
                • 0 Attachment
                  From: jamericanfreddy
                  > do you have a demo board or just the chip

                  Neither yet. I was going to buy a couple of the PIC18F2250 chips tonight. I
                  was wanting to use a 2250 so a 4450 board seemed unneccessary.

                  Dennis suggested I could download the Microchip code and so it looked like I
                  had a good plan. However, it's not entirely clear what I have to download.
                  The advantage of buying the board is that you get a CD and don't have to
                  sort out what s/w you need. Microchip don't make it obvious. I've just
                  downloaded a few hundred Mb of stuff which may or may not be what I need.
                  Once I've waded through that, I might have a better idea about whether I'm
                  forced to buy the Dev Board.

                  The download includes:
                  Microchip Application Libraries v2011-07-14 Windows
                  Microchip Application Libraries Release Notes
                  Microchip Application Libraries Help Files
                  from
                  http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=2680&dDocName=en547784
                  which I hope includes all the 2250 firmware.

                  And the latest version of MPLAB
                  MPLAB IDE v8.76
                  MPLAB IDE User's Guide
                  from
                  http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en019469&part=SW007002
                  which I hope contains the C18 compiler

                  Plus the
                  PICDEM FS USB Demonstration Board User's Guide
                  from
                  ww1.microchip.com/downloads/en/DeviceDoc/51526a.pdf
                  which contains a schematic.

                  I've got a PicKit 2 which I hope is good enough to program the PIC18F2250.

                  From: Alan
                  > Look at SparkFun's USB Bit Wacker (UBW), I
                  > believe it uses this chip (or a family member) and
                  > has quite a bit of documentation.

                  Maybe. I was just reading about that one. As far as I can see, it uses
                  Microsoft dev tools. There's a short blog about it here:
                  http://www.designspark.com/product/picdem-fs-usb-demo-board

                  There are so many projects out there that it's hard to know which to choose.

                  I'll let you know how I get on.

                  Peter
                • Richard Greenway
                  Just FYI, The PicKit2 uses the pic18f2250 USB part It has an ICD programming header on it, and can be reprogrammed. Microchip used to have a Development kit
                  Message 8 of 26 , Oct 11, 2011
                  • 0 Attachment
                    Just FYI,

                    The PicKit2 uses the pic18f2250 USB part
                    It has an ICD programming header on it, and can be reprogrammed.

                    Microchip used to have a Development kit for developing applications to
                    run on the Pickit and pickit2, that code is probably still in an archive
                    somewhere.

                    If you want a cheap eval board that is tested and ready to go with USB
                    code, the PICKIT2 (I will punctuate that differently every time won't
                    I?) is an easy way to go.

                    Richard


                    On 10/11/2011 2:37 PM, Peter Balch wrote:
                    > From: jamericanfreddy
                    >> do you have a demo board or just the chip
                    > Neither yet. I was going to buy a couple of the PIC18F2250 chips tonight. I
                    > was wanting to use a 2250 so a 4450 board seemed unneccessary.
                    >
                    > Dennis suggested I could download the Microchip code and so it looked like I
                    > had a good plan. However, it's not entirely clear what I have to download.
                    > The advantage of buying the board is that you get a CD and don't have to
                    > sort out what s/w you need. Microchip don't make it obvious. I've just
                    > downloaded a few hundred Mb of stuff which may or may not be what I need.
                    > Once I've waded through that, I might have a better idea about whether I'm
                    > forced to buy the Dev Board.
                    >
                    > The download includes:
                    > Microchip Application Libraries v2011-07-14 Windows
                    > Microchip Application Libraries Release Notes
                    > Microchip Application Libraries Help Files
                    > from
                    > http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=2680&dDocName=en547784
                    > which I hope includes all the 2250 firmware.
                    >
                    > And the latest version of MPLAB
                    > MPLAB IDE v8.76
                    > MPLAB IDE User's Guide
                    > from
                    > http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en019469&part=SW007002
                    > which I hope contains the C18 compiler
                    >
                    > Plus the
                    > PICDEM FS USB Demonstration Board User's Guide
                    > from
                    > ww1.microchip.com/downloads/en/DeviceDoc/51526a.pdf
                    > which contains a schematic.
                    >
                    > I've got a PicKit 2 which I hope is good enough to program the PIC18F2250.
                    >
                    > From: Alan
                    >> Look at SparkFun's USB Bit Wacker (UBW), I
                    >> believe it uses this chip (or a family member) and
                    >> has quite a bit of documentation.
                    > Maybe. I was just reading about that one. As far as I can see, it uses
                    > Microsoft dev tools. There's a short blog about it here:
                    > http://www.designspark.com/product/picdem-fs-usb-demo-board
                    >
                    > There are so many projects out there that it's hard to know which to choose.
                    >
                    > I'll let you know how I get on.
                    >
                    > Peter
                    >
                    >
                    >
                    > ------------------------------------
                    >
                    > Visit the SRS Website at http://www.seattlerobotics.orgYahoo! Groups Links
                    >
                    >
                    >
                    >
                    >
                  • Kevin Ross
                    My demo used an Atmel AT chip, but the theory is basically the same. It sounds a lot worse than it is. Just start with someones example code and go from there.
                    Message 9 of 26 , Oct 11, 2011
                    • 0 Attachment
                      My demo used an Atmel AT chip, but the theory is basically the same. It
                      sounds a lot worse than it is. Just start with someones example code and go
                      from there. I am using a Teensy 2.0 and it works great.

                      -----Original Message-----
                      From: Randy Carter
                      Sent: Tuesday, October 11, 2011 9:34 AM
                      To: SeattleRobotics@yahoogroups.com
                      Subject: Re: [SeattleRobotics] PIC18F2550

                      Kevin Ross did a presentation on using USB with PIC microcontrollers not to
                      long ago. He showed how to configure the PIC and the Windoze computer so
                      that the USB PIC looked like a new serial port. Communications to and from
                      the PC's programs was done just like there was a real serial port there. I
                      sure hope he left a tutorial somewhere because I forgot most of it.





                      ----------------------------------------------------
                      "What the detractors and critics of electric vehicles
                      have been saying for years, is true. The electric
                      vehicle is not for everybody, given the limited range
                      it can only meet the needs of 90% of the population."

                      Ed Begley Jr.
                      ----------------------------------------------------


                      ---------- Original Message ----------
                      From: "Peter Balch" <peterbalch@...>
                      To: <SeattleRobotics@yahoogroups.com>
                      Subject: [SeattleRobotics] PIC18F2550
                      Date: Tue, 11 Oct 2011 12:22:51 +0100

                      



                      Has anyone used the PIC18F2550 - or similar? That's the flash USB chip.
                      Preferably using the free compiler from Microchip. I haven't started yet
                      but it looks like the USB is quite hard to configure and use. Even getting
                      the clock right seems difficult. There are a variety home-brew projects
                      on the web and it would be nice if someone could say "I copied the xxx
                      project and it worked first time". I guess I'll be starting with a HID
                      device. Thanks Peter






                      ------------------------------------

                      Visit the SRS Website at http://www.seattlerobotics.orgYahoo! Groups Links
                    • Kevin Ross
                      If you are going for a PIC, the PIC18F2250 is a decent choice. If you are just looking for a controller with free tools, you really ought to check this one
                      Message 10 of 26 , Oct 11, 2011
                      • 0 Attachment
                        If you are going for a PIC, the PIC18F2250 is a decent choice. If you are
                        just looking for a controller with free tools, you really ought to check
                        this one out

                        http://www.pjrc.com/teensy/

                        This is about as cheap as you are going to get ($16 for a dev board! $24 for
                        more pins and memory), it has very good GNU C support from Atmel with
                        WinAVR, and this board comes with decent enough samples that you should be
                        able to use the USB port in about 30 minutes or less. I really like the form
                        factor as it fits into a prototyping breadboard.

                        I have done many projects in PIC. I moved away from the PIC parts a couple
                        of years ago. They are fine, but I really like the Atmel parts better for
                        myself.

                        Kevin

                        -----Original Message-----
                        From: Peter Balch
                        Sent: Tuesday, October 11, 2011 2:37 PM
                        To: SeattleRobotics@yahoogroups.com
                        Subject: Re: [SeattleRobotics] Re: PIC18F2550

                        From: jamericanfreddy
                        > do you have a demo board or just the chip

                        Neither yet. I was going to buy a couple of the PIC18F2250 chips tonight. I
                        was wanting to use a 2250 so a 4450 board seemed unneccessary.

                        Dennis suggested I could download the Microchip code and so it looked like I
                        had a good plan. However, it's not entirely clear what I have to download.
                        The advantage of buying the board is that you get a CD and don't have to
                        sort out what s/w you need. Microchip don't make it obvious. I've just
                        downloaded a few hundred Mb of stuff which may or may not be what I need.
                        Once I've waded through that, I might have a better idea about whether I'm
                        forced to buy the Dev Board.

                        The download includes:
                        Microchip Application Libraries v2011-07-14 Windows
                        Microchip Application Libraries Release Notes
                        Microchip Application Libraries Help Files
                        from
                        http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=2680&dDocName=en547784
                        which I hope includes all the 2250 firmware.

                        And the latest version of MPLAB
                        MPLAB IDE v8.76
                        MPLAB IDE User's Guide
                        from
                        http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en019469&part=SW007002
                        which I hope contains the C18 compiler

                        Plus the
                        PICDEM FS USB Demonstration Board User's Guide
                        from
                        ww1.microchip.com/downloads/en/DeviceDoc/51526a.pdf
                        which contains a schematic.

                        I've got a PicKit 2 which I hope is good enough to program the PIC18F2250.

                        From: Alan
                        > Look at SparkFun's USB Bit Wacker (UBW), I
                        > believe it uses this chip (or a family member) and
                        > has quite a bit of documentation.

                        Maybe. I was just reading about that one. As far as I can see, it uses
                        Microsoft dev tools. There's a short blog about it here:
                        http://www.designspark.com/product/picdem-fs-usb-demo-board

                        There are so many projects out there that it's hard to know which to choose.

                        I'll let you know how I get on.

                        Peter



                        ------------------------------------

                        Visit the SRS Website at http://www.seattlerobotics.orgYahoo! Groups Links
                      • Dennis Clark
                        That s hard to beat. I don t know anything in the PIC stable set up like that yet - Some are close. Microchip has the Microstick for $25 with a built in
                        Message 11 of 26 , Oct 12, 2011
                        • 0 Attachment
                          That's hard to beat. I don't know anything in the PIC stable set up like that yet - Some are close.
                          Microchip has the Microstick for $25 with a built in programmer for the 24H (16 bit) parts, but the USB is owned by the debugger and isn't for user code. Their $60 PICdem board does make the USB available and comes with a USB bootloader on it or you can use your own programmer/debugger to program it and have the USB for other stuff only. There is the new ChipKit UNO32 Arduino board for $27 that is full on Arduino, using the PIC32 at 80MHz but that has the USB locked into a virtual com port. Since Microchip embraced the OS agnostic mantra you can get their IDE and compilers (MPLAB X) on Win or Mac or Linux now, finally.

                          DLC
                          --
                          Dennis Clark
                          While traveling

                          On Oct 12, 2011, at 12:17 AM, "Kevin Ross" <kevinro@...> wrote:

                          > If you are going for a PIC, the PIC18F2250 is a decent choice. If you are
                          > just looking for a controller with free tools, you really ought to check
                          > this one out
                          >
                          > http://www.pjrc.com/teensy/
                          >
                          > This is about as cheap as you are going to get ($16 for a dev board! $24 for
                          > more pins and memory), it has very good GNU C support from Atmel with
                          > WinAVR, and this board comes with decent enough samples that you should be
                          > able to use the USB port in about 30 minutes or less. I really like the form
                          > factor as it fits into a prototyping breadboard.
                          >
                          > I have done many projects in PIC. I moved away from the PIC parts a couple
                          > of years ago. They are fine, but I really like the Atmel parts better for
                          > myself.
                          >
                          > Kevin
                          >
                          > -----Original Message-----
                          > From: Peter Balch
                          > Sent: Tuesday, October 11, 2011 2:37 PM
                          > To: SeattleRobotics@yahoogroups.com
                          > Subject: Re: [SeattleRobotics] Re: PIC18F2550
                          >
                          > From: jamericanfreddy
                          >> do you have a demo board or just the chip
                          >
                          > Neither yet. I was going to buy a couple of the PIC18F2250 chips tonight. I
                          > was wanting to use a 2250 so a 4450 board seemed unneccessary.
                          >
                          > Dennis suggested I could download the Microchip code and so it looked like I
                          > had a good plan. However, it's not entirely clear what I have to download.
                          > The advantage of buying the board is that you get a CD and don't have to
                          > sort out what s/w you need. Microchip don't make it obvious. I've just
                          > downloaded a few hundred Mb of stuff which may or may not be what I need.
                          > Once I've waded through that, I might have a better idea about whether I'm
                          > forced to buy the Dev Board.
                          >
                          > The download includes:
                          > Microchip Application Libraries v2011-07-14 Windows
                          > Microchip Application Libraries Release Notes
                          > Microchip Application Libraries Help Files
                          > from
                          > http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=2680&dDocName=en547784
                          > which I hope includes all the 2250 firmware.
                          >
                          > And the latest version of MPLAB
                          > MPLAB IDE v8.76
                          > MPLAB IDE User's Guide
                          > from
                          > http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en019469&part=SW007002
                          > which I hope contains the C18 compiler
                          >
                          > Plus the
                          > PICDEM FS USB Demonstration Board User's Guide
                          > from
                          > ww1.microchip.com/downloads/en/DeviceDoc/51526a.pdf
                          > which contains a schematic.
                          >
                          > I've got a PicKit 2 which I hope is good enough to program the PIC18F2250.
                          >
                          > From: Alan
                          >> Look at SparkFun's USB Bit Wacker (UBW), I
                          >> believe it uses this chip (or a family member) and
                          >> has quite a bit of documentation.
                          >
                          > Maybe. I was just reading about that one. As far as I can see, it uses
                          > Microsoft dev tools. There's a short blog about it here:
                          > http://www.designspark.com/product/picdem-fs-usb-demo-board
                          >
                          > There are so many projects out there that it's hard to know which to choose.
                          >
                          > I'll let you know how I get on.
                          >
                          > Peter
                          >
                          >
                          >
                          > ------------------------------------
                          >
                          > Visit the SRS Website at http://www.seattlerobotics.orgYahoo! Groups Links
                          >
                          >
                          >
                          >
                          >
                          > ------------------------------------
                          >
                          > Visit the SRS Website at http://www.seattlerobotics.orgYahoo! Groups Links
                          >
                          >
                          >
                        • Dennis Clark
                          Peter, Check out the Sparkfun site for their USB Whacker board. They give some good links. You need the IDE and C18 compiler. If you don t have a PIC ICD or
                          Message 12 of 26 , Oct 12, 2011
                          • 0 Attachment
                            Peter,

                            Check out the Sparkfun site for their USB Whacker board. They give some good links. You need the IDE and C18 compiler. If you don't have a PIC ICD or PICkit programmer then you'll need one of those or use the USB bootloader set up. I admit that I've never used that bootloader though so I don't know what affect it has on the set up. I'm looking at this and I see that this really isn't that simple to do at all if you don't have the the toolchain in place already (like I do) and it's worse if you aren't used to wading into the labyrinth that is the Microchip site...

                            My path was
                            Install MPLAB and C18 (already done)
                            Get Fullspeed USB PICtail board
                            Download USB appnote code
                            Compile and run

                            If you don't have 1 and 2 above, it is a heavier lift. MPLAB X makes 1 above simpler.

                            For a HID and VCP USB demos you don't need any driver development on the PC side (or Mac).

                            DLC
                            --
                            Dennis Clark
                            While traveling

                            On Oct 11, 2011, at 3:37 PM, "Peter Balch" <peterbalch@...> wrote:

                            > From: jamericanfreddy
                            >> do you have a demo board or just the chip
                            >
                            > Neither yet. I was going to buy a couple of the PIC18F2250 chips tonight. I
                            > was wanting to use a 2250 so a 4450 board seemed unneccessary.
                            >
                            > Dennis suggested I could download the Microchip code and so it looked like I
                            > had a good plan. However, it's not entirely clear what I have to download.
                            > The advantage of buying the board is that you get a CD and don't have to
                            > sort out what s/w you need. Microchip don't make it obvious. I've just
                            > downloaded a few hundred Mb of stuff which may or may not be what I need.
                            > Once I've waded through that, I might have a better idea about whether I'm
                            > forced to buy the Dev Board.
                            >
                            > The download includes:
                            > Microchip Application Libraries v2011-07-14 Windows
                            > Microchip Application Libraries Release Notes
                            > Microchip Application Libraries Help Files
                            > from
                            > http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=2680&dDocName=en547784
                            > which I hope includes all the 2250 firmware.
                            >
                            > And the latest version of MPLAB
                            > MPLAB IDE v8.76
                            > MPLAB IDE User's Guide
                            > from
                            > http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en019469&part=SW007002
                            > which I hope contains the C18 compiler
                            >
                            > Plus the
                            > PICDEM FS USB Demonstration Board User's Guide
                            > from
                            > ww1.microchip.com/downloads/en/DeviceDoc/51526a.pdf
                            > which contains a schematic.
                            >
                            > I've got a PicKit 2 which I hope is good enough to program the PIC18F2250.
                            >
                            > From: Alan
                            >> Look at SparkFun's USB Bit Wacker (UBW), I
                            >> believe it uses this chip (or a family member) and
                            >> has quite a bit of documentation.
                            >
                            > Maybe. I was just reading about that one. As far as I can see, it uses
                            > Microsoft dev tools. There's a short blog about it here:
                            > http://www.designspark.com/product/picdem-fs-usb-demo-board
                            >
                            > There are so many projects out there that it's hard to know which to choose.
                            >
                            > I'll let you know how I get on.
                            >
                            > Peter
                            >
                            >
                            >
                            > ------------------------------------
                            >
                            > Visit the SRS Website at http://www.seattlerobotics.orgYahoo! Groups Links
                            >
                            >
                            >
                          • Richard Greenway
                            You know, I read the subject, opened a Pickit2 and everything, and still typed that wrong. It s the 18f2550 in the pickit2. The source code for the PicKit2 can
                            Message 13 of 26 , Oct 12, 2011
                            • 0 Attachment
                              You know, I read the subject, opened a Pickit2 and everything, and still
                              typed that wrong.
                              It's the 18f2550 in the pickit2.

                              The source code for the PicKit2 can be found here
                              http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1960
                              Which includes all of the USB stack
                              as well as the Windows side software source so you can grok out the USB
                              stack on the PC side.


                              Like Kevin, I have also moved away from PIC for most of my development.
                              We still have hundreds of PIC products out there, (which is why we had
                              to develop some code for the PICKIT2 to use as a one time programmer for
                              the factories) I now use Atmel (better development environment) or
                              Freescale (cheaper more capable parts), and because the USB support for
                              them was better first time around. The PIC stuff has probably gotten
                              better in the past few years, but when we started doing USB on PIC, you
                              couldn't even trust Microchips own USB drivers not to hang, requiring
                              unplugging of programmers and swapping of ports just to get them to work
                              again.


                              Richard

                              On 10/12/2011 5:03 AM, Peter Balch wrote:
                              > A further question: any thoughts on HID vs. "serial port" vs.
                              > "something else"?
                              >
                              > Let's assume I'm building a simple quadruped and want to
                              > program/control it via USB. I need to send bytes in both directions at
                              > a modest data rate.
                              >
                              > My assumption is that "something else" will require writing or buying
                              > a custom USB driver so I'll abandom that idea. HID and "serial port"
                              > drivers are built into Windows (and presumably other OSs) so they're
                              > free.
                              >
                              > I designed a HID (pretending to be a keyboard) a few years ago but it
                              > never occurred to me that I could use a HID for general purpose I/O.
                              > "After all", I thought, "a HID is like a mouse or a joystick, not a
                              > general purpose I/O device". So I'm rather vague as to what's going on.
                              >
                              > And I'd rather not use a virtual serial port. If I want a serial port,
                              > I'll just buy a USB/RS232 convertor.
                              >
                              > From: "Richard Greenway" <bj153@...>
                              >> The PicKit2 uses the pic18f2250 USB part
                              >> It has an ICD programming header on it
                              >
                              > Interesting. I hadn't spotted either of those facts.
                              >
                              >> Microchip used to have a Development kit for developing applications
                              >> to run on the Pickit and pickit2, that code is probably still in an
                              >> archive somewhere.
                              >
                              > I haven't found it yet. That could well be very useful. Google isn't
                              > helpful - a search brings up the wrong sort of projects.
                              >
                              >> If you want a cheap eval board that is tested and ready to go with
                              >> USB code, the PICKIT2 (I will punctuate that differently every time
                              >> won't I?) is an easy way to go.
                              >
                              > I suppose. But it's actually about the same price as any other
                              > pic18fxxxx USB dev board. I wasn't feeling that I needed a dev board.
                              > The circuit is so simple I was assuming it would work first time
                              > (Hah!). It's the software that's difficult.
                              >
                              > Each new PIC has yet more clock modes and internal peripherals and
                              > whatever so working out how to get everything turned off, turned on or
                              > initialised can take a whole day. Any easy route to Hello World is
                              > welcome.
                              >
                              > From: Kevin Ross
                              >> http://www.pjrc.com/teensy/
                              >> it has very good GNU C support
                              >
                              > Whenever I see the letters GNU my heart sinks. Dennis Clark put it
                              > eloquently back in August "When I do embedded work, I'm creating
                              > something, and that something ISN'T a compiler. But, I have to be a
                              > compiler expert or toolchain expert to get anything done when I work
                              > with an ARM development environment".
                              >
                              > I wholeheartedly support the _idea_ of GNU but I've never got any GNU
                              > software to work. Ever. Not once. I download what looks like a useful
                              > program but then find it needs something else installed first in order
                              > to run. And that needs something else but it isn't clear which
                              > version. And that something else is only available as C source so I
                              > need to install the C compiler.
                              >
                              > I've _heard_ of people who use GNU stuff but they're always friends of
                              > friends of friends.
                              >
                              > Maybe I'm missing out on something wonderful.
                              >
                              > Peter
                              >
                              >
                              >
                            • Mike Payson
                              I ll just note that the new STM32F4Discovery board has USB, USB OTG, USB programming and debugging, 1 MB Flash, 192 KB RAM, onboard audio output, a 3 axis
                              Message 14 of 26 , Oct 12, 2011
                              • 0 Attachment
                                I'll just note that the new STM32F4Discovery board has USB, USB OTG,
                                USB programming and debugging, 1 MB Flash, 192 KB RAM, onboard audio
                                output, a 3 axis accelerometer and a whole bunch of other stuff. And
                                it's under $20. Or Free if you request a sample. :-)

                                http://www.st.com/internet/evalboard/product/252419.jsp

                                I will have one at Saturday's meeting if anyone wants to check it out.

                                On Wed, Oct 12, 2011 at 7:55 AM, Dennis Clark <dlc@...> wrote:
                                >
                                > That's hard to beat. I don't know anything in the PIC stable set up like that yet - Some are close.
                                > Microchip has the Microstick for $25 with a built in programmer for the 24H (16 bit) parts, but the USB is owned by the debugger and isn't for user code. Their $60 PICdem board does make the USB available and comes with a USB bootloader on it or you can use your own programmer/debugger to program it and have the USB for other stuff only. There is the new ChipKit UNO32 Arduino board for $27 that is full on Arduino, using the PIC32 at 80MHz but that has the USB locked into a virtual com port. Since Microchip embraced the OS agnostic mantra you can get their IDE and compilers (MPLAB X) on Win or Mac or Linux now, finally.
                                >
                                > DLC
                                > --
                                > Dennis Clark
                                > While traveling
                                >
                                > On Oct 12, 2011, at 12:17 AM, "Kevin Ross" <kevinro@...> wrote:
                                >
                                > > If you are going for a PIC, the PIC18F2250  is a decent choice. If you are
                                > > just looking for a controller with free tools, you really ought to check
                                > > this one out
                                > >
                                > > http://www.pjrc.com/teensy/
                                > >
                                > > This is about as cheap as you are going to get ($16 for a dev board! $24 for
                                > > more pins and memory), it has very good GNU C support from Atmel with
                                > > WinAVR, and this board comes with decent enough samples that you should be
                                > > able to use the USB port in about 30 minutes or less. I really like the form
                                > > factor as it fits into a prototyping breadboard.
                                > >
                                > > I have done many projects in PIC.  I moved away from the PIC parts a couple
                                > > of years ago. They are fine, but I really like the Atmel parts better for
                                > > myself.
                                > >
                                > > Kevin
                                > >
                                > > -----Original Message-----
                                > > From: Peter Balch
                                > > Sent: Tuesday, October 11, 2011 2:37 PM
                                > > To: SeattleRobotics@yahoogroups.com
                                > > Subject: Re: [SeattleRobotics] Re: PIC18F2550
                                > >
                                > > From: jamericanfreddy
                                > >> do you have a demo board or just the chip
                                > >
                                > > Neither yet. I was going to buy a couple of the PIC18F2250 chips tonight. I
                                > > was wanting to use a 2250 so a 4450 board seemed unneccessary.
                                > >
                                > > Dennis suggested I could download the Microchip code and so it looked like I
                                > > had a good plan. However, it's not entirely clear what I have to download.
                                > > The advantage of buying the board is that you get a CD and don't have to
                                > > sort out what s/w you need. Microchip don't make it obvious. I've just
                                > > downloaded a few hundred Mb of stuff which may or may not be what I need.
                                > > Once I've waded through that, I might have a better idea about whether I'm
                                > > forced to buy the Dev Board.
                                > >
                                > > The download includes:
                                > > Microchip Application Libraries v2011-07-14 Windows
                                > > Microchip Application Libraries Release Notes
                                > > Microchip Application Libraries Help Files
                                > > from
                                > > http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=2680&dDocName=en547784
                                > > which I hope includes all the 2250 firmware.
                                > >
                                > > And the latest version of MPLAB
                                > > MPLAB IDE v8.76
                                > > MPLAB IDE User's Guide
                                > > from
                                > > http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en019469&part=SW007002
                                > > which I hope contains the C18 compiler
                                > >
                                > > Plus the
                                > > PICDEM FS USB Demonstration Board User's Guide
                                > > from
                                > > ww1.microchip.com/downloads/en/DeviceDoc/51526a.pdf
                                > > which contains a schematic.
                                > >
                                > > I've got a PicKit 2 which I hope is good enough to program the PIC18F2250.
                                > >
                                > > From: Alan
                                > >> Look at SparkFun's USB Bit Wacker (UBW), I
                                > >> believe it uses this chip (or a family member) and
                                > >> has quite a bit of documentation.
                                > >
                                > > Maybe. I was just reading about that one. As far as I can see, it uses
                                > > Microsoft dev tools. There's a short blog about it here:
                                > > http://www.designspark.com/product/picdem-fs-usb-demo-board
                                > >
                                > > There are so many projects out there that it's hard to know which to choose.
                                > >
                                > > I'll let you know how I get on.
                                > >
                                > > Peter
                                > >
                                > >
                                > >
                                > > ------------------------------------
                                > >
                                > > Visit the SRS Website at http://www.seattlerobotics.orgYahoo! Groups Links
                                > >
                                > >
                                > >
                                > >
                                > >
                                > > ------------------------------------
                                > >
                                > > Visit the SRS Website at http://www.seattlerobotics.orgYahoo! Groups Links
                                > >
                                > >
                                > >
                                >
                                >
                                > ------------------------------------
                                >
                                > Visit the SRS Website at http://www.seattlerobotics.orgYahoo! Groups Links
                                >
                                >
                                >
                              • Peter Balch
                                From: Dennis Clark ... I m not keen on it because it uses a VCP. At least, that s what I understood from their docs. At the moment, I don t have a specific
                                Message 15 of 26 , Oct 12, 2011
                                • 0 Attachment
                                  From: Dennis Clark
                                  > Check out the Sparkfun site for their USB Whacker board.

                                  I'm not keen on it because it uses a VCP. At least, that's what I understood
                                  from their docs.

                                  At the moment, I don't have a specific project in mind - I mostly want to
                                  learn about the chip. But, given the choice, I try to restrict myself to
                                  what might one day be useful for work.

                                  My experience is that end users have real trouble with serial ports - even
                                  virtual ones. How they manage to mess it up I don't know but they do. I
                                  don't have any customers in mind for this project. I'm not developing a
                                  product. But one day someone will say "I need a cheap simple USB widget" and
                                  I don't want to present them with a virtual serial port kludge. To me, VCPs
                                  are "legacy" so why would I use one in a new project? I'm just finishing a
                                  (not at all cheap!) board that uses an FTDI USB chip and the client's first
                                  request was "don't use a virtual serial port - my customers can't handle the
                                  complexity". What complexity? And pretty well all the technical queries I
                                  get about the few commercial robot toys I've designed are about getting com
                                  ports to work. (No doubt customers will have trouble with the FTDI-based
                                  board because installation will involve FTDI's custom driver.)

                                  I presume a HID will just work - no different from plugging in a mouse.

                                  > You need the IDE and C18 compiler.

                                  I've just installed MPLAB. I expected it to include C18 but I see I have to
                                  dowload that separately.

                                  > If you don't have a PIC ICD or PICkit programmer then
                                  > you'll need one of those

                                  I've got a PicKit2. AFAIK it works with all flash 10F, 12F, 16F, 18F, 24F
                                  chips.

                                  > it's worse if you aren't used to wading into the labyrinth
                                  > that is the Microchip site...

                                  Indeed. I've been wading through it for years and still haven't understood
                                  how to find things reliably. Every visit is a voyage of discovery.

                                  > Download USB appropriate code

                                  Which is it? Aha, I've just installed the Microchip Application Library. I
                                  see there are a lot of USB goodies in there.

                                  Thanks

                                  Peter
                                • Dennis Clark
                                  Problems with VCP ports? They have to be kidding. They don t gave to do anything at all to make them work! Instant drivers, high baud rates and simple
                                  Message 16 of 26 , Oct 13, 2011
                                  • 0 Attachment
                                    Problems with VCP ports? They have to be kidding. They don't gave to do anything at all to make them work! Instant drivers, high baud rates and simple connections, that smacks of plain old prejudice, not technical barriers. Hmm, of course the Windows habit of making you re-install an already installed driver if you move to a different USB port and the comparability matrix of the several Win OS's out at the moment may also be an issue, but those exist for all USB devices. You can use a HID interface for connection if you don't need a high throughput interface…

                                    DLC
                                    --
                                    Dennis Clark
                                    While traveling

                                    On Oct 12, 2011, at 5:52 PM, "Peter Balch" <peterbalch@...> wrote:

                                    > From: Dennis Clark
                                    >> Check out the Sparkfun site for their USB Whacker board.
                                    >
                                    > I'm not keen on it because it uses a VCP. At least, that's what I understood
                                    > from their docs.
                                    >
                                    > At the moment, I don't have a specific project in mind - I mostly want to
                                    > learn about the chip. But, given the choice, I try to restrict myself to
                                    > what might one day be useful for work.
                                    >
                                    > My experience is that end users have real trouble with serial ports - even
                                    > virtual ones. How they manage to mess it up I don't know but they do. I
                                    > don't have any customers in mind for this project. I'm not developing a
                                    > product. But one day someone will say "I need a cheap simple USB widget" and
                                    > I don't want to present them with a virtual serial port kludge. To me, VCPs
                                    > are "legacy" so why would I use one in a new project? I'm just finishing a
                                    > (not at all cheap!) board that uses an FTDI USB chip and the client's first
                                    > request was "don't use a virtual serial port - my customers can't handle the
                                    > complexity". What complexity? And pretty well all the technical queries I
                                    > get about the few commercial robot toys I've designed are about getting com
                                    > ports to work. (No doubt customers will have trouble with the FTDI-based
                                    > board because installation will involve FTDI's custom driver.)
                                    >
                                    > I presume a HID will just work - no different from plugging in a mouse.
                                    >
                                    >> You need the IDE and C18 compiler.
                                    >
                                    > I've just installed MPLAB. I expected it to include C18 but I see I have to
                                    > dowload that separately.
                                    >
                                    >> If you don't have a PIC ICD or PICkit programmer then
                                    >> you'll need one of those
                                    >
                                    > I've got a PicKit2. AFAIK it works with all flash 10F, 12F, 16F, 18F, 24F
                                    > chips.
                                    >
                                    >> it's worse if you aren't used to wading into the labyrinth
                                    >> that is the Microchip site...
                                    >
                                    > Indeed. I've been wading through it for years and still haven't understood
                                    > how to find things reliably. Every visit is a voyage of discovery.
                                    >
                                    >> Download USB appropriate code
                                    >
                                    > Which is it? Aha, I've just installed the Microchip Application Library. I
                                    > see there are a lot of USB goodies in there.
                                    >
                                    > Thanks
                                    >
                                    > Peter
                                    >
                                    >
                                    >
                                    > ------------------------------------
                                    >
                                    > Visit the SRS Website at http://www.seattlerobotics.orgYahoo! Groups Links
                                    >
                                    >
                                    >
                                  • jamericanfreddy
                                    i am looking to see mine
                                    Message 17 of 26 , Oct 24, 2011
                                    • 0 Attachment
                                      i am looking to see mine

                                      --- In SeattleRobotics@yahoogroups.com, "Peter Balch" <peterbalch@...> wrote:
                                      >
                                      > From: jamericanfreddy
                                      > > do you have a demo board or just the chip
                                      >
                                      > Neither yet. I was going to buy a couple of the PIC18F2250 chips tonight. I
                                      > was wanting to use a 2250 so a 4450 board seemed unneccessary.
                                      >
                                      > Dennis suggested I could download the Microchip code and so it looked like I
                                      > had a good plan. However, it's not entirely clear what I have to download.
                                      > The advantage of buying the board is that you get a CD and don't have to
                                      > sort out what s/w you need. Microchip don't make it obvious. I've just
                                      > downloaded a few hundred Mb of stuff which may or may not be what I need.
                                      > Once I've waded through that, I might have a better idea about whether I'm
                                      > forced to buy the Dev Board.
                                      >
                                      > The download includes:
                                      > Microchip Application Libraries v2011-07-14 Windows
                                      > Microchip Application Libraries Release Notes
                                      > Microchip Application Libraries Help Files
                                      > from
                                      > http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=2680&dDocName=en547784
                                      > which I hope includes all the 2250 firmware.
                                      >
                                      > And the latest version of MPLAB
                                      > MPLAB IDE v8.76
                                      > MPLAB IDE User's Guide
                                      > from
                                      > http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en019469&part=SW007002
                                      > which I hope contains the C18 compiler
                                      >
                                      > Plus the
                                      > PICDEM FS USB Demonstration Board User's Guide
                                      > from
                                      > ww1.microchip.com/downloads/en/DeviceDoc/51526a.pdf
                                      > which contains a schematic.
                                      >
                                      > I've got a PicKit 2 which I hope is good enough to program the PIC18F2250.
                                      >
                                      > From: Alan
                                      > > Look at SparkFun's USB Bit Wacker (UBW), I
                                      > > believe it uses this chip (or a family member) and
                                      > > has quite a bit of documentation.
                                      >
                                      > Maybe. I was just reading about that one. As far as I can see, it uses
                                      > Microsoft dev tools. There's a short blog about it here:
                                      > http://www.designspark.com/product/picdem-fs-usb-demo-board
                                      >
                                      > There are so many projects out there that it's hard to know which to choose.
                                      >
                                      > I'll let you know how I get on.
                                      >
                                      > Peter
                                      >
                                    • Kipton Moravec
                                      ... If you are building from scratch I would recommend going with the PIC24 or PIC32 family. They have more of everything. Compiler is still free, (but
                                      Message 18 of 26 , Oct 27, 2011
                                      • 0 Attachment
                                        On Tue, 2011-10-11 at 12:22 +0100, Peter Balch wrote:
                                        > 
                                        >
                                        > Has anyone used the PIC18F2550 - or similar? That's the flash USB
                                        > chip.
                                        >
                                        > Preferably using the free compiler from Microchip.
                                        >
                                        > I haven't started yet but it looks like the USB is quite hard to
                                        > configure and use. Even getting the clock right seems difficult.
                                        >
                                        > There are a variety home-brew projects on the web and it would be nice
                                        > if someone could say "I copied the xxx project and it worked first
                                        > time".
                                        >
                                        > I guess I'll be starting with a HID device.
                                        >
                                        > Thanks
                                        >
                                        > Peter
                                        >

                                        If you are building from scratch I would recommend going with the PIC24
                                        or PIC32 family. They have more of everything. Compiler is still free,
                                        (but optimization is turned off after 30 days). And a 16-bit processor
                                        will do any math much faster. The 32-bit will also do floating point
                                        much much faster if you need to do it. It is not much more expensive.

                                        As for the USB, no matter which chip you use, you have to use a crystal
                                        oscillator. The built in RC oscillator is not accurate enough for USB.

                                        Kip
                                      • Peter Balch
                                        From: Kipton Moravec ... Maybe I should. I ll look into it. I ve never yet had the need for complicated math on a PIC. What would be nice is speed - I seem to
                                        Message 19 of 26 , Nov 1, 2011
                                        • 0 Attachment
                                          From: Kipton Moravec
                                          > If you are building from scratch I would recommend going with the PIC24
                                          > or PIC32 family. They have more of everything.
                                          > And a 16-bit processor
                                          > will do any math much faster. The 32-bit will also do floating point
                                          > much much faster if you need to do it. It is not much more expensive.

                                          Maybe I should. I'll look into it. I've never yet had the need for
                                          complicated math on a PIC. What would be nice is speed - I seem to run out
                                          of MIPS, not math. It looks to me like the 18F is faster than the 24F. But
                                          you may be right that 18F is an intermediate technology so why not jump
                                          straight to 32F.

                                          I've been rather busy so haven't managed much so far. I bought a selection
                                          of 18F USB chips and wired up a 4550 with a minimal circuit: XTAL, USB
                                          socket, 470n on the 3.3V output, pullup on Vpp. That's all - none of the
                                          extra caps and res on the XTAL or USB. I loaded in the Mouse HID demo and it
                                          worked first time. (Actually, it didn't work until I'd put in the 470n, You
                                          really do need that one.)

                                          Peter
                                        • Dennis Clark
                                          The 18F is 48MHz and the 24FJ is 32MHz BUT the 18F has a 4 stage pipeline and the 24F has a 2 stage pipeline. This means that the 18F part is effectively a 12
                                          Message 20 of 26 , Nov 1, 2011
                                          • 0 Attachment
                                            The 18F is 48MHz and the 24FJ is 32MHz BUT the 18F has a 4 stage pipeline and the 24F has a 2 stage pipeline. This means that the 18F part is effectively a 12 "MIPS" part and the 24F is a 16 "MIPS" part. The 18F is an 8 bit data path and the 24F is a 16 bit data path, which kind of doubles it's throughput. The 18F2550 has 24K FLASH/2K RAM $6.30 and the 24FJ32GB002 (for instance) has 32K FLASH/8K RAM at $4.28 - in one-off prices. Both are 28 pin SOIC parts in this comparison. The 18F can only be a device, the 24F part can be host, device or OTG.

                                            Why not step up?

                                            DLC
                                            --
                                            Dennis Clark
                                            While traveling

                                            On Nov 1, 2011, at 4:51 AM, "Peter Balch" <peterbalch@...> wrote:

                                            > From: Kipton Moravec
                                            >> If you are building from scratch I would recommend going with the PIC24
                                            >> or PIC32 family. They have more of everything.
                                            >> And a 16-bit processor
                                            >> will do any math much faster. The 32-bit will also do floating point
                                            >> much much faster if you need to do it. It is not much more expensive.
                                            >
                                            > Maybe I should. I'll look into it. I've never yet had the need for
                                            > complicated math on a PIC. What would be nice is speed - I seem to run out
                                            > of MIPS, not math. It looks to me like the 18F is faster than the 24F. But
                                            > you may be right that 18F is an intermediate technology so why not jump
                                            > straight to 32F.
                                            >
                                            > I've been rather busy so haven't managed much so far. I bought a selection
                                            > of 18F USB chips and wired up a 4550 with a minimal circuit: XTAL, USB
                                            > socket, 470n on the 3.3V output, pullup on Vpp. That's all - none of the
                                            > extra caps and res on the XTAL or USB. I loaded in the Mouse HID demo and it
                                            > worked first time. (Actually, it didn't work until I'd put in the 470n, You
                                            > really do need that one.)
                                            >
                                            > Peter
                                            >
                                            >
                                            >
                                            > ------------------------------------
                                            >
                                            > Visit the SRS Website at http://www.seattlerobotics.orgYahoo! Groups Links
                                            >
                                            >
                                            >
                                          • Tony Mactutis
                                            Just a quick clarification - a 4 stage pipeline does not mean that you only get one instruction every 4 cycles. In the ideal case, you will get one
                                            Message 21 of 26 , Nov 3, 2011
                                            • 0 Attachment
                                              Just a quick clarification - a 4 stage pipeline does not mean that you only get one instruction every 4 cycles.  In the ideal case, you will get one instruction per cycle, once the pipeline is loaded.  The actual ratio achieved will depend on the mix of instructions present in a program, but in general you can expect that a pipelined 48Mhz part will deliver much more than 12 MIPS.

                                              On 11/1/2011 8:37 AM, Dennis Clark wrote:
                                               

                                              The 18F is 48MHz and the 24FJ is 32MHz BUT the 18F has a 4 stage pipeline and the 24F has a 2 stage pipeline. This means that the 18F part is effectively a 12 "MIPS" part and the 24F is a 16 "MIPS" part. The 18F is an 8 bit data path and the 24F is a 16 bit data path, which kind of doubles it's throughput. The 18F2550 has 24K FLASH/2K RAM $6.30 and the 24FJ32GB002 (for instance) has 32K FLASH/8K RAM at $4.28 - in one-off prices. Both are 28 pin SOIC parts in this comparison. The 18F can only be a device, the 24F part can be host, device or OTG.

                                              Why not step up?

                                              DLC
                                              --
                                              Dennis Clark
                                              While traveling

                                              On Nov 1, 2011, at 4:51 AM, "Peter Balch" <peterbalch@...> wrote:

                                              > From: Kipton Moravec
                                              >> If you are building from scratch I would recommend going with the PIC24
                                              >> or PIC32 family. They have more of everything.
                                              >> And a 16-bit processor
                                              >> will do any math much faster. The 32-bit will also do floating point
                                              >> much much faster if you need to do it. It is not much more expensive.
                                              >
                                              > Maybe I should. I'll look into it. I've never yet had the need for
                                              > complicated math on a PIC. What would be nice is speed - I seem to run out
                                              > of MIPS, not math. It looks to me like the 18F is faster than the 24F. But
                                              > you may be right that 18F is an intermediate technology so why not jump
                                              > straight to 32F.
                                              >
                                              > I've been rather busy so haven't managed much so far. I bought a selection
                                              > of 18F USB chips and wired up a 4550 with a minimal circuit: XTAL, USB
                                              > socket, 470n on the 3.3V output, pullup on Vpp. That's all - none of the
                                              > extra caps and res on the XTAL or USB. I loaded in the Mouse HID demo and it
                                              > worked first time. (Actually, it didn't work until I'd put in the 470n, You
                                              > really do need that one.)
                                              >
                                              > Peter
                                              >
                                              >
                                              >
                                              > ------------------------------------
                                              >
                                              > Visit the SRS Website at http://www.seattlerobotics.orgYahoo! Groups Links
                                              >
                                              >
                                              >


                                            • Dennis Clark
                                              My bad, I should not have called it a pipeline, it confuses folks with other microprocessor s functions. Microchip s documentation will tell you that a 40MHz
                                              Message 22 of 26 , Nov 3, 2011
                                              • 0 Attachment
                                                My bad, I should not have called it a pipeline, it confuses folks with other microprocessor's functions.  Microchip's documentation will tell you that a 40MHz part is a 10 MIPS throughput.  It takes 4 clocks to get one instruction through.  This is not the same as an instruction pipeline where your only loss is a branch misprediction to re-load the pipeline.  What you describe will only happen if there are four instructions in the pipe staggered at various stages, each one using one part of the pipeline.  That is not how the PIC architecture works.

                                                DLC

                                                On 11/3/11 8:19 PM, Tony Mactutis wrote:
                                                Just a quick clarification - a 4 stage pipeline does not mean that you only get one instruction every 4 cycles.  In the ideal case, you will get one instruction per cycle, once the pipeline is loaded.  The actual ratio achieved will depend on the mix of instructions present in a program, but in general you can expect that a pipelined 48Mhz part will deliver much more than 12 MIPS.

                                                On 11/1/2011 8:37 AM, Dennis Clark wrote:  

                                                The 18F is 48MHz and the 24FJ is 32MHz BUT the 18F has a 4 stage pipeline and the 24F has a 2 stage pipeline. This means that the 18F part is effectively a 12 "MIPS" part and the 24F is a 16 "MIPS" part. The 18F is an 8 bit data path and the 24F is a 16 bit data path, which kind of doubles it's throughput. The 18F2550 has 24K FLASH/2K RAM $6.30 and the 24FJ32GB002 (for instance) has 32K FLASH/8K RAM at $4.28 - in one-off prices. Both are 28 pin SOIC parts in this comparison. The 18F can only be a device, the 24F part can be host, device or OTG.

                                                Why not step up?

                                                DLC
                                                --
                                                Dennis Clark
                                                While traveling

                                                On Nov 1, 2011, at 4:51 AM, "Peter Balch" <peterbalch@...>wrote:

                                                > From: Kipton Moravec
                                                >> If you are building from scratch I would recommend going with the PIC24
                                                >> or PIC32 family. They have more of everything.
                                                >> And a 16-bit processor
                                                >> will do any math much faster. The 32-bit will also do floating point
                                                >> much much faster if you need to do it. It is not much more expensive.
                                                >
                                                > Maybe I should. I'll look into it. I've never yet had the need for
                                                > complicated math on a PIC. What would be nice is speed - I seem to run out
                                                > of MIPS, not math. It looks to me like the 18F is faster than the 24F. But
                                                > you may be right that 18F is an intermediate technology so why not jump
                                                > straight to 32F.
                                                >
                                                > I've been rather busy so haven't managed much so far. I bought a selection
                                                > of 18F USB chips and wired up a 4550 with a minimal circuit: XTAL, USB
                                                > socket, 470n on the 3.3V output, pullup on Vpp. That's all - none of the
                                                > extra caps and res on the XTAL or USB. I loaded in the Mouse HID demo and it
                                                > worked first time. (Actually, it didn't work until I'd put in the 470n, You
                                                > really do need that one.)
                                                >
                                                > Peter
                                                >
                                                >
                                                >
                                                > ------------------------------------
                                                >
                                                > Visit the SRS Website at http://www.seattlerobotics.orgYahoo! Groups Links
                                                >
                                                >
                                                >



                                                -- 
                                                Dennis Clark
                                                TTT Enterprises
                                              • Randy Carter
                                                The PIC microcontroller uses 4 clock cycles to execute each instruction. So a part using a 4mHz crystal is executing 1 million instructions (or machine
                                                Message 23 of 26 , Nov 3, 2011
                                                • 0 Attachment
                                                  The PIC microcontroller uses 4 clock cycles to execute each instruction. So a part using a 4mHz crystal is executing 1 million instructions (or machine cycles) per second. The exception are branch instructions which take 2 machine cycles to execute. This is because the pipeline has to be flushed during a branch. All PIC's operate this way since they use the same basic RISC core structure.


                                                  ----------------------------------------------------
                                                  "What the detractors and critics of electric vehicles
                                                  have been saying for years, is true. The electric
                                                  vehicle is not for everybody, given the limited range
                                                  it can only meet the needs of 90% of the population."

                                                  Ed Begley Jr.
                                                  ----------------------------------------------------


                                                  ---------- Original Message ----------
                                                  From: Tony Mactutis <tony@...>
                                                  To: SeattleRobotics@yahoogroups.com
                                                  Subject: Re: [SeattleRobotics] PIC18F2550
                                                  Date: Thu, 03 Nov 2011 19:19:35 -0700





                                                  Just a quick clarification - a 4 stage pipeline does not mean that you only get one instruction every 4 cycles. In the ideal case, you will get one instruction per cycle, once the pipeline is loaded. The actual ratio achieved will depend on the mix of instructions present in a program, but in general you can expect that a pipelined 48Mhz part will deliver much more than 12 MIPS.

                                                  On 11/1/2011 8:37 AM, Dennis Clark wrote:
                                                  The 18F is 48MHz and the 24FJ is 32MHz BUT the 18F has a 4 stage pipeline and the 24F has a 2 stage pipeline. This means that the 18F part is effectively a 12 "MIPS" part and the 24F is a 16 "MIPS" part. The 18F is an 8 bit data path and the 24F is a 16 bit data path, which kind of doubles it's throughput. The 18F2550 has 24K FLASH/2K RAM $6.30 and the 24FJ32GB002 (for instance) has 32K FLASH/8K RAM at $4.28 - in one-off prices. Both are 28 pin SOIC parts in this comparison. The 18F can only be a device, the 24F part can be host, device or OTG.

                                                  Why not step up?

                                                  DLC
                                                  --
                                                  Dennis Clark
                                                  While traveling
                                                • Peter Balch
                                                  So is a 48MHz 18F doing 12MIPs and a 32MHz 24F doing 8MIPs. Or is the 24F indeed faster? The instructions themselves look to be of comparable camplexity. Peter
                                                  Message 24 of 26 , Nov 4, 2011
                                                  • 0 Attachment
                                                    So is a 48MHz 18F doing 12MIPs and a 32MHz 24F doing 8MIPs. Or is the 24F indeed faster? The instructions themselves look to be of comparable camplexity.
                                                     
                                                    Peter
                                                     
                                                  • Kipton Moravec
                                                    ... There is a pipeline, but the 24F takes 2 clocks per instruction so a 32 MHz clock gives a 16 MIPS 16-bit machine. The 18F takes 4 clocks per instruction so
                                                    Message 25 of 26 , Nov 4, 2011
                                                    • 0 Attachment
                                                      On Fri, 2011-11-04 at 11:43 +0000, Peter Balch wrote:
                                                      >
                                                      >
                                                      > So is a 48MHz 18F doing 12MIPs and a 32MHz 24F doing 8MIPs. Or is the
                                                      > 24F indeed faster? The instructions themselves look to be of
                                                      > comparable camplexity.
                                                      >
                                                      > Peter
                                                      >

                                                      There is a pipeline, but the 24F takes 2 clocks per instruction so a 32
                                                      MHz clock gives a 16 MIPS 16-bit machine.

                                                      The 18F takes 4 clocks per instruction so a 48 MHz clock gives a 12 MIPS
                                                      8-bit machine.

                                                      In both cases a branch takes two instruction cycles.



                                                      Don't forget you can move data 2x faster and do 16 bit Multiply at least
                                                      8 times faster with a 16-bit architecture. The cost of the processor is
                                                      so small compared to the whole board, that my philosophy is bigger is
                                                      better (unless I am mass producing them for resale). You do not know how
                                                      many times I wish I had more memory or a couple of more pins a year
                                                      later (or sometimes a month later when I got some more information.)

                                                      Now the 32-bit processors are coming down in price, so I am looking at
                                                      them for stuff that I have the least information about. So I have more
                                                      options down the road and fewer HW iterations. Also a number of the
                                                      parts have the same pinout across the architectures, so in many cases
                                                      (not all) you can put a 32-bit processor in the 16-bit processor place
                                                      with no board change. This is one of the things I like about the PIC
                                                      Architecture.

                                                      Kip
                                                    • Dennis Clark
                                                      No the 24F has a 2 stage so it s 16 MIPS. DLC -- Dennis Clark While traveling
                                                      Message 26 of 26 , Nov 4, 2011
                                                      • 0 Attachment
                                                        No the 24F has a 2 stage so it's 16 MIPS. 

                                                        DLC

                                                        --
                                                        Dennis Clark
                                                        While traveling

                                                        On Nov 4, 2011, at 5:43 AM, "Peter Balch" <peterbalch@...> wrote:

                                                        So is a 48MHz 18F doing 12MIPs and a 32MHz 24F doing 8MIPs. Or is the 24F indeed faster? The instructions themselves look to be of comparable camplexity.
                                                         
                                                        Peter
                                                         
                                                      Your message has been successfully submitted and would be delivered to recipients shortly.