PDA

View Full Version : pwm code?



mel4853
11-12-2007, 10:55 PM
what do i have to change in the renard 20070907 code to run it as pwm?

xmus
11-12-2007, 11:09 PM
I'm don't have the release date codes memorized, but I can provide this information, which might apply to you: Should you desire to dim LED's, you would need to enable the PWM flag near the top of the code as follows: #define PWM_build 1

mel4853
11-12-2007, 11:15 PM
i did that but all that happens is each led set comes on for 5 seconds in order through channel 4? this is with no channels selected to be on.

xmus
11-12-2007, 11:31 PM
i did that but all that happens is each led set comes on for 5 seconds in order through channel 4? this is with no channels selected to be on.

Are you using Diag code?
Are you familiar with the difference between diag and production code?
http://www.doityourselfchristmas.com/wiki/index.php?title=Renard_Firmware

Also, I see Phil as the PWM code listed already, so you shouldn't need to modify anything to get PWM working, just download the PWM code from the link above.

mel4853
11-12-2007, 11:44 PM
Not using the diag code. i have 128 channels with 120 running fine with the non pwm code, this is my first attempt with the pwm code. thanx for the link i'll give that a try tomorrow.

xmus
11-12-2007, 11:49 PM
Not using the diag code. i have 128 channels with 120 running fine with the non pwm code, this is my first attempt with the pwm code. thanx for the link i'll give that a try tomorrow.

I see, so you just have one batch of 8, a single pic, where you want to load PWM code.... should work....
I've only used the PWM code briefly, several releases ago... I can't comment any further. Hopefully Phil will jump in to give you further assistance as needed.

Thanks,
Dave

mel4853
11-13-2007, 06:23 AM
stil don't work with that code.just does the same thing, on 5 seconds trough 4 channels.

P. Short
11-13-2007, 12:20 PM
Mel,

What does your hardware setup look like? Same as with the non-PWM code?

--

Phil

mel4853
11-13-2007, 05:57 PM
i'm using the dc ssr that jon & scott designed. other than that nothing different from the rest of the non-pwm hardware. this board works, i was using it with non-pwm last year and didn't change anything on it. i have also tried 3 different pics and all do same thing.

P. Short
11-13-2007, 07:15 PM
First, do you want a DC build (i.e. no zero-crossing connection)? If so, you need to change the DC_build definition to '1'. Second, what polarity is that DC board? The default is a current sink build (i.e. drive the output low to turn the SSR on, drive it high to turn it off).

--

Phil

mel4853
11-13-2007, 07:54 PM
iwant to try just pwm first. my ssr are current sink per the schematic.

P. Short
11-13-2007, 09:27 PM
If everything that you have been doing is with non-pwm so far, and it is working, the first step is simply to change the PWM_build define in the source to read

#DEFINE PWM_build 1

assemble it, program a PIC, and replace one of the non-PWM PICs with this new one (using the same AC SSRs). It should work just the same as the non-PWM (unless you are real short of DC power on the controller).

The second step is to use the DC SSRs, but that can be discussed later.

--

Phil

mel4853
11-13-2007, 10:02 PM
I changed the define pwm 1 and it works just fine with ac ssr. I am using the dssr's with the led's but still not working.

mel4853
11-13-2007, 10:57 PM
yahoo!!!!!!!!! it works, sorry to take up your time it ended up being my mistake. these 3 hours of sleep a night are starting to get to me i think. thanks again phil & xmus for the response.