| View previous topic :: View next topic |
| Author |
Message |
iso9001
Joined: 02 Dec 2003 Posts: 262
|
|
Posted: Tue Jun 20, 2006 12:50 am |
|
|
Ok,
I confirmed that: Its a good fet, good regulator, both are properly hooked up, correct parts are being used, and at least I know the regulator is only drawing .5mA
For fun I pulled the source pin on my fet. I find out that there is still voltage (4V) on the drain pin. Ok. I checked the clock for the 2515, I find that its ON. The whole board is being powered albeit by a little less voltage then the regulator is putting out.
I've lowered every pin on the pic except for the SPI pins. But it doesn't make sense that I have a pin going from the pic to an unpowered IC and its feeding back into VDD of that chip. It has to be a problem with the board...
I'm sure its not a CCS fuse, but is there a way to shut the SPI peripheral down just so I can check? Or any other likely culprits ?
I'll get the scope and dmm to it in the AM |
|
 |
Christophe
Joined: 10 May 2005 Posts: 323 Location: Belgium
|
|
Posted: Tue Jun 20, 2006 12:51 am |
|
|
| When ur gate is floating, it can be triggered by blowing on it. Add a resistor as asmallri said. |
|
 |
asmallri
Joined: 12 Aug 2004 Posts: 1680 Location: Perth, Australia
|
|
Posted: Tue Jun 20, 2006 12:57 am |
|
|
| iso9001 wrote: | | I've lowered every pin on the pic except for the SPI pins. But it doesn't make sense that I have a pin going from the pic to an unpowered IC and its feeding back into VDD of that chip. It has to be a problem with the board... |
Yes it does. It means current is flowing throught the input protection diode to the VDD line. There is also a good chance you are destroying the chip. Pretty hard to help much without seeing the schematic. _________________ Regards, Andrew
http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!! |
|
 |
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Tue Jun 20, 2006 1:04 am |
|
|
| Quote: | | I've lowered every pin on the pic except for the SPI pins |
Why not just disable the SPI port and set those pins to a low level ? |
|
 |
iso9001
Joined: 02 Dec 2003 Posts: 262
|
|
Posted: Tue Jun 20, 2006 2:05 am |
|
|
| Quote: | | When ur gate is floating, it can be triggered by blowing on it. Add a resistor as asmallri said. |
Its not floating I have a sleeping pic holding 5V to it. I've already learned first hand how sensitive Fets are. That reminds me, I asked about this pull down once before and someone here told me didn't need it cause it was a P-Ch.... I thought that was wrong!
I just realized that aside from not disabling SPI, I am driving all pins low except for the CS pins they go high. Would they they have designed SPI parts to direct all voltage on CS pins to VDD when VDD=0 ?... I mean, other people use fets to load switch. It seems like that would be a rather large issue.
I will disable SPI and try it again. Was just wondering if its common practice to setup_SPI() once at boot then after waking from sleep just go on about working again, or disable spi before sleep. |
|
 |
Christophe
Joined: 10 May 2005 Posts: 323 Location: Belgium
|
|
Posted: Tue Jun 20, 2006 6:54 am |
|
|
do you use the SCI?
Try disabling it by
| Code: | | setup_uart ( FALSE ) ; |
|
|
 |
newguy
Joined: 24 Jun 2004 Posts: 1946
|
|
Posted: Tue Jun 20, 2006 10:06 am |
|
|
| iso9001 wrote: | | I've lowered every pin on the pic except for the SPI pins. But it doesn't make sense that I have a pin going from the pic to an unpowered IC and its feeding back into VDD of that chip. It has to be a problem with the board... |
I do all my s/w prototyping using a couple of development boards. They have built-in standard character LCD modules. The LCDs are powered via a jumper to Vdd. The connections between the PIC and the LCD's data and control lines can't be broken.
If I remove the jumper, the LCD will still be weakly powered (i.e. you can still see things on it) as long as at least one of the data or control lines is driven high by the PIC. This has never damaged the LCD, by the way. |
|
 |
iso9001
Joined: 02 Dec 2003 Posts: 262
|
|
Posted: Tue Jun 20, 2006 12:43 pm |
|
|
Newguy in for the win!
It was the SPI Data Out and Clock pins. Whats wierd is that I've never heard of this. And judging by everyone's responses here SPI wasn't the first suspect.
Now..... Is there anyway to disable the SPI in CCS ? Or at least stop the DO and CK pins from going high / Force them low....
I appreciate the help everyone! I've learned a lot about power managment.
For the time being I put the device into SPI_SS_DISABLED (have no idea what this does yet, need to check datsheet) and tris'd the C3/C4/C5 pins low.
I need to look into that and the fact my clock is taking 9mA. I can't disable b/c I need to wake-on-can which all the datasheet say I can do w/o a clock but no... doesn't seem to work.
W/O the clock I'm pulling 700uA for the board. If I can figure out the two problems I'm still having I'll be super stoked! |
|
 |
ckielstra
Joined: 18 Mar 2004 Posts: 3680 Location: The Netherlands
|
|
Posted: Tue Jun 20, 2006 3:08 pm |
|
|
| Quote: | | Now..... Is there anyway to disable the SPI in CCS ? | Not explicitely mentioned in the manual, but using the project wizard you learnNote from the datasheet | Quote: | | When enabled, these pins must be properly configured as input or output. |
| Quote: | | Or at least stop the DO and CK pins from going high / Force them low.... | The clock line can be set using the Clock Polarity Select bit (CKP) | Code: | setup_spi(SPI_MASTER | SPI_L_TO_H) // Idle state for clock is a low level
setup_spi(SPI_MASTER | SPI_H_TO_L) // Idle state for clock is a high level |
| Quote: | | For the time being I put the device into SPI_SS_DISABLED (have no idea what this does yet, need to check datsheet) | Never set values that you don't understand.... This particular setting is only to be used in SPI-slaves and enables the Slave Select Pin (SS). Using this defined value in a master is a common mistake and makes a mess of the SPI setup (you get an invalid OR-ed value, SPI doesn't work as expected and sadly the compiler gives no error message). |
|
 |
iso9001
Joined: 02 Dec 2003 Posts: 262
|
|
Posted: Tue Jun 20, 2006 3:37 pm |
|
|
I knew that SS wasn't right but I was setting it into slave mode so it 'kinda' worked.
I'll try that setup_spi(FALSE); Then pull the pins low. Thanks Ckielstra
By the way, does ~9mA sound about right for a 10Mhz ceramic osc w/ built in caps? |
|
 |
asmallri
Joined: 12 Aug 2004 Posts: 1680 Location: Perth, Australia
|
|
 |
|