I have successfully written and debugged my first project on an 16F877 using the ICD. (With a good deal of help from the archives...thanks!). I have ported the code to the 16F628 for my final implementation, but with no joy - I get no output on any pins - my logic probe indicates the portA pins are floating (hence not set for output). I am setting the CMCON bits (0x07) and resetting the TRISA bits. In total desparation, I changed the program to just a simple led blinking app, with the same results...works on the '877 but no go on the '628. If I step through it with the simulator, it works fine. I am using Myke Predko's "El Cheapo" programmer and it reports that the part programmed OK (and the verify function confirms). If I remove the part from the programmer I get errors, so I assume the programmer at least "thinks" everything is OK. I even tried tying pin10 to ground as has been discussed here. One concern I have is that it only takes a second or so to program (my program is 496 words). Is this a reasonable time to download this program? It is significantly faster than the MPLAB/ICD, which takes a few seconds. I have to assume it's something stupid I'm doing, but I've spent hours trying to debug this problem. I checked the .lst file and the fuse bits all look correct, as does the conditional code. Any assistance would be greatly appreciated; I am at my wits' end. Here is the guts of my (simple test) code... . . . IntsOff Macro clrf INTCON EndM IntsOn Macro movlw (1 << GIE) | (1 << T0IE) movwf INTCON EndM ifdef __16F877 #define SegPort PORTD #define TRISSegPort TRISD endif ifdef __16F628 #define SegPort PORTB #define TRISSegPort TRISB endif ; Registers ifdef __16F877 __CONFIG _CP_OFF & _DEBUG_OFF & _XT_OSC & _PWRTE_ON & _WDT_OFF & _LVP_OFF & _WRT_ENABLE_ON & _BODEN_ON & _CPD_OFF endif ifdef __16F628 __CONFIG _CP_OFF & _XT_OSC & _PWRTE_ON & _WDT_OFF & _LVP_OFF & _BODEN_ON & _MCLRE_OFF endif PAGE org 0 nop goto Main org 4 Int bsf TimerInt, 0 incf TimerCount, f bcf INTCON, T0IF retfie Main ifdef __16F628 movlw 7 movwf CMCON ; All RA pins digital endif bsf STATUS, RP0 ; Goto Bank 1 to set Port Direction movlw B'11000011' ; Timer bits, prescaler 8:1 movwf OPTION_REG ifdef __16F877 movlw 6 movwf ADCON1 ; All RA pins digital endif bcf TRISA, 0 ; Set RA0 to Output bcf TRISA, 1 ; Set RA1 to Output bcf TRISA, 2 ; Set RA2 to Output clrf TRISSegPort ; Make all pins in Segport output bcf STATUS, RP0 ; Go back to Bank 0 clrf PA clrf PORTA clrf SegPort clrw x ; just flash a led on RA0 movlw 1 xorwf PA, w movwf PA movwf PORTA call DelayLong call DelayLong call DelayLong call DelayLong call DelayLong ; total about half a second goto x . . . Sorry for the long post. TIA Gary -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body