Need Some one to do a favour

SgtWookie

Joined Jul 17, 2007
22,230
You won't be able to change it by editing the HEX file.

Changes will have to be made to the .ASM file, and then it will need to be re-assembled, then the HEX file uploaded again.

You could help reduce the development time necessary by specifying exactly how fast you want the outputs to toggle.
 

Thread Starter

R!f@@

Joined Apr 2, 2009
9,918
But I can see the time calculation when I load the .ASM to mikroC.
Is it so hard to generate the HEX?

Rifaa
 

eblc1388

Joined Nov 28, 2008
1,542
You won't be able to change it by editing the HEX file.
Ok. Let's see if we can, for argument's sake. However, doing so is so bad practice and I'm not recommend it as a replacement of re-assemble. Sometimes it is the only way if the source code is not available. :D :p

@Rifaa,

Before you programmed the PIC using the HEX code as is, just change the value of a single word(the 5th counts from start address 0x0000) in the buffer of ICProg can achieve what you want.

In the image below(not from ICProg, but just showing you the change location), the last part of the highlighted word "3019" control the timing. It will be half the speed if you use "3038" or just a little slower if "3021" is used. The value must be in Hexidecimal.

Changing from "3019" to "30FF" gives the slowest rate.

 

Attachments

Thread Starter

R!f@@

Joined Apr 2, 2009
9,918
OK L Chung
But before I do that let me explain what I found out.

You see I have a prototype built just in case the PIC deal does not work, it consists of 2 X 4017 and 4 X NAND gates. It's working and the measured frequency from a digital scope gives me 15.7Hz. and the bulb flashing is just the rate I want as far as sight is concerned. The out put stage is same as in the PIC.
The PIC frequency is also 15.7Hz, but the funny thing is flashing rate is too fast when the bulb's are used.
I am using the same FET's for both modules.
Only difference is the 4017 module the FET's are with gate to source resistor. But I haven't yet included the gate to source resistors in the PIC module, just the PIC out to gate resistor is used.
But I don't think that it will effect the flash timing. Would it?

So let me check what you suggested by editing the HEX value.
Thanks a lot for everything.

Rifaa
 

Thread Starter

R!f@@

Joined Apr 2, 2009
9,918
Changing the HEX value worked. :p
I can vary the frequency to any value I want. You are really good at this.
This job is over.
I think I may have to contact you again, cause this is just the beginning of programing for me. :D
So what do I owe you, Now please do not reject my offer, cause like I said I will be asking a lot of questions from now on about programing.

PS. How much would a drink costs. :cool:

Rifaa
 
Top