1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

PIC-Programmer 2 for PIC16C84, its software & compiler???

Discussion in 'Microcontrollers' started by hassankhan, Jan 25, 2012.

  1. hassankhan

    hassankhan New Member

    Joined:
    Jan 24, 2012
    Messages:
    65
    Likes:
    1
    HI!!
    I HAVE MADE PIC-Programmer 2 for PIC16C84http://www.jdm.homepage.dk/newpics.htm,I MADE THIS ON BREAD BOARD I HAVE MADE CONNECTIONS FOR SERIAL COMMUNICATION NOW I WANT TO KNOW THAT HOW CAN I BURN CODE ON MY PIC16F84,FROM WHERE CAN I GET ITS COMPILER & THE SOFTWARE THAT WILL BURN THE CODE ON MY CONTROLLER & HOW CAN I TEST MY CONTROLLER AFTER BURNING IT WITHOUT PUTTING IT ON ANY CIRCUIT BECAUSE I DONOT HAVE ANY CIRCUIT WHERE I CAN TEST IT.AND PLEASE TELL ME CAN I DO THIS ALL ON XP?YOUR ADVICES WILL BE HIGHLY APPRECIATED.

    REPLY ME AS SOON AS POSSIBLE

    REGARDS
    HASSAN
     
  2. mvs sarma

    mvs sarma Well-Known Member

    Joined:
    Oct 29, 2006
    Messages:
    3,512
    Likes:
    76
    Location:
    Hyderabad, India.
    Welcome to ETO
    instead start using 16F628A as this can be reprogrammed many times. C series (called One time programmablae-OTP) can only be programmed once and end of it, that is not meant for people like us.
    regarding programmer, any one made on breadboard, might become uncertain unless you are very good at making breadbard projects.
    MPlab , can be downloaded free from www.microchip.com It helps you learn and write code in assembly language.
    otherwise you have to use PIC basic or some C language.
    like Mikro C or CCS C , Hitech C for pic for writing in asm , you might follow beautiful tutorials from Nigel Goodwin PIC programmer software, and PIC Tutorials at:
    http://www.winpicprog.co.uk


    Try to use always Lower case letters. otherwise people feel that you are shouting , LoL
     
    Last edited: Jan 25, 2012
  3. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,205
    Likes:
    640
    Location:
    Derbyshire, UK
    ONLINE
    The 16C84 was a re-programmable chip - the first and only one at that time - it predates the use of F for the EEPROM/FLASH based devices.

    It was replaced a LONG time ago by the 16F84, which in turn was replaced LONG ago by the 16F84a, then by the 16F628, then the 16F628a (these were all last century) - with the 628a now much of an antique.
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. mvs sarma

    mvs sarma Well-Known Member

    Joined:
    Oct 29, 2006
    Messages:
    3,512
    Likes:
    76
    Location:
    Hyderabad, India.

    Thanks Nigel, hope that freshers can start learning on 16F628A and later migrate to 16F877A and / 18F2(4)550, or 18F1320
     
  6. hassankhan

    hassankhan New Member

    Joined:
    Jan 24, 2012
    Messages:
    65
    Likes:
    1
    now in lower case Sir,ha ha ha
    by the way you people really helped a lot,& few mins before I have downloaded MPLAB & winpic800,is it ok?



    Regards
    Hassan
     
    Last edited: Jan 25, 2012
  7. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,205
    Likes:
    640
    Location:
    Derbyshire, UK
    ONLINE
    Incidently, the 16F877 was the second of the re-programmable PIC's - after a number of years of the 16C(F)84 being the only one.
     
  8. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,792
    Likes:
    134
    Location:
    morristown,tn
    That's a good start what kind of programmer did you make JDM ? A lot of newer computers don't put high enough voltage levels on the serial port to use a jdm type programmer.
     
  9. hassankhan

    hassankhan New Member

    Joined:
    Jan 24, 2012
    Messages:
    65
    Likes:
    1
    yeah its JDM type,i have a HP P-IV too,i guess it will work.tell me please what should i do?



    regards
    Hassan
     
  10. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,792
    Likes:
    134
    Location:
    morristown,tn
    The chip your using should program fine with a jdm as long as your computer serial port has the right voltage level. There not much to tell write some code and try it.

    Jdm programmer's worked fine till Pc makers started not putting serial ports on the PC I have a Dell that's 5 years old with Xp on it and it works fine using a JDM

    But my newer PC will not raise MCLR high enough to program chips
     
    Last edited: Jan 25, 2012
  11. mvs sarma

    mvs sarma Well-Known Member

    Joined:
    Oct 29, 2006
    Messages:
    3,512
    Likes:
    76
    Location:
    Hyderabad, India.
    @be80be,
    what is your newer version mobo? i saw some designs that adopt MC34063A to derive the needed 12V odd for Vpp.
    Modern laptops don't even have the COM port. This is where usb based pickit2 etc become inevitable. But, they too have issues, usb unable to support the power needs once larger chips come for loading hex. Many people advise buffered usb supply.

    I some how got the externally powered programmer designed by DL4YHF working well under winpic800 driver. it doesn't use the supply from the DB9 port.
     
  12. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,792
    Likes:
    134
    Location:
    morristown,tn
    I'll Look it up the Dell you get 12.5 VPP and Compaq Presario hits a 10 volts with the same JDM I made one that uses a wall power supply for VPP and it works fine on even my laptop with usb to serial

    I made the programmer that's on this Velleman® K8048 PIC® Programmer it works nice.
     
    Last edited: Jan 25, 2012
  13. mvs sarma

    mvs sarma Well-Known Member

    Joined:
    Oct 29, 2006
    Messages:
    3,512
    Likes:
    76
    Location:
    Hyderabad, India.
    using the modern lo powered COM ports, one has to reduce the current wasted for LEDs so that the available power can be better used for the purpose we need.
     
  14. hassankhan

    hassankhan New Member

    Joined:
    Jan 24, 2012
    Messages:
    65
    Likes:
    1
    i have downloaded MPLAB IDE V8.56,please tell me what should i do to convert c program into hex file because i dont have c compiler,or please send some links that i can download it.

    Regards
    Hassan
     
  15. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,792
    Likes:
    134
    Location:
    morristown,tn
    There all kinds of C which one are you using H-tech, Boost, MikroC any one of them have free demos that are good to more ram then that chips has.

    Post your code using code tags and we will try to tell you if you don't no. H-tech comes with MPLAB if you let it Install it. MiKroC has it's own ide. so dose Boost but Boost is easy to use with MPLAB. I never tried to use MikroC with MPLAB I like it's own ide better then MPLAB.
     
  16. hassankhan

    hassankhan New Member

    Joined:
    Jan 24, 2012
    Messages:
    65
    Likes:
    1
    Sir m building the following code on MPLAB but m getting the following error,please guide me as soon as possible.
    THE CODE IS:

    Collapse | Copy Code
    #include <htc.h>
    #include <pic.h>
    #include <delay.c>

    main()
    {
    TRISB=0; // declare portb as outpot

    for(;;) // do forever
    {
    RB0=1; // LED ON
    DelayMs(250); // delay for 0.25 seconds
    RB0=0; // LED OFF
    DelayMs(250);
    }
    }


    ERROR:
    Build D:\mplab files\testing for device 16F84
    Using driver C:\Program Files (x86)\HI-TECH Software\PICC\9.71a\bin\picc.exe

    Executing: "C:\Program Files (x86)\HI-TECH Software\PICC\9.71a\bin\picc.exe" -otesting.cof -mtesting.map --summary=default --output=default --chip=16F84 -P --runtime=default --opt=default -D__DEBUG=1 -g --asmlist "--errformat=Error [%n] %f; %l.%c %s" "--msgformat=Advisory[%n] %s" "--warnformat=Warning [%n] %f; %l.%c %s"
    (1273) Omniscient Code Generation not available in Lite mode (warning)
    HI-TECH C Compiler for PIC10/12/16 MCUs (Lite Mode) V9.71a
    Copyright (C) 2010 Microchip Technology Inc.
    Error [939] ; . no file arguments

    ********** Build failed! **********
     
  17. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,792
    Likes:
    134
    Location:
    morristown,tn
    Try this out and make sure you add file you save this in to your project as a source file like main.c

    Code (text):

    #include <htc.h>
        __CONFIG (FOSC_HS & CP_OFF & WDTE_OFF & PWRTE_ON );
    void init(void)
    {
    // port directions: 1=input, 0=output
    TRISB = 0b00000000; //set's portb to output
    RB0 = 0;  //starts RB0 off
    }
    void main(void) //main code atfer here
    {
    init(); //runs startup code
    while (1){  //loop
    RB0 = 1;    // turns led on
    _delay(10000); //delay
    RB0 = 0;      // turns led off
    _delay(10000);  // delay
    }
    }

     
    I added the configure for you to

    Oh and one more thing don't ask like this agin

    Leave the soon as possible off or no one will want to help. I don't no about you but I have kids and they don't get a soon as possible. That can boil blood if you no what I mean.
     
    Last edited: Jan 25, 2012
  18. hassankhan

    hassankhan New Member

    Joined:
    Jan 24, 2012
    Messages:
    65
    Likes:
    1
    i m using IC_PROG 1.06A but when i load hex file ,it loads on "ADDRESS-EEPROM DATA" but not on "ADDRESS-PROGRAM CODE",what is it?when I do READ ALL option it takes too much time & infact it goes similar to hanging condition,please tell me about the compatibility of my hardware & software or any extra work required for the options section of the software.
     
    • Like Like x 1
  19. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,792
    Likes:
    134
    Location:
    morristown,tn
    Are you trying the code I posted ?

    The code I posted runs fine in Mplab sim And loads fine with a Pickit2
     
    Last edited: Jan 27, 2012
  20. hassankhan

    hassankhan New Member

    Joined:
    Jan 24, 2012
    Messages:
    65
    Likes:
    1
    I have corrected my mistake actually it was set for 32 bits in my compiler now I have made this for 8 bits.Now please tell me what should I check in my programmer software before start burning controller & please tell me m I using correct software it is IC-PROG 1.06A ?as u know I m programming a PIC16F84.
     
  21. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,792
    Likes:
    134
    Location:
    morristown,tn
    It will work I liked it
     

Share This Page