Need Some one to do a favour

Thread Starter

R!f@@

Joined Apr 2, 2009
9,746


Can any one please write me a HEX file that can be viewed by microC, cause I am learning mikroC
The X chip is a PIC is a 12F629. I need to use the internal Osc.
When powered the out put should stay like in the diagram till power off, no on off switches.
Any one please.
I'll pay thru paypal for any trouble.
I tried very hard to understand the PIC course that are online, but am not gettin any where, At best what I could so is to flash just one led and it is by using a huge PIC. :mad:
It never worked twice, donno what I am doing wrong.
The thing is I need it like today or ASAP.
All I have now is plenty of 12F629's
Pleeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeese :(

Rifaa
 

jpanhalt

Joined Jan 18, 2008
11,088


Can any one please write me a HEX file that can be viewed by microC, cause I am learning mikroC


What is the difference between a hex file than can be viewed with mikroC versus any other hex file?

Look at any tutorial for flashing an LED. Then add a counter for the number of flashes. In assembly, one way is to load a number into a register for the counter, then use decfsz to count down to zero whereupon you set the first output low and switch to the other output. Compile your assembly program to get your hex file.

Why the urgency?

John
 

Thread Starter

R!f@@

Joined Apr 2, 2009
9,746
Thanks jpanhalt!!
Urgency is this is a project almost at deadline.
And the other thing is telling me what to do is easy but going about it some what difficult to me.
The hex file is which I downloaded and I do not understand most of it.
Changing the values is way out of my league at the time being.
I thought I could understand the whole procedure but due to difficulties that I encountered during this month I could not get enuf time to do the studying, tht's why I'm searching for help.

Rifaa
 

Thread Starter

R!f@@

Joined Apr 2, 2009
9,746
L Chung
I did the programing part and It said the programing is OK.
But I think some thing is wrong. Only the pin 3 is active. others are low.
Let me post my pic's.
Again thanks for all ur trouble.

Rifaa
 

SgtWookie

Joined Jul 17, 2007
22,221
Rifaa,
Do you have pin 4 (MCLR) tied to Vdd using a 10k resistor? If not, the PIC may be continuously resetting.

Once you've tied pin 4 high, check for output on pins 6 and 7.

Also, it doesn't look like anyone's downloaded the HEX file yet. Did you mistakenly try to program the PIC using the ASM file?
 

Thread Starter

R!f@@

Joined Apr 2, 2009
9,746
SgtWookie
That's exactly what I was talking about, no tutorial ever mentioned about that, I thought since it is programmable, the software might taking care of it.
So the pin 4 if left open. Now tell me is it my fault. Told ya I was new to this stuff!
I'm changing my test circuit by tying the pin 4 to Vdd via 10K.
after that let me try.
Thanks a lot.

Rifaa
 

eblc1388

Joined Nov 28, 2008
1,542
I thought since it is programmable, the software might taking care of it.
So the pin 4 if left open.
You have got that part right. :)

What SgtWookie had told you is of course true, if and only if pin#4 is functioning as MCLR pin.

But, is it in this particular case? I bet SgtWookie did not know or else he would not have made the above remarks.

You do realize that PIC 12F629 can't take 12V supply, do you?
 

Thread Starter

R!f@@

Joined Apr 2, 2009
9,746
Guys !!! here's what I did. Tell me if I am wrong. The out put is not working. :confused:




Rifaa
 
Last edited:

SgtWookie

Joined Jul 17, 2007
22,221
What SgtWookie had told you is of course true, if and only if pin#4 is functioning as MCLR pin.

But, is it in this particular case? I bet SgtWookie did not know or else he would not have made the above remarks.
I was a bit hasty when glancing through the ASM code the first time, and of course missed this:
__CONFIG _MCLRE_OFF & _CP_OFF & _WDT_OFF & _INTRC_OSC_NOCLKOUT

... so the PIC wouldn't care much what you did with the MCLR/GP3 input.
 

Thread Starter

R!f@@

Joined Apr 2, 2009
9,746
hey! sgt I can load the asm file to mikroC, right.
Will it be the same way as the original compilation, or will it has any sort of changes, cause I want to study em.

Rifaa
 

eblc1388

Joined Nov 28, 2008
1,542
Rifaa,
Can you make the image larger? I can't read any of the text. Perhaps L. Chung can.
Yes. Some of them.

@Riffaa,

you need to remove the .TXT extension from the HEX filename before loading it into your programmer.

The .TXT is there because forum don't allow upload of such file.
 

Thread Starter

R!f@@

Joined Apr 2, 2009
9,746
Hmmmmm!! I did thought of that part but it never occurred since the program said binary file loaded OK... tricky these things are. No!!.
Do u need a clear pic of it, I think the file hosting site is reducing the resolution. How can I get I res ones, I tried png too but it's still too low.
By the way can you answer to my post 16.

Rifaa
 

eblc1388

Joined Nov 28, 2008
1,542
No. It is fine.

After you have loaded the HEX file into the window program, clicks on the bottom TAB where it said "Buffer" and checks that the loaded data is actually what is shown below:

 

Attachments

Thread Starter

R!f@@

Joined Apr 2, 2009
9,746
No. It is fine.

After you have loaded the HEX file into the window program, clicks on the bottom TAB where it said "Buffer" and checks that the loaded data is actually what is shown below:

Yippeeeeeeeeeeee!!! :p
This info did the trick. I luv you man.
My Willepro software was creating the problem, after programing, I did a read chip and the that data was way wrong. So I used IC prog and did the programing and after verifying the data, Put the pic in the test circuit and Viola . I get flickering in 5 and 6, pin 4 is open

I'm off to the work shop to built a proto type, will post back soon.
One more thing, please tell what value should I change to change the flicker frequency, Pls note that I am using mikroC.
Cuase I think 16Hz is a bit too fast for the customer.

Later
I'm using a 4.7V 1W zener to supply the PIC from 12V, the out put is coupled to two TrenchFET's, and the load is two 12V 10W filament bulbs. Power up and it works flawlessly.
Like I said 16Hz is too much.
This time I would like to edit the HEX, pls tell me what do I have to do to decrease the frequency.
Much thanks to every one who have helped, this is a great place to be.
I would like to buy you guys a drink cause this little thing means a lot to me, so tell me how I can do tht since I'm so far away.

Rifaa
 
Last edited:
Top