Please appreciate that I have not done any 'serious' electronics in over twentyfive years! Also note that my experience of PIC was only a couple of projects for some simple switching.
Anyway having dusted some old chips, updated my MPASMWIN (from XP!), I am now about to tear my (little left) hair out trying to understand the problem.
The problem is that when I run the program indicated below I get a flicker every 2.5 seconds or so, which looks as if the system is resetting.
I have removed a 555 timer I had incorporated in the board. No change.
I have disconnected the regulator, again fitted in the board. No change.
I have changed the oscillator from RC to XT and tried two different crystals. No change.
I have rewired MCLR and RTCC directly. Had these through 10ks because I intend to use them. No change.
I have tried three different chips with identical software. No change.
So I am beginning to thnk it is a software problem or a programming one. The programmer is one of those cheap XGecuTL866 II Plus.
Please examine the program, the hex and the read-back from the chip and let me know if you see any issues.
[Mod edit: put code in code box]
The Hex file is:-
:020000040000FA
:0C000000000C06005D0C2D000D02260017
:021FFE00F90FD9
:00000001FF
And the chip read-back is:-
0C00 0006 0C5D 002D 020D 0026 0FFF
Any ideas would be much appreciated.
Regards,
ep
Anyway having dusted some old chips, updated my MPASMWIN (from XP!), I am now about to tear my (little left) hair out trying to understand the problem.
The problem is that when I run the program indicated below I get a flicker every 2.5 seconds or so, which looks as if the system is resetting.
I have removed a 555 timer I had incorporated in the board. No change.
I have disconnected the regulator, again fitted in the board. No change.
I have changed the oscillator from RC to XT and tried two different crystals. No change.
I have rewired MCLR and RTCC directly. Had these through 10ks because I intend to use them. No change.
I have tried three different chips with identical software. No change.
So I am beginning to thnk it is a software problem or a programming one. The programmer is one of those cheap XGecuTL866 II Plus.
Please examine the program, the hex and the read-back from the chip and let me know if you see any issues.
[Mod edit: put code in code box]
Code:
LIST P=16F54, R=DEC
__FUSES _XT_OSC & _WDT_OFF & _CP_OFF
include "P16F5X.inc"
;--------------------------------------------------------------------------
; Variables
;--------------------------------------------------------------------------
Ram EQU h'0C'
Count EQU Ram+1
;--------------------------------------------------------------------------
; Program Code
;--------------------------------------------------------------------------
ORG 0
MOVLW B'00000000' ;Set PORTB for output
TRIS PORTB
MOVLW 93 ;Set something to see
MOVWF Count
Loop MOVF Count, 0 ;Dump value to port to see something
MOVWF PORTB ;Dump W to PORTB
END
The Hex file is:-
:020000040000FA
:0C000000000C06005D0C2D000D02260017
:021FFE00F90FD9
:00000001FF
And the chip read-back is:-
0C00 0006 0C5D 002D 020D 0026 0FFF
Any ideas would be much appreciated.
Regards,
ep
Last edited by a moderator: