Can any one help me with this!!!!

Thread Starter

R!f@@

Joined Apr 2, 2009
9,918
Hi guys. please look at the pic below


I am in need of a little bit of help here. I would be very grateful any one can write me a hex file or something that could out put the wave form in the pic.
I donno anything about writing hex files or assembly language but I have a programmer and I could program if the proper instructions are given.
But before that I would like you if any good programmer out there could high light me what kind of PIC will be suitable for this job.
The circuit details are such that the Vcc is at 12V or can be 5V (if needed). the output is produced once the power is given, so there is no on switch.
There should be two outputs only that is capable of driving Trench FET's.
so I think any voltage high enough to gate a N CH mosfet will do in the on state of the outputs.
I though a one time PIC like 12F508 can do the job but I really donno how to program or debug it.
If not, what PIC will do the trick for me.
Please...any one ......a little help.
I'll do anything, I promise. please.
thank you
 

THE_RB

Joined Feb 11, 2008
5,438
You'll do anything? Like maybe explain what it is for so people can help you better and with less guessing. :)

I'll guess first... Is that one of those controllers that Fire and emergency services use to control traffic lights?
 

beenthere

Joined Apr 20, 2004
15,819
Why do you feel a microprocessor is necessary? The 16 Hz can be generated by a 555 timer, and the switching between lines can be done by an analog switch under control of a counter.
 

Thread Starter

R!f@@

Joined Apr 2, 2009
9,918
Hey guys, thanks for the trouble. When I say any thing I mean any thing. Ok, I'll Explain it's a project that I am doing.
No, not for the traffic light or anything, it's just a flasher.
And yes I could use a timer and a counter and I have prototyped it too, but I cannot simulate it, there is another thread about the simulation problem I am having.
The thing is timer and FF makes the circuit big, I want it to be as small as possible so I can put it into a match box or sumthin. surface mount is no problem too.
So for minimum component count a PIC is the best solution, that's why ask the guru's. how I can do this and if it is possible.
Please don't embarrass me or anything I just need a little help on the hex file and all.
It's just that I just haven't started studying programing and I need this for a urgent purpose and soon.
PS. And I can pay via paypal if any of you guys could write me the file or something. I just want this done real soon.
Thank you all
 
Last edited:

eblc1388

Joined Nov 28, 2008
1,542
I'll try to help you mainly because I have not used the PIC for quite a long time now and its a good chance for me to brush up my memory.

It uses a 12F508 at 5V supply and internal 1% accuracy RC oscillator. All you need is just one 12F508 chip and power and the required outputs appears on pin#7 and pin#6.

Can't be any simpler/cheaper than that by using other logic chips and 555 oscillator.

The asm file is well commented so you can adopt it for other requirement. I have not tried it out physically(I do not have a 12F508) but it works in the MPLAB simulator.

You don't need to pay me for anything except you have to report back to the forum if the solution works for you or not; for the sake of other forum members.

 

Attachments

Thread Starter

R!f@@

Joined Apr 2, 2009
9,918
I'll try to help you mainly because I have not used the PIC for quite a long time now and its a good chance for me to brush up my memory.

It uses a 12F508 at 5V supply and internal 1% accuracy RC oscillator. All you need is just one 12F508 chip and power and the required outputs appears on pin#7 and pin#6.

Can't be any simpler/cheaper than that by using other logic chips and 555 oscillator.

The asm file is well commented so you can adopt it for other requirement. I have not tried it out physically(I do not have a 12F508) but it works in the MPLAB simulator.

You don't need to pay me for anything except you have to report back to the forum if the solution works for you or not; for the sake of other forum members.


I love you man, and of course I'll help others, at you can see my posts too.
I am a repair tech at SMD level components and have very long and wide exp in the consumer electronics field.
I donno mathlab so I have to get my hands on a PIC and build it but for the time being will it work in a PIC16F872-1/SP, I have one of those right now.
Do I need to debug, something I heard from all around programmers.
and thank you very much for the HEX.
Looking forward for a reply.
Rifaa
 

eblc1388

Joined Nov 28, 2008
1,542
I donno mathlab so I have to get my hands on a PIC and build it but for the time being will it work in a PIC16F872-1/SP, I have one of those right now.
The PIC16F872 does not have an internal RC oscillator so you would need to use an external xtal and two 27~33pF capacitors to provide the clocking for PIC. Any frequency from 1MHz to 20MHz could work.

Do you have a xtal handy and what is its frequency?

Do I need to debug, something I heard from all around programmers.
Debugging will only work if the person has good knowledge of the code and registers operation. It will not help to make a wrong program or bad code works.

If you are eager to take the PIC step, I would recommend the PICKit2 from Microchip or its clone(available from eBay). It works via USB connection and requires no additional power source. Besides programming all your PICs, it has debugging capability too. This tool would serve you for years at least.
 

Thread Starter

R!f@@

Joined Apr 2, 2009
9,918
Yup, Xtal I have, 2 pin metal one's 10Mhz.

Above is the programmer I have. What do you think of it.
I got it off ebay :p
Right now I am purchasing some PIC's, a lot of em actually. Can't wait to learn this stuff.
Thanks buddy. I owe you one.
I'll post back, pls remember to check this post.
Rifaa
 

eblc1388

Joined Nov 28, 2008
1,542
Yup, Xtal I have, 2 pin metal one's 10Mhz.
Nice programmer you have got.

The ASM and HEX file for 16F872 is attached. You can use your programmer to program the HEX file into 16F872.

The 16Hz outputs is available from pin 21 and pin 22. Power +5V is to pin 20. The 0V connects to Pin 19 and pin 8.

The xtal connection is shown below. You would also need a 10K resistor from pin 1 to +5V.

 

Attachments

Thread Starter

R!f@@

Joined Apr 2, 2009
9,918
Hey ! The LED's are always lit, am I doing this right or did my programmer did not program.

Rifaa
 

Thread Starter

R!f@@

Joined Apr 2, 2009
9,918
Hey!!! my PC 12F629 IC's had arrived, can you please change the HEX file so it would work in these PIC's.
Sorry for all the trouble and thanks a lot.

__________________
Rifaa
 
Last edited:
Top