Remote control by location (PIC in Oshonsoft)

ericgibbs

Joined Jan 29, 2010
21,452
hi,
You have to determine which peripherals are also using PORTC.
If you just do a TRISC, you may lock out a peripheral thats been defined in PORTC.
So which peripherals are using PORTC.??
E

PORTC.PNG
 

ericgibbs

Joined Jan 29, 2010
21,452
hi,
If you are able to do a Bit Write to the Unused pins on PORTC.?

If this PORTC Bits are committed, in what way are you trying to use PORTC that is causing a problem.?

E
 

Thread Starter

camerart

Joined Feb 25, 2013
3,835
hi,
If you are able to do a Bit Write to the Unused pins on PORTC.?

If this PORTC Bits are committed, in what way are you trying to use PORTC that is causing a problem.?

E
Hi E,
Is this a question? [ If you are able to do a Bit Write to the Unused pins on PORTC.? ] I don't understand.

If you look at the images in #545 it shows that, TOP the ouput from the AK8963C when the PIC MISO is disconnected, then the output voltage is 3.3V, once the PIC MISO is connected, it attenuates the voltage down to 1.65V. BOTTOM of image.
C.
 

ericgibbs

Joined Jan 29, 2010
21,452
hi,
I assume the 18F is acting as the Master in the SPI interconnect to AK8... ?
As MISO is an Input to the 18F ie: Master In Slave Out, how can the 18F be pulling the MISO pin down to 1.8V

The AK must be setting the MISO pin to 1.8V.

Test:
disconnect the MISO input to the 18F,,,, add a 1k pull down from the AK out pin to 0V, what voltage do you measure on the AK output pin.??

BTW: when I said Bit writes , I thought you were trying to use those used PORTC pins
 

Thread Starter

camerart

Joined Feb 25, 2013
3,835
hi,
I assume the 18F is acting as the Master in the SPI interconnect to AK8... ?
As MISO is an Input to the 18F ie: Master In Slave Out, how can the 18F be pulling the MISO pin down to 1.8V

The AK must be setting the MISO pin to 1.8V.

Test: disconnect the MISO input to the 18F,,,, add a 1k pull down from the AK out pin to 0V, what voltage do you measure on the AK output pin.??

BTW: when I said Bit writes , I thought you were trying to use those used PORTC pins
18LF is acting as SPIMASTER, to AK8963C.

I added a buffer into the AK8963C output, as the AK8 kept 'popping'. This inputs 3.3V and outputs 3.3V.

[ Test: disconnect the MISO input to the 18F,,,, add a 1k pull down from the AK out pin to 0V, what voltage do you measure on the AK output pin.?? ] Result 3.3V with 1K resistor to GND.
C.
 

ericgibbs

Joined Jan 29, 2010
21,452
hi,

That test shows that the AK can pull up 3v at 3mA, keep that connected for now. ie: MISO open circuit
Now connect a 1k from the 18F MISO pin to +3.3V.

What voltage do you measure on the MISO pin.??

E
 

Thread Starter

camerart

Joined Feb 25, 2013
3,835
hi,

That test shows that the AK can pull up 3v at 3mA, keep that connected for now. ie: MISO open circuit
Now connect a 1k from the 18F MISO pin to +3.3V.

What voltage do you measure on the MISO pin.??

E
Hi E,
Disconnected MISO into PIC, shows 0V at rest, and 100mV with 1K pullup to 3.3V.
C
 

ericgibbs

Joined Jan 29, 2010
21,452
hi,
I would say that there are three possible causes.
1. the pin has been set as an Output and Low State in the program.
2. if set as an Input, the pin is 'blown' internally.
3. There is PCB track problem

E
 

Thread Starter

camerart

Joined Feb 25, 2013
3,835
hi,
I would say that there are three possible causes.
1. the pin has been set as an Output and Low State in the program.
2. if set as an Input, the pin is 'blown' internally.
3. There is PCB track problem

E
Hi E,
1/ The pin is set to input.
3/ I've checked the PCB tracks, ok.
2/ The PIC must have blown, internally.

I have been concentrating on this PIN for so long, that I had forgotten, that I have a second PCB (SLAVE) I tried that and as you suggest all's well and the MISO is 3.3V connected to the PIC.
I'll change the PIC.
Thanks, C.
 

Thread Starter

camerart

Joined Feb 25, 2013
3,835
hi,
I would say that there are three possible causes.
1. the pin has been set as an Output and Low State in the program.
2. if set as an Input, the pin is 'blown' internally.
3. There is PCB track problem

E
Hi E,
1/ The pin is set to input.
3/ I've checked the PCB tracks, ok.
2/ The PIC must have blown, internally.

I have been concentrating on this PIN for so long, that I had forgotten, that I have a second PCB (SLAVE) I tried that and as you suggest all's well and the MISO is 3.3V connected to the PIC.
I'll change the PIC.

EDIT: Is there a way of protecting the PIN from this type of damage?
Thanks, C.
 
Last edited:

Thread Starter

camerart

Joined Feb 25, 2013
3,835
Hi,
CORRECTION
On the working PCB the disconnected PIC MISO resistance to GND is app 15MOhm, on the none working PCB the resistance is app 12Mohm. The resistance between the MISO and the PIN is '0'

I checked the MISO PIN on the removed PIC against new ones, and it reads the same.
C
 
Last edited:

Thread Starter

camerart

Joined Feb 25, 2013
3,835
Hi,
The peripheral wires are longer on the none working PCB, is there a possibility that they are causing inductance or capacitance, that's effecting the MISO?
C
 

ericgibbs

Joined Jan 29, 2010
21,452
hi C,
What are the lengths of the interlinks.?

The 12Meg and 15Meg are what I would expect.

I don't follow.?
resistance between the MISO and the PIN is '0'

A simple sketch is often more helpful. :)
E
 

Thread Starter

camerart

Joined Feb 25, 2013
3,835
hi C,
What are the lengths of the interlinks.?

The 12Meg and 15Meg are what I would expect.

I don't follow.?
resistance between the MISO and the PIN is '0'

A simple sketch is often more helpful. :)
E
Hi E,
(I don't follow.?
resistance between the MISO and the PIN is '0' ) From end to end the MISO wire is ok.

The interlink wire lengths are temporarily app 20CM.

Here is an image of the PCB: I was previously trying to use the second PIC 18F4431 as SLAVE, so the 18LF4620 MISO connects to the 18F4431 SDO (MOSI) Could this cause a porblem. I now use HSEROUT, so I could remove/cut the tracks.
C.
 

Attachments

Top