Try changing
toCode:@ __config _INTRC_OSC_NOCLKOUT & _WDT_OFF & _MCLRE_ON & _CP_OFF
Code:@ __config _INTRC_OSC_NOCLKOUT & _WDT_OFF & _MCLRE_OFF & _CP_OFF
Try changing
toCode:@ __config _INTRC_OSC_NOCLKOUT & _WDT_OFF & _MCLRE_ON & _CP_OFF
Code:@ __config _INTRC_OSC_NOCLKOUT & _WDT_OFF & _MCLRE_OFF & _CP_OFF
Dave
Always wear safety glasses while programming.
The only way I can get it to start is with this:
@ __config _INTOSCIO & _WDT_ON & _MCLRE_OFF & _CP_OFF
Now that it starts, there is still an issue with it. I get output pulses on servos 2-4, but not on servo1. The pulses that I do get do not vary with the input pulses, they are just 2ms on 3 & 4, and 1.6 ms on 2.
I'll check to see if there is anything wrong with my setup and wiring again.
Last edited by PickyBiker; - 24th March 2010 at 17:51.
The code does act funny if the input from the pulses exceeds the 1ms to 2ms range. Check your transmitter, and see if you have any channels above 100%. You might try changing them to 95% in both directions, just to make sure.
Walter
Edit:
Do you have the diodes on the three incomming receiver signals?
Last edited by ScaleRobotics; - 24th March 2010 at 18:07.
Yes, the diodes are there and I get good 5v pulses just like on your web page. Current status:
all channels 85% with 0 offset and 0 subtrim.
No changes detected in output pulses.
Could the missing servo 1 pulse be because I have the WDT on? (Remember, it won't start if I set WDT off).
Sorry to hear that.
Let me double check what I have when I get home tonight. I will let you know what I have, and double check my wiring to see if I differ from my schematic.
Thanks for the feedback.
Walter
Thanks Walter.
In my circuit, I needed a pull-down resistor for pin 5. Without it the trailing edge of each pulse was badly sloped. It could be just a difference between our receivers, mine is a Spektrum AR6000.
Best,
Mike
Mine were a little sloped as well. But when I tried to add a resistor, it dropped the voltage down too much for it to detect a pulse. I suppose they would all slope equally, so it should not change things too much. Or, a transistor could be added to boost the voltage.
I did notice that I had my MCLRE_ON on my circuit, but did not show it on the schematic. But you can sort of see it in the picture, with the red wire:
I used
I will test with an extra receiver or two tonight, but you might try changing the osc setting, and MCLRE to what I have above, tying MCL to high, and using no resistors for the receiver in on pin5.Code:@ __config _INTRC_OSC_NOCLKOUT & _WDT_OFF & _MCLRE_ON & _CP_OFF
Walter
Hello mgauthier711,
Just saw your post, did you try this with PWRTE on and WDT off? Sometimes these PICs are a little fussy about the power rise curve and the power up timer helps.
If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
.
Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
.
There simply is no "Happy Spam" If you do it you will disappear from this forum.
Pulling pin 4 to +5v and removing the pull-down resistor from the input allows it to start reliably now with
@ __config _INTRC_OSC_NOCLKOUT & _WDT_OFF & _MCLRE_ON & _CP_OFF
It still only puts out fixed length pulses. If I put the pull-down back in 47k, the output stops. If I add as little as 20pf to the input, the pulses stop. There is improvement however, I now get fixed length pulses on all 4 outputs.
[ATTACH][/ATTACH]
If the attachment made it, you can see my wirng and the pulses
I compiled the program I had on the website, and it ran correctly for me. A couple things I notice that are different. The diodes you are using look to be different than the small diodes I used, the 1n914. The scope seems to show this difference on the input signal, as the channels never quite get back to zero voltage, although they do get pretty close. I would try the 1n914's if you have them. If not, try just inputting a single channel with and without the diode, and see what it looks like on the scope. It will still output a single channel (as servo 3). If this is the issue, a single channel without the diode should work.
I have also included a hex file, just in case there is a difference there. I used Darrels latest DT_INTS version 1.00 for mine, but it seems like the old version would have worked as well.
1.00 can be found here: http://darreltaylor.com/DT_INTS-14/intro2.html
I tried it on a FMA FS8 Co-Pilot, and a Hi-Tech Electron 6 receiver.
Thanks for the information. I'll pick up some 1N914's and see if that's the problem.
Best,
Mike
Bookmarks