+ Post New Thread
Results 1 to 18 of 18
  1. #1
    Full Member level 1
    Points: 2,210, Level: 10
    Achievements:
    7 years registered

    Join Date
    Feb 2010
    Posts
    101
    Helped
    1 / 1
    Points
    2,210
    Level
    10

    Using pic micro controller with g540 programmer

    hello,
    I am try to burn a file with G540 programmer and its showing some messages I attached as files.I am Using PIC18F452 micro controller. Hex file loading and burning successfully
    but circuit not working. I also attached the hex file.please help

    Ajitkumar

  2. #2
    Advanced Member level 3
    Points: 3,996, Level: 14

    Join Date
    Aug 2015
    Posts
    773
    Helped
    142 / 142
    Points
    3,996
    Level
    14

    Re: Using pic micro controller with g540 programmer

    If you have enabled the MCLR pin then you have to pull up MCLR pin to 5V using a 10k resistor. If you have enabled WDT then disable it. If you are trying to blink an LED the if you have used PORTx for LED then replace it with LATx.



  3. #3
    Advanced Member level 1
    Points: 1,116, Level: 7
    Achievements:
    7 years registered
    hexreader's Avatar
    Join Date
    Apr 2011
    Location
    England
    Posts
    493
    Helped
    193 / 193
    Points
    1,116
    Level
    7

    Re: Using pic micro controller with g540 programmer

    Your programmer is telling you that there are no configuration settings contained within the hex file.

    I have no idea what configuration settings would suit your hardware, but try the attached file, which requires crystal oscillator to function:

    (rename junk3.txt to junk3.hex)

    junk3.txt



    •   AltAdvertisement

        
       

  4. #4
    Full Member level 1
    Points: 2,210, Level: 10
    Achievements:
    7 years registered

    Join Date
    Feb 2010
    Posts
    101
    Helped
    1 / 1
    Points
    2,210
    Level
    10

    Re: Using pic micro controller with g540 programmer

    Dear
    Thanks for valuable reply.
    I don't have more experience but I have completed the hardware.
    (AN893).according to this attachment please tell me the MCLR is enabled.
    Attached here with asm file also.I am confusing about the program burning method is
    correct or not.

    regards
    Ajit



  5. #5
    Advanced Member level 3
    Points: 3,996, Level: 14

    Join Date
    Aug 2015
    Posts
    773
    Helped
    142 / 142
    Points
    3,996
    Level
    14

    Re: Using pic micro controller with g540 programmer

    The circuit has the pullup resistor for MCLR pin. The code is lacking CONFIG bits settings. Are you using MPLAB IDE ?



  6. #6
    Full Member level 1
    Points: 2,210, Level: 10
    Achievements:
    7 years registered

    Join Date
    Feb 2010
    Posts
    101
    Helped
    1 / 1
    Points
    2,210
    Level
    10

    Re: Using pic micro controller with g540 programmer

    Quote Originally Posted by pic.programmer View Post
    The circuit has the pullup resistor for MCLR pin. The code is lacking CONFIG bits settings. Are you using MPLAB IDE ?
    No
    I am directly going through G540 with hex file.



  7. #7
    Advanced Member level 1
    Points: 1,116, Level: 7
    Achievements:
    7 years registered
    hexreader's Avatar
    Join Date
    Apr 2011
    Location
    England
    Posts
    493
    Helped
    193 / 193
    Points
    1,116
    Level
    7

    Re: Using pic micro controller with g540 programmer

    I am guessing that maybe the config settings are shown in file <3im_vf.inc>

    Your hex file needs to include these config settings



    •   AltAdvertisement

        
       

  8. #8
    Full Member level 1
    Points: 2,210, Level: 10
    Achievements:
    7 years registered

    Join Date
    Feb 2010
    Posts
    101
    Helped
    1 / 1
    Points
    2,210
    Level
    10

    Re: Using pic micro controller with g540 programmer

    Hello Sir
    Do any changes in this field?



    •   AltAdvertisement

        
       

  9. #9
    Advanced Member level 3
    Points: 3,996, Level: 14

    Join Date
    Aug 2015
    Posts
    773
    Helped
    142 / 142
    Points
    3,996
    Level
    14

    Re: Using pic micro controller with g540 programmer

    Turn WDT and LVP. WDTEN = 0 and LVP = 0.



  10. #10
    Full Member level 1
    Points: 2,210, Level: 10
    Achievements:
    7 years registered

    Join Date
    Feb 2010
    Posts
    101
    Helped
    1 / 1
    Points
    2,210
    Level
    10

    Re: Using pic micro controller with g540 programmer

    Quote Originally Posted by pic.programmer View Post
    Turn WDT and LVP. WDTEN = 0 and LVP = 0.
    Problem not solved.The code working properly in Proteus simulation(ISS)



  11. #11
    Advanced Member level 2
    Points: 3,881, Level: 14
    Achievements:
    7 years registered

    Join Date
    May 2012
    Posts
    513
    Helped
    120 / 120
    Points
    3,881
    Level
    14

    Re: Using pic micro controller with g540 programmer

    The problem is due to the fact that the G540 does not set the configuration settings from the HEX file. Instead you have to set the configuration settings yourself by using the "encrypt" button.



  12. #12
    Full Member level 1
    Points: 2,210, Level: 10
    Achievements:
    7 years registered

    Join Date
    Feb 2010
    Posts
    101
    Helped
    1 / 1
    Points
    2,210
    Level
    10

    Re: Using pic micro controller with g540 programmer

    Tested with this code .problem still

    - - - Updated - - -

    I don't know which configuration I should set!
    If i buy a PIC programmer can this problem solve?



  13. #13
    Full Member level 5
    Points: 2,650, Level: 11
    Achievements:
    Created Album pictures 7 years registered
    malik_zohaib's Avatar
    Join Date
    Sep 2010
    Location
    Pakistan
    Posts
    261
    Helped
    36 / 36
    Points
    2,650
    Level
    11

    Re: Using pic micro controller with g540 programmer

    To be honest I tried, a long time ago, G540 programmer; but Chinese product.....never works.
    It was better for you to buy PICKIT2 or 3 rather than G540 programmer.
    P.S: on what frequency your PIC is running? change the oscillator frequency bits


    1 members found this post helpful.

  14. #14
    Full Member level 1
    Points: 2,210, Level: 10
    Achievements:
    7 years registered

    Join Date
    Feb 2010
    Posts
    101
    Helped
    1 / 1
    Points
    2,210
    Level
    10

    Re: Using pic micro controller with g540 programmer

    Quote Originally Posted by malik_zohaib View Post
    To be honest I tried, a long time ago, G540 programmer; but Chinese product.....never works.
    It was better for you to buy PICKIT2 or 3 rather than G540 programmer.
    P.S: on what frequency your PIC is running? change the oscillator frequency bits
    The crystal frequency is 20Mhz



    •   AltAdvertisement

        
       

  15. #15
    Full Member level 5
    Points: 2,650, Level: 11
    Achievements:
    Created Album pictures 7 years registered
    malik_zohaib's Avatar
    Join Date
    Sep 2010
    Location
    Pakistan
    Posts
    261
    Helped
    36 / 36
    Points
    2,650
    Level
    11

    Re: Using pic micro controller with g540 programmer

    then set FOSC0=0, FOSC1=1, FOSC2=0


    1 members found this post helpful.

  16. #16
    Advanced Member level 3
    Points: 3,996, Level: 14

    Join Date
    Aug 2015
    Posts
    773
    Helped
    142 / 142
    Points
    3,996
    Level
    14

    Re: Using pic micro controller with g540 programmer

    In CONFIG settings I think KBUG = DEBUG. Turn it OFF.


    1 members found this post helpful.

  17. #17
    Full Member level 5
    Points: 2,650, Level: 11
    Achievements:
    Created Album pictures 7 years registered
    malik_zohaib's Avatar
    Join Date
    Sep 2010
    Location
    Pakistan
    Posts
    261
    Helped
    36 / 36
    Points
    2,650
    Level
    11

    Re: Using pic micro controller with g540 programmer

    Quote Originally Posted by pic.programmer View Post
    In CONFIG settings I think KBUG = DEBUG. Turn it OFF.
    1 is for off, its already off.



  18. #18
    Full Member level 1
    Points: 2,210, Level: 10
    Achievements:
    7 years registered

    Join Date
    Feb 2010
    Posts
    101
    Helped
    1 / 1
    Points
    2,210
    Level
    10

    Re: Using pic micro controller with g540 programmer

    hello
    thanks for All
    I was used 20Mhz Oscillator instead of Crystal.
    studied about the difference of Oscillator and crystal problem solved.
    I need one help for, I need to star the circuit with a hall sensor +5 volt (according to diagram switch S1)
    most halls sensor (like 43E) is giving negative output. for switching , any comparative circuit suit for switching please can you provide a circuit diagram

    Thanks once again****



--[[ ]]--