I am trying to wire an MCP23016 as output; driving LEDs. No matter what I try, no LEDs light up. Any idea what I am missing?

---------------------------------------------------------------
'define LOADER_USED 1
ADCON1 = 7 ' A/D off, all digital

ASM
@ DEVICE PIC16F877, HS_OSC, WDT_OFF, PWRT_ON, BOD_ON, LVP_OFF, CPD_OFF, WRT_OFF, DEBUG_OFF, PROTECT_OFF
ENDASM

define OSC 20

DEFINE LCD_DREG PORTA ' Set LCD data port
DEFINE LCD_DBIT 0 ' Set starting data bit
DEFINE LCD_RSREG PORTA ' Set LCD register select port
DEFINE LCD_RSBIT 4 ' Set LCD register select bit
DEFINE LCD_EREG PORTB ' Set LCD enable port
DEFINE LCD_EBIT 3 ' Set LCD enable bit
DEFINE LCD_BITS 4 ' Set LCD bus size
DEFINE LCD_LINES 4 ' Set number of lines on LCD
define LCD_COMMANDUS 2000 ' Set command delay time in microseconds
DEFINE LCD_DATAUS 50 ' Set data delay time in microseconds

DEFINE I2C_SLOW 1 ' Access I2C device above 8MHz
'DEFINE I2C_SCLOUT 1 ' Set I2C clock line as bipolar
DEFINE I2C_HOLD 1 ' Permit I2C device to hold clock line low

I2CSDA VAR PortC.4 ' Data line
I2CSCL VAR PortC.3 ' Clock line
I2CCTRL VAR BYTE ' I2C chip address
I2CLOC VAR BYTE ' I2C location byte
I2CBYTE1 VAR BYTE ' I2C 8 bit data string
I2CBYTE2 VAR BYTE ' I2C 8 bit data string

GOTO START

ERRORIO:
LCDOUT $FE,$94,"No ACK from I2C device"
RETURN

START: PAUSE 2000 ' Wait for LCD to initalize
LCDOUT $FE,1,"Program start"

' I2C device address: ID A2 A1 A0 R/W
' ---- -- -- -- ---
' 0100 0 0 0 0

I2CCTRL = %01000000
I2CLOC = $06 ' Set location to IODIR register pair
I2CBYTE1 = %00000000 ' Set pins 0-7 as output
I2CBYTE2 = %00000000 ' Set pins 8-15 as output
I2CWRITE I2CSDA,I2CSCL,I2CCTRL,I2CLOC,[I2CBYTE1,I2CBYTE2],ERRORIO
PAUSE 2000

I2CCTRL = %01000000
I2CLOC = $00 ' Set location to GPIO register pair
I2CBYTE1 = %00101010
I2CBYTE2 = %00000000
I2CWRITE I2CSDA,I2CSCL,I2CCTRL,I2CLOC,[I2CBYTE1,I2CBYTE2],ERRORIO

Finish:
LCDOUT $FE,$D4,"Process complete"
end
---------------------------------------------------------------


Yeah, I just noticed an error in my I2CWRITE comment. I meant pins in the sense of logical pins(GP0.0-GP0.7 and GP1.0-1.7).

I also did some trial & error with the I2C DEFINES, but no luck there. I even increased the PAUSE in case. The program terminates properly, so it seems as if I do get some sort of acknowledgement from the device.

I've triple-checked the wiring a zillion times. I followed the datasheet and placed the RC as specified.

I'm stumped...

Thanks!

Robert