[SOLVED] PICs and boards (super beginner question)

Discussion in 'The Projects Forum' started by KansaiRobot, Apr 13, 2015.

  1. KansaiRobot

    Thread Starter Active Member

    Jan 15, 2010
    318
    5
    Hello and thanks for all the help. I have to report that I have programmed one board with the Pickit as you taught me, using MPLABX no problem. I still have lots of questions but ok first.

    please pardon my ignorance for the following question.
    So far I have been using a board that has a PIC18F2553. You can see the schematics here
    circuitos3.jpg

    Some years ago I used a similar one with 18F2550 and I have bought one too with 18F4553 with a PICKIT3 connection (what for I dont know since now I know how to connect anything shhhh) I have programmed it with a simple LED blink program, power it through the USB and now it blinks no problem

    Anyway, here is my super beginner questions:

    I have a couple of PICs here too in my desk .

    1) Can I program them in a similar way? (I guess I can)
    2) Can I run my program after that with them??
    I ask this because different than the board I use, this is only the chip. In the board there is an oscillator connected to 8 and 9 and some resistors and capacitors and plus well the USB connection, but the thing that worries me is :
    ICs, by themselves can not work, can they? I am guessing they need an oscillator to work. Or do they have an "internal oscillator"?

    Thank you for your help and knowledge
     
  2. blueroomelectronics

    AAC Fanatic!

    Jul 22, 2007
    1,758
    98
    1. They program in a similar way.
    2. Of course.
    Many modern PICs have an internal oscillator, it'll be in the data sheet.

    As a tiny example, the 8 pin 12F683 only needs a 0.1uF cap near the power pins and it's good to go. It has a 8MHz or 32kHz 1% internal oscillator and 5 and a half I/O pins (one in input only). It can run on 2 to 5.5VDC.

    Download a copy of PIC Tips & Tricks free from Microchip.
     
    KansaiRobot likes this.
  3. atferrari

    AAC Fanatic!

    Jan 6, 2004
    2,645
    759
    Please do not take me wrong. I think you will know better if you take the datasheet of any of them (look for the smaller datasheet) and after looking at the very 2 or 3 first pages (the most basic is mentioned there) go straight to the index in the back of the book. Once there look for those things you are interested on.

    The idea is to learn how to find their data. Simple as that.

    When you know how, you could do the same for every similar PIC you run across. That way, comparing any to any, IS easy.

    I know: it seems too much work but, trust me: it is not!
     
  4. KansaiRobot

    Thread Starter Active Member

    Jan 15, 2010
    318
    5
    Thank you for your answer. I appreciate your advice. Let me explain myself.

    The purpose of this question was to discard an impossible idea. Take into account that I have a lot of lack of knowledge. For example, it is like me asking: "Can I ride an unicorn?" If someone says "No, of course not, you can't" then that is the end of the journey. But if someone says "Yes, it is possible, we have done it" then it will be the time for me to read the datasheet of said unicorn.

    Same, I was asking if it is possible to run a program with the IC alone and not extern circuitry. If this is an idea as far fetched as the unicorn one, I would appreciate being told so. But if not, and if it is possible then I will look for the datasheet.

    Anyway, thanks again. Tomorrow I ll buy some USB connector to power my IC and proceed to program and use it hopefully
     
  5. OBW0549

    Well-Known Member

    Mar 2, 2015
    1,301
    880
    At a minimum, any PIC is going to require a pullup resistor from VDD to MCLR and at least one decoupling capacitor, from VDD to VSS. Some PICs have multiple VDD/VSS pin pairs, each of which requires decoupling, and a pair of pins, AVDD and AVSS, for analog subsystem power. Other than these, I don't know of any components that are absolutely necessary. Nearly all PICs have internal RC clock oscillators. While these are not as accurate or as stable as crystal oscillators, they suffice for many kinds of applications.

    As for the datasheet, I cannot imagine how you can expect to do much programming of any PIC, even the simplest ones, without consulting its datasheet. How else will you know how to configure the device and its peripherals, much less operate them and do anything useful?

    Always read the datasheet. Always, always, ALWAYS!
     
    KansaiRobot likes this.
  6. atferrari

    AAC Fanatic!

    Jan 6, 2004
    2,645
    759
    I would read the datasheet first and then, if in doubt, I will ask here. Knowledge gained by yourself is firmly in your mind until Aloysius Alois comes to assist you.

    Google what RTFM means. ;)

    Buena suerte.
     
  7. KansaiRobot

    Thread Starter Active Member

    Jan 15, 2010
    318
    5
    Thank you for the very useful post. I learned a lot from it.

    I think my explaining powers are not good though..(sigh) . I have in fact read the datasheet. That is how I already programmed a A/D algorithm, and some output. I dont remember very well how I did it but some years ago I even used the USB port to transmit to my PC. But all of this I did using a commercially available board with a IC in it and some circuitry, which included resistors capacitors and a oscillator. never tried only the IC alone
     
    Last edited: Apr 14, 2015
  8. OBW0549

    Well-Known Member

    Mar 2, 2015
    1,301
    880
    Ah, OK. Now I understand a little better.

    There really isn't very much external support circuitry required by most PICs beyond what I outlined above, other than a voltage regulator to supply power and a 5- or 6-pin header to connect to the PICKit 3. As for communications, FTDI make some nifty little USB -to-TTL-serial converter cables with either bare wires or header termination, and which carry GND, VDD, TXD, RXD, RTS, and CTS; to a PC (or Mac) they appear as a serial port. They make both 3.3V and 5V versions. Very handy, given that most PICs anymore contain at least one UART...
     
  9. KansaiRobot

    Thread Starter Active Member

    Jan 15, 2010
    318
    5
    Thank you very much for you helpful response.

    I tried it today. After programming a simple LED blinker in the IC, I connected as you said: A resistor between MLCR and Vdd and a 0.1μF between Vdd and Vss. Then power it up with 4 batteries in series and voila! the LED started blinking.

    Thanks a lot again
     
    OBW0549 likes this.
Loading...