Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] Problem with Genius Programmer G540.... [Ccs C Compiler]

Status
Not open for further replies.

armghan11

Member level 1
Member level 1
Joined
Oct 9, 2012
Messages
41
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Visit site
Activity points
1,557
i am using genius programmer ... my mikro c code working fine when i burned it with g540 but ccs c compiled code not working... is this the compatibility problem ?
 

The main problem with the G540 is that it can't load the configuration bits from a file or program the EEPROM. Other than this it will program most PIC devices without any problem. Have you chosen the right type of file format for the output of the ccs c compiled code? Have you set the configuration bits manually using the encrypt button, particularly the watchdog timer which should be off?
 

The main problem with the G540 is that it can't load the configuration bits from a file or program the EEPROM. Other than this it will program most PIC devices without any problem. Have you chosen the right type of file format for the output of the ccs c compiled code? Have you set the configuration bits manually using the encrypt button, particularly the watchdog timer which should be off?

i have a problem with setting configuration bit.... i dont know what to set what to not... any tutorial that can help ?
 

i have a problem with setting configuration bit.... i don't know what to set what to not... any tutorial that can help ?
You should read the Microchip documentation for your PIC (I assume that you are using the PIC), but basically make sure the watchdog timer is off and the oscillator options are correctly set..

It is very easy to set the configuration bits with the G540, simply click the encrypt button at the top and the options that are ticked are set for a logic "one"
 

You should read the Microchip documentation for your PIC (I assume that you are using the PIC), but basically make sure the watchdog timer is off and the oscillator options are correctly set..

It is very easy to set the configuration bits with the G540, simply click the encrypt button at the top and the options that are ticked are set for a logic "one"

1) i am using 4mhz oscillator... should i select HS or XT? for HS fosc1= 1 and fosc0= 0 and for xt its reversed.
2) debugger mode? what is that ? to disable it i have to tick it
3) WDTE presents watch dog timer and should i untick it ?

- - - Updated - - -

here is the config set menu... please tell me which option should i tick ? im using pic16f877a

cats.jpg
 

To be safe I recommend the following settings.

V=1

CP1 V
CP0 V
DEBUG V
WRT V
CPD V
LVP 0
BODEN 0
PWRITE 0
WDTE 0
FOSC1 V 0
FOSC0 0 V

A 4 Mhz crystal will work in both HS or XT mode but you save power if run in XT mode. A 4 MHz ceramic resonator must be run in HS mode.
 

i am using genius programmer ... my mikro c code working fine when i burned it with g540 but ccs c compiled code not working... is this the compatibility problem ?

I have experience the same problem with Genius Programmer. What I figure out is that the software of genius programmer is unable to read properly the HEX file generated by CCS compiler. This a bug in genius software, not in the CCS compiler. The HEX file generated by CCS complier is the hex file of code + hex info for configuration. The hex information of blank is not generated. (Which off course is not required but the software of Genius programmer sees this an error).

Now let me show you how I tackled with that. It simple. Its a two step solution.

1. I converted the hex file generated by CCS compiler to BIN file with HEX2BIN utility then
2. I reconverted the BIN file to HEX file using BIN2HEX utility

the new generated HEX file is now compatible with the software of Genius software which can load the configuration bits automaticaly.
You can download these two small utilities from
HEX2BIN
https://www.keil.com/download/docs/7.asp
BIN2HEX
https://www.keil.com/download/docs/113.asp

you can make a batch file to automate these two steps.
 

I cant thank you both enough really... so great of you both... i will try what you both recommended and will post the result soon
 

I have experience the same problem with Genius Programmer. What I figure out is that the software of genius programmer is unable to read properly the HEX file generated by CCS compiler. This a bug in genius software, not in the CCS compiler. The HEX file generated by CCS complier is the hex file of code + hex info for configuration. The hex information of blank is not generated. (Which off course is not required but the software of Genius programmer sees this an error).

I have not seen this problem, If this does fix the problem armghan11 please let me know. There is no need to convert back to a HEX file as the G540 can import BIN files.

If I understand what iukhan is saying the blank area between the program area and the configuration area is not filled in by the G540 import utility unless it is explicitly defined in the HEX file. This should not cause a problem as the G540 does not use the configuration area anyway. It may be possible that space in the program file is similarly defined which would cause a problem. Anyway let me know.
 

I have experience the same problem with Genius Programmer. What I figure out is that the software of genius programmer is unable to read properly the HEX file generated by CCS compiler. This a bug in genius software, not in the CCS compiler. The HEX file generated by CCS complier is the hex file of code + hex info for configuration. The hex information of blank is not generated. (Which off course is not required but the software of Genius programmer sees this an error).

Now let me show you how I tackled with that. It simple. Its a two step solution.

1. I converted the hex file generated by CCS compiler to BIN file with HEX2BIN utility then
2. I reconverted the BIN file to HEX file using BIN2HEX utility

the new generated HEX file is now compatible with the software of Genius software which can load the configuration bits automaticaly.
You can download these two small utilities from
HEX2BIN
https://www.keil.com/download/docs/7.asp
BIN2HEX
https://www.keil.com/download/docs/113.asp

you can make a batch file to automate these two steps.

I tried running these program on windows 8 64bit and winodw 7 32bit but they are not working... is there any other program compatible with window 7 ? :(
 

yes i did but it sats hex2bin is not recognized internal or externel command
 

woohooo it worked... thanks to iuKhan and jayanth... :)
I just converted my hex file into bin and then loaded it to my genius programmer and it worked like a charm ... thank you so very much bro :)
 

Hi all. I have the same problem. I tried the method explained above but when i load the converted binary file (whose size seems to be zero bytes) the data loaded is 00H in the entire buffer. So can anyone help me out!! I am using the CCS compiler and G540 software version 5.20.
Also can we make the ccs compiler output a binary file as output?
 

This is the hex file compiled by CCS
 

Attachments

  • blinky.zip
    552 bytes · Views: 116

This is the hex file compiled by CCS

I have compiled your code and converted the code to hex, the way I mentioned my previous post. Check the attached converted hex file if you are able to load with configuration bits. and then let me know.
 

Attachments

  • shariq92.rar
    20.8 KB · Views: 128

Thanks for your help. I loaded the file and got a message saying the configuration bits were loaded. But if i click CONFIG SET to view the configuration its all been set 1 i.e all the config bytes have FFH in them. Does this mean that this is the configuration that will be loaded when i program the chip or have the code configuration bits will be loaded but i am unable to view them?
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top