Hello, I am having trouble with a PIC16F876A, on an Olimex 28-pin dev board (see http://www.sparkfun.com/products/18). The program downloads and verifies successfully (or so the software tells me) via an meLabs U2 USB programmer. In the past, I've had a couple PIC18 chips partially die on me without losing their ability to be programmed, so I'm wondering if that's the case here, or if there's something wrong with my code. I have been careful about grounding myself while handling both chips, although it's possible that I forgot at some point while working on it with little sleep. > I am trying to toggle all the pins of PORTB as a "hello world" test. It works in the simulator, but apparently does nothing on the board. I have already checked the supply voltage (+5.05V) and tested both chips on a breadboard with all the I/O ports connected to GND with 1k resistors as suggested here http://www.piclist.com/techref/logic/xtrapins.htm. Still nothing on my scope, which is an old HP DSO with a 10 MHz sample rate. Her= e is my assembly code: > list p=3D16f876a ; list directive to define processor > #include "p16f876a.inc" ; processor specific variable definitions > __CONFIG _CP_OFF & _WDT_OFF & _BODEN_ON & _PWRTE_ON & _RC_OSC & _LVP_OFF & _DEBUG_OFF & _CPD_OFF > ; '__CONFIG' directive is used to embed configuration data within .asm file= .. > ; The lables following the directive are located in the respective .inc file. > ; See respective data sheet for additional information on configuration word. > ;***** VARIABLE DEFINITIONS > ;; w_temp EQU 0x70 ; variable used for context saving > ;; status_temp EQU 0x71 ; variable used for context saving > ;********************************************************************** > ORG 0x000 ; processor reset vector > clrf PCLATH ; ensure page bits are cleared > ; goto main ; > ;; initialize PORTA > bcf STATUS, RP0 ; select bank 0 > bcf STATUS, RP1 > clrf PORTB > bsf STATUS, RP0 ; select bank 1 > movlw 0x06 > movwf ADCON1 > movlw 0x00 > movwf TRISB > top: > bcf STATUS, RP0 ; select bank 0 > movlw 0x00 > movwf PORTB > movlw 0xFF > movwf PORTB > goto top > END ; directive 'end of program' > Is there something wrong with this code, or is it definitely a hardware issue? > Thanks, Jim --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .