It's open drain - you'll need a pullup resistor. -----Original Message----- From: pic microcontroller discussion list [mailto:PICLIST@MITVMA.MIT.EDU]On Behalf Of Gary Neal Sent: Wednesday, August 22, 2001 12:01 PM To: PICLIST@MITVMA.MIT.EDU Subject: [PIC]: PORTA.4 on p16f8870 ON/OFF? Hi, I wrote some simple code to turn on (high) all the lines of the 16f870. Just wanted to see if they all worked and could light up an LED. They all come on except PORTA.4. I can't get it to go high at all. Tried three different PICs, so it's not just that specific PIC. Here's the code: -------------------------------------------------- x var word 'Loop counter TRISA=0 TRISB=0 TRISC=0 PORTA = 0 PORTB = 0 PORTC = 0 Main: for x = 0 to 88 '1 second loop pause 10 next x PORTA = %00000001 for x = 0 to 88 '1 second loop pause 10 next x PORTA = %00000011 for x = 0 to 88 '1 second loop pause 10 next x PORTA = %00000111 for x = 0 to 88 '1 second loop pause 10 next x PORTA = %00001111 for x = 0 to 88 '1 second loop pause 10 next x PORTA = %00011111 for x = 0 to 88 '1 second loop pause 10 next x PORTA = %00111111 for x = 0 to 88 '1 second loop pause 10 next x PORTB = %00000001 for x = 0 to 88 '1 second loop pause 10 next x PORTB = %00000011 for x = 0 to 88 '1 second loop pause 10 next x PORTB = %00000111 for x = 0 to 88 '1 second loop pause 10 next x PORTB = %00001111 for x = 0 to 88 '1 second loop pause 10 next x PORTB = %00011111 for x = 0 to 88 '1 second loop pause 10 next x PORTB = %00111111 for x = 0 to 88 '1 second loop pause 10 next x PORTB = %01111111 for x = 0 to 88 '1 second loop pause 10 next x PORTB = %11111111 for x = 0 to 88 '1 second loop pause 10 next x PORTC = %00000001 for x = 0 to 88 '1 second loop pause 10 next x PORTC = %00000011 for x = 0 to 88 '1 second loop pause 10 next x PORTC = %00000111 for x = 0 to 88 '1 second loop pause 10 next x PORTC = %00001111 for x = 0 to 88 '1 second loop pause 10 next x PORTC = %00011111 for x = 0 to 88 '1 second loop pause 10 next x PORTC = %00111111 for x = 0 to 88 '1 second loop pause 10 next x PORTC = %01111111 for x = 0 to 88 '1 second loop pause 10 next x PORTC = %11111111 for x = 0 to 88 '1 second loop pause 10 next x PORTA = 0 PORTB = 0 PORTC = 0 goto Main --------------------------------------- Anyone have a clue what's wrong? Thanks, Gary "Imagination is more important than knowledge." A. Einstein -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details. -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.