| View previous topic :: View next topic |
| Author |
Message |
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
 |
asmboy
Joined: 20 Nov 2007 Posts: 2128 Location: albany ny
|
|
Posted: Mon Nov 28, 2011 7:38 pm |
|
|
The schematic looks pretty clean and A-_ok
I see there is an RF transmitter out there on the other end of a socket.
and that it draws about 10 IPA watts. This tells me you have RF galore in the vicinity. Quite a few years ago I designed a PIC controller all in ASM, before i discovered CCS, for an FM broadband exciter. The design worked great until the PA section was brought up to 50watts, and then I got an education in PICS in the RF environment.
Except for a few details -
( like U4a - which is a passing strange bit of circuit ... what DOES a comparator/opamp do when BOTH + and - are TIED TOGETHER LIKE THAT ??? is that REALLY right ?? if you don't have ERRORS set in your RS-232 receiver in the 18F part - you can go very sour right there. looks liek a malformed level shifter except for the crazy +/_ tie up , instead of a hysteresis comparator . You have a very very strange bit of circuit there.
also makes me wonder what is going on with programming of pin c6 in the 4520 as well )
if it were my design -
I would flat out change stuff-
even if I had to hack a PCB to do it.
1- I would use ONLY fastIO and define all my port tris manually
2- I would add a simple but effective resistive isolator between the
SOURCE ( output pins) pic and the receiving pic using a 5.1k resistor in series and ideally - shunted by 100 pf at the INPUT pin of the receiver.
If these two changes don't lead directly to solving your problem -
then there MUST be a deeper code problem that is well hidden.
BTW: what is the data format going to the data radio socket??
and the effective baud -- RS-232 right ?
My interest is piqued here because I have a ready to ship project that uses 3 pics on the same PCB -
sharing functions and common precision timing control, AND-ed serial communications and managing a data logger - - an 18f4620, 16F887, and 16f886 ... LOL - I am doing inter process communication by toggling two lines between the 40 pin pics - and yes - there is a 5.1 k resistor between those pins. No problems with any of that.
 |
|
 |
jlucas
Joined: 08 May 2011 Posts: 41 Location: Carthage, MO
|
|
Posted: Mon Nov 28, 2011 8:13 pm |
|
|
asmboy, I'm not totally unwilling to cut a trace on the board; I would, however, like to avoid that if possible. It may come down to that, though.
| Quote: | | how do you know that the problem is not from those other leds being ON TOGETHER -and finally putting the PIC pin regulator into current limiting ? |
As a matter of fact, I don't know that! Come to think of it, when it failed, I had two of these LED on at the same time. This makes a lot of sense. I put some resistors on the LEDs, and as soon as I can figure out why a different section of the code stopped working, I'm going to go road test it.
BTW, I'm using RS232 at 57,600 baud to communicate between the 18F4520 and the Aerocomm AC4790 RF module in both the TX and the RX, and it works like a charm! _________________ Always remember, things are never so bad that they can't get worse. |
|
 |
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
 |
jlucas
Joined: 08 May 2011 Posts: 41 Location: Carthage, MO
|
|
Posted: Tue Nov 29, 2011 3:43 pm |
|
|
Well, this project has disintegrated into total chaos. I have two 1-bit variables that are spontaneously changing their values without any instructions to do so. I have if statements in two different parts of the program that essentially a say, if(x==0) do THIS; else do THAT. I initialize x to 0, and there is no instruction to change it, but the program is doing THAT.
I'm going to shelve this for a day and make another run at it tomorrow. _________________ Always remember, things are never so bad that they can't get worse. |
|
 |
asmboy
Joined: 20 Nov 2007 Posts: 2128 Location: albany ny
|
|
Posted: Tue Nov 29, 2011 3:53 pm |
|
|
time to really dig into your LST file !!!!
you have memory indexing trouble ... bet u a $$$
classic memory corruption due to code i fear.
what other vars are LOCATED in memory PRIOR to the byte that contains
your INT1 ' ??
you want to figure out from the LST file what memory location has the int1 one as one of its bits. a lower addressed var , usually an array is
being mis indexed
i had a devilish problem like that once where i was filling elements in an array of bytes - then boxcar averaging as more data was added to the array.
but a mishandled ( by me ) pointer overshot the highest element ( ccs does not bounds check for us ) and began altering higher addressed VARS that were not part of the array. Just as with your issue - it did not begin to screw thing sup at first - but the longer it ran - eventually an obvious fatal problem would arise. but after cold start -w as fine again.
a messed up pointer or a direct addressed array that has been indexed d beyond its declared bounds can do just what you are seeing |
|
 |
|