Need help in programming PIC

Discussion in 'Embedded Systems and Microcontrollers' started by raremetalcaster, Jul 26, 2011.

  1. raremetalcaster

    Thread Starter New Member

    Jun 9, 2011
    14
    0
    is there any circuit to directly program pic18 from computer? (without using a PIC burner). I need one that are connected to the PIC18 directly.
     
  2. debjit625

    Well-Known Member

    Apr 17, 2010
    790
    186
    Any circuit used to connect between PC and MCU to program it,is called a programmer or if the mcu is of Microchip's PIC then you may call it PIC burner.

    Link : http://www.oshonsoft.com/picprog.html
    Also download the application software and use it to program your mcu.

    And if you have any plan to buy any programmer then I will prefer Microchip's ICD3.

    Good Luck
     
    raremetalcaster likes this.
  3. debjit625

    Well-Known Member

    Apr 17, 2010
    790
    186
    Another thing
    If you are asking about any circuit that do not use any active device then yes their is ,but for that you need Low Voltage Programming (LVP) option in your mcu.You can program a mcu using 4 wires ,two resistor and a 5 volt supply.But this way is not good enough,first of all the LVP bit should be already on to do this if its not turned on then nothing can be done.Using LVP you loose one pin of your mcu.And at last I found its very problematic many times it works and many times it doesn't.
     
    raremetalcaster likes this.
  4. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,392
    1,606
    No. There will always be some hardware involved.

    Some devices have "bootloaders" installed, code that can load other code. A PIC18 could get the program over a USB which has the least hardware but still a few items.
     
    raremetalcaster likes this.
  5. raremetalcaster

    Thread Starter New Member

    Jun 9, 2011
    14
    0
    jackrabbit can be connected directly to pc right? i need the example circuit to make the pic to work just like the jack rabbit >.< . A circuit that can be connected to the pic directly. Coz it will be hard to program if i need to take out the pic regularly, afraid the leg will be broken >.< . Early thanks for your help :D
     
  6. raremetalcaster

    Thread Starter New Member

    Jun 9, 2011
    14
    0
  7. someonesdad

    Senior Member

    Jul 7, 2009
    1,585
    141
    Just buy a PICkit 2 or 3 -- you connect them to the PIC and program them without removing them from your circuit. Easy and foolproof. You just have to make sure you have the requisite pinouts or places to connect clips. About $50 and it works after a simple installation. I can't imagine dorking around with anything else.
     
  8. raremetalcaster

    Thread Starter New Member

    Jun 9, 2011
    14
    0
    does it support c programming?
     
  9. be80be

    Senior Member

    Jul 5, 2008
    431
    57
    They don't care what you use as long as it can compile a hex that programmer loads into the PIC chip.

    C, basic, Jal, asm and pascal there programming languages that get complied into a hex that you programmer then loads into the chip.

    The hex is bytes of 0 and 1 that the chip can read and run.
     
  10. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,392
    1,606

    Not only does a PicKit support C (actually it is completely unaware of what wrote the code files it transfers) it can program your device while it is wired into the board where it gets used, it can power small boards, and can also act as an active debugger, allowing you to step thru the code and see what is happening.

    Geeze, what else do you want from it?
     
    raremetalcaster likes this.
  11. raremetalcaster

    Thread Starter New Member

    Jun 9, 2011
    14
    0
    thnks ErnieM... :D
     
  12. be80be

    Senior Member

    Jul 5, 2008
    431
    57
    Programmer don't support any programming languages They just load HEX files or bin files

    The pickit2 or 3 is a good programmer and debugger. But you can't write C with it

    You use hi-tech , boostC or mikroC and there more. They make a HEX that you can then load with a programmer
     
  13. raremetalcaster

    Thread Starter New Member

    Jun 9, 2011
    14
    0
    so, i need to use mplab c compiler right?
     
  14. be80be

    Senior Member

    Jul 5, 2008
    431
    57
    raremetalcaster likes this.
  15. raremetalcaster

    Thread Starter New Member

    Jun 9, 2011
    14
    0
    lastly.. what is the best compiler @ programmer and the most popular one out there for pic18... :D
     
  16. debjit625

    Well-Known Member

    Apr 17, 2010
    790
    186
    Yes it does,you just compile your program in any C compiler (I use HI TECH C) and then load the hex file into the application software of the programmer and burn it into the chip.

    For me its HI TECH C under MPLAB.
    Good Luck
     
    raremetalcaster likes this.
  17. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,392
    1,606
    I prefer the compiler from Microchip: MPLAB C Compiler for Academic Use It is a "lite" version meaning some of the advanced code optimizations are not available, otherwise it is unencumbered and you also get rights to it's output for business use.

    However: "NOTE: There is an IDE interaction problem with v3.39a, we will be posting 3.39.01 shortly. We apologize for any inconvenience. "

    So you'll have to wait a day or several till it is once again available. There is also an awesome Microchip Application Library (MAL) available that gives you plenty of sample application code. I've taken them several times as a staring place to use as the backbone of programs that use the UBS bus and also an SD storage card.

    And they are all free.
     
    raremetalcaster likes this.
  18. raremetalcaster

    Thread Starter New Member

    Jun 9, 2011
    14
    0
    thanks all :D
    i realy appriciate it... :D
     
  19. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,392
    1,606
    The compiler from Microchip: MPLAB C Compiler for Academic Use is now avalilable. Looks like they skipped over v3.39.01 and went right to 3.40.

    I would grab the standard version.
     
Loading...