2camjohn
Member
I recently changed the micro I use in one of my projects to the PIC18F1320.
But I have a problem with some of the inputs.
I have a phototransistor connected between RA0 and GND, with a 27k resistor pullup resistor connected to RA6 (defined as output and set high).
The output from the phototransistor (without the chip connected) goes between 0.1V (high light) and 3.5V (low light). But when the PIC is connected this pin is high (according to the software and on my multimeter) regardless of the light conditions.
I have disabled the ADC and set all the ADC chanels as digital IO. This is port A so it doesnt have any WPUs.
This setup works great on other Pics such as the 16f819.
This problem occurs when the phototransistor is connected to RA0 or RA1. The pin reads high (low light) all the time.
Shorting the phototransistor works great, that pulls the pin low and it is recognised by the software. But the Phototransistor is unable to pull the pin low by itself (I even tried two phototransistors in paralell).
When this is connected to RB1 it works great, as it does on the other chips that I have used for this circuit.
I have tried several different chips so im certain Its not a damaged chip.
I feel I have tried everything I can think of to solve this problem, so any advice at all would be greatly appreciated.
John
But I have a problem with some of the inputs.
I have a phototransistor connected between RA0 and GND, with a 27k resistor pullup resistor connected to RA6 (defined as output and set high).
The output from the phototransistor (without the chip connected) goes between 0.1V (high light) and 3.5V (low light). But when the PIC is connected this pin is high (according to the software and on my multimeter) regardless of the light conditions.
I have disabled the ADC and set all the ADC chanels as digital IO. This is port A so it doesnt have any WPUs.
This setup works great on other Pics such as the 16f819.
This problem occurs when the phototransistor is connected to RA0 or RA1. The pin reads high (low light) all the time.
Shorting the phototransistor works great, that pulls the pin low and it is recognised by the software. But the Phototransistor is unable to pull the pin low by itself (I even tried two phototransistors in paralell).
When this is connected to RB1 it works great, as it does on the other chips that I have used for this circuit.
I have tried several different chips so im certain Its not a damaged chip.
I feel I have tried everything I can think of to solve this problem, so any advice at all would be greatly appreciated.
John