Advertise on Bikeforums.net



User Tag List

Results 1 to 7 of 7
  1. #1
    la vache fantôme phantomcow2's Avatar
    Join Date
    Aug 2004
    Location
    NH
    Posts
    6,266
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    I need to PIC somebodies brain

    How would you describe programming a PIC chip? In difficulty I mean
    C://dos
    C://dos.run
    run.dos.run

  2. #2
    That darn Yankee TexasGuy's Avatar
    Join Date
    Jun 2005
    Location
    West West Fort Worth
    My Bikes
    Mongoose XR-100, Eros Bianchi
    Posts
    4,286
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I would apply the term Massochistic, but oddly fun
    Life is about hanging onto what you think is important and finding out what really is important.
    "Stop Ruining my joke!", "No, a joke implies humor attached at no additional cost"
    So many sayings, so little sig space.

  3. #3
    '05 NUEser EJ123's Avatar
    Join Date
    Aug 2005
    Posts
    3,374
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PIC chip huuh?

    I thought you meant pic like picture=)

  4. #4
    Senior Member pmseattle's Avatar
    Join Date
    Jun 2004
    Location
    Seattle, WA
    Posts
    451
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by phantomcow2
    How would you describe programming a PIC chip? In difficulty I mean
    Like any other programming job, it depends on the complexity of the task you are attempting to accomplish, and the tools you have available. I have written a lot of code for the PIC16F- and PIC18F- chips. I use the free Microchip MPLAB programming environment along with a PICStart Plus device programmer, niether of which is very sophisticated, but they get the job done for very little investment. Debugging can be painful with no emulator. MPLAB has a simulator that is sort of like an emulator; it allows you to run your PIC program on your computer and artificially plug numbers in and observe the effects. You can single step and set break points.
    One weak point of PICs, at least the ones I have used, is their inability to do much in the way of math operations. Of course, that is true of most other small scale microcontrollers. Also, having the RAM set up as multiple register banks is mildly irritating. The good things about them are they are dirt cheap, easy to obtain, easy to get working in a circuit, they have a lot of digital and analog I/O depending on which device you use, and the documentation is excellent.

  5. #5
    la vache fantôme phantomcow2's Avatar
    Join Date
    Aug 2004
    Location
    NH
    Posts
    6,266
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the reply.
    How would you describe ther capability? Able to handle speed? I think they take 5v.
    The one I will be using is PIC16 I THINK.
    C://dos
    C://dos.run
    run.dos.run

  6. #6
    Senior Member pmseattle's Avatar
    Join Date
    Jun 2004
    Location
    Seattle, WA
    Posts
    451
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by phantomcow2
    Thanks for the reply.
    How would you describe ther capability? Able to handle speed? I think they take 5v.
    The one I will be using is PIC16 I THINK.
    Capability: They are excellent for I/O intensive tasks that involve very little number crunching. They have lots of peripheral functions, such as timers, counters, analog I/O, serial communications, digital I/O. They are available in several different physical layouts, including DIP for easy prototyping.

    Speed: The external oscillator can be up to 20 MHz for most varieties, and you can use an on-board clock doubler to go to 40 MHz. I usually use a 10 MHz ceramic resonator for the oscillator since several manufacturers make resonators specifically for PICs. The resonators are very cheap, rugged, and easy to use. Also, PICs generally have an internal oscillator which can be used instead of an external oscillator, although I believe it is only 8 MHz. In my experience it is not quite as frequency stable as a crystal or resonator, which may affect timing-sensitive designs. An instruction cycle takes four clock cycles and if I recall correctly all of the instructions take one instruction cycle to operate. So my 10 MHz resonator allows 2.5 instructions to execute each microsecond.

    Power Supply: Most are 5 V nominal, some will allow a small range around 5 V. Current draw will depend on how fast the device is running, what peripherals are active, and what you have connected to the I/O ports.
    Last edited by pmseattle; 03-05-06 at 10:59 AM. Reason: error

  7. #7
    la vache fantôme phantomcow2's Avatar
    Join Date
    Aug 2004
    Location
    NH
    Posts
    6,266
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by pmseattle
    Capability: They are excellent for I/O intensive tasks that involve very little number crunching. They have lots of peripheral functions, such as timers, counters, analog I/O, serial communications, digital I/O. They are available in several different physical layouts, including DIP for easy prototyping.

    Speed: The external oscillator can be up to 20 MHz for most varieties, and you can use an on-board clock doubler to go to 40 MHz. I usually use a 10 MHz ceramic resonator for the oscillator since several manufacturers make resonators specifically for PICs. The resonators are very cheap, rugged, and easy to use. Also, PICs generally have an internal oscillator which can be used instead of an external oscillator, although I believe it is only 8 MHz. In my experience it is not quite as frequency stable as a crystal or resonator, which may affect timing-sensitive designs. An instruction cycle takes four clock cycles and if I recall correctly all of the instructions take one instruction cycle to operate. So my 10 MHz resonator allows 2.5 instructions to execute each microsecond.

    Power Supply: Most are 5 V nominal, some will allow a small range around 5 V. Current draw will depend on how fast the device is running, what peripherals are active, and what you have connected to the I/O ports.

    Thanks. This would be used for stepper motors. These have to be able to drive a good 15,000 steps per second.
    I was told the basic stamp would be too slow, so this is worth a shot I think. What is the fastest PIC you know of? Speed is a big concern here. I know people make simple PIC or stamp based stepper drivers for robitic applications, but for what I need, I want to be able to spin my motors at 700RPM no problem. I've been told that using a chopper drive with an Allegro IC, people have been able to get steppers to spin at 1000RPM with no load.
    But I see plenty of PIC based drivers that claim to be able to do this, like the Linistepper. Only most of the drives out there are made for around 3 amps. I need 6...
    So I am having a friend build me something that he says will be able to take 100vDC input, and drive up to 8 amps. I would just like to be able to program hte PIC to be able to adjust anything, to tune it I guess.
    C://dos
    C://dos.run
    run.dos.run

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •