I tried turning off the watchdog timer and it didn't change. Thanks for the sggestion.
I tried turning off the watchdog timer and it didn't change. Thanks for the sggestion.
Ok, well different theory,
try using a pullup resistor and change mode from 84 to 32852, it is still 9600 True but with open collector instead of driven high.
Try adding
DEFINE CHAR_PACING 1000
in transmitter code.
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.
I added a 10k resistor between the +5 PIC source and the serial wire and changed the 84 to 32852 and it is getting more motion than before but not much more. the servos are all over the place for a biut but then they do what I want for a little. I have 3 serial wires going from the transmitter to 3 receiver chips that control the servos and they are all wired the same just going to different pins on the transmitter. Sometimes two out of three will do as described before but the third for some reason doesn't do anything. I verified on an oscope that the transmitter is sending data and for it to send that means the receiver is giving the signal to receive, it just isn't receiving because the servos are staying at their set default of 90 degrees which I programmed in to the receivers in case the transmitter stops.
To me it seems the receivers are sending the go ahead, the transmitter is sending, but the receivers aren't receiving.
Tell us about the power supplies and what you have done to suppress any noise from the power supply going to the PIC. You should have (MUST ?) a bypass capacitor right between the PICs power pins, you should have the servos on their own supply and I would recommend a nice fat 10 µF or larger Cap to pick up Low Freq spikes as well, Make sure the pics are not browning out when they run, all serial wires should be at the very least twisted, shielded is better but probably overkill, be aware fluorescent lights can cause misbehavior too. If all else fails try setting things up at a slower baud rate and if that works increase it until it fails, other things to check are, how sure are you about the actual oscillator speeds, are you using crystals, resonators or just R/C oscillators?
EDIT; Oh and Dave pointed this out a while back from the data sheet . . .
Note: When using resonators with frequencies
above 3.5 MHz, the use of HS mode rather
than XT mode, is recommended. HS mode
may be used at any VDD for which the
controller is rated.
EDIT2: Define osc 4 MUST BE ALL UPPERCASE LETTERS . . . DEFINE OSC 4
Last edited by Archangel; - 10th June 2011 at 04:50. Reason: add
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.
I'm using an old ciomputer power supply 5 volt 8 amp power supply for the servos running straight from the output 5 volt to the servos with no filter cap. I have a 5 volt 2 amp transformer used for like a phone charger running to the PICs with a .1uf cap between the +5 and GND. My serial lines are not twisted or shielded, I didn't think this was too critical being on the same board going such a short distance. I'm not picking up anything significant on the oscope either.
It probably isn't but in search for the ant queen, you kill a lot of ants.
Make sure to change the OSC as shown above, are you using crystals, or what ?.
Do you get bizarre behavior when you get your fingers near the breadboard in the vicinity of the pic?
Last edited by Archangel; - 10th June 2011 at 04:59.
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.
I think your problem may be in the position variable size.
Here are a couple examples.
http://www.picbasic.co.uk/forum/showthread.php?t=10692
http://www.picbasic.co.uk/forum/show...t=14149&page=1
And a nice tutorial
http://www.picbasic.co.uk/forum/showthread.php?t=544
Dave
Always wear safety glasses while programming.
Bookmarks