PDA

View Full Version : Need renard with on/off only to be used to power another PIC



jrock64
06-07-2012, 02:07 PM
This all goes back to my 3Watt star strobe project.
http://doityourselfchristmas.com/forums/showthread.php?20651-Re-purposing-some-3w-stars-as-pest-deterrent

The strobe itself contains it's own PIC12f629 that controls the strobe function.
My configuration is set to fire two 30ms bursts spaced 175ms apart every 1 second as long as the PIC has power.
This is tighter than anything Vixen can do and is why it has its own PIC.
The second reason is with its own PIC, it can not go into a constant on state, which would burn out the transistor and star in only a few seconds.

For the pest deterrent, The PIC16F688 switches the strobes on and off, by providing power to the PIC12f629 on the strobe which then runs its own strobe pattern.

My poor code on the PIC16f688,
turned on a port, did nothing to that port until all the timing loops had counted down to zero,
toggled the port, reset the loops, and counted down again.

What I need is a version of REN16(PIC16f722 preferred) code that will do the same

When the value from Vixen changes, the port can change, else if the port is on, it has to stay on the entire time.

Right now, when I attach LEDs to the pins, they will light, so I know I am getting output.
While my power supply measures 5.1v, the output pins measure only 4.96v
While the eye or the voltmeter may not see it,
my guess is the pin is being toggled at least 20 times per second, and the pic is constantly loosing power.

I am obviously using DC and not using dimming.
I have also not populated any of the diagnostic LEDs if that helps any.

Any help most appreciated.
Kind of in panic mode at this point.
There is a plan B, but it is not very good.

Joel

P. Short
06-07-2012, 03:45 PM
I'm not sure what you're asking for. Is the idea that when Vixen turns an output on, that the output stay on with 100.000% duty cycle, without any 'off' pulses, no matter how short the pulse may be? At one point that is how the PIC16F688 firmware behaved when the output was set to 100%, in support of driving zero-crossing opto-isolators. I realize that you are asking for Renard Simple functioning, and I'm not trying to get you to change. I'm just trying to clarify what you are requesting.

jrock64
06-07-2012, 05:02 PM
I am using the output of the Renard as a switch to power the PIC on the strobe.
The only power the PIC receives is coming from the renard output pin.
That is why I need 100.000% duty cycle, without any 'off' pulses, no matter how short the pulse may be.

If that is how the original renard(PIC16f688) code works, I can look into that as an alternative.
I just like the simple16(PIC16f722) because it does not need an oscillator.
and I already have the boards made up.

Joel

Mactayl
06-07-2012, 05:14 PM
I am using the output of the Renard as a switch to power the PIC on the strobe.
The only power the PIC receives is coming from the renard output pin.
That is why I need 100.000% duty cycle, without any 'off' pulses, no matter how short the pulse may be.

If that is how the original renard(PIC16f688) code works, I can look into that as an alternative.
I just like the simple16(PIC16f722) because it does not need an oscillator.
and I already have the boards made up.

Joel

I made small program last year for tstraub and it just turned on/off channels for one of the PIC18Fxxxx devices last year but it could also be used for the PIC16F7xx devices, maybe I can help?

jrock64
06-07-2012, 11:56 PM
I can confirm that the PIC16f688 code PWM, positive output works as expected.

If I don't have the simple16 working by Saturday, I guess I know what I am going to be doing this weekend.

Joel

P. Short
06-08-2012, 10:16 AM
Which version of the 16f722 firmware are you using? The one in the library file that was posted by budude on October 22, 2009? It might be a simple matter to modify it to behave the way that you requested.

jrock64
06-08-2012, 01:48 PM
YES

I have ren16_g2-20090731.asm & .inc

I can go to the newer version if that helps.

Joel

P. Short
06-08-2012, 02:38 PM
I've gone back and looked at that firmware. I don't have my head wrapped around it at the moment, so I'm not sure if it would be easy to do (and maintain proper timing) or not...