PDA

View Full Version : PIC18F2320 RA4 output problem



Kristjan
- 30th May 2007, 19:12
Hi!

I'm using PIC18F2320 chip. It's needed to use PORTA.4 as digital output. Somehow with this program it doesn't give high value into PORTA.4 pin. PORTC.1 output is working. Are there any settings missing? From datasheet can't find any clue. With PIC18F2420 this program is working.

DEFINE OSC 4

p var PORTA.4
k var PORTC.1

CVRCON = 0
CMCON = 7

TRISA = %00000000
TRISC = %00000000

p = 1
k = 1

end

Acetronics2
- 30th May 2007, 19:19
Hi,

Generally, RA.4 is an open collector as output pin ...

need to be checked ... but 100% sure !!!

Alain

Kristjan
- 30th May 2007, 23:56
Yup. There is open drain. So I changed the outputs a bit. Tnx.