Hello everyone.
I just got my self a PIC16F877A and some other parts and I'm trying to get the pic to light a LED as a test but it doesn't work.
I've built the following circuits:
**broken link removed**
And another **broken link removed**
It's the **broken link removed**.
I'm using PIC C compiler with this code (C/ASM view) :
After I program the pic nothing happens, I've connected a LED to RD2 and it doesn't light up. I've tested the led by connecting it to the power supply directly and it works.
Any idea what's wrong ?
PS- there were no errors when i programmed and verified the pic.
Thanks in advance,
Mike.
I just got my self a PIC16F877A and some other parts and I'm trying to get the pic to light a LED as a test but it doesn't work.
I've built the following circuits:
**broken link removed**
And another **broken link removed**
It's the **broken link removed**.
I'm using PIC C compiler with this code (C/ASM view) :
Code:
CCS PCM C Compiler, Version 4.093, 5967
ROM used: 21 words (0%)
Largest free fragment is 2048
RAM used: 6 (2%) at main() level
6 (2%) worst case
Stack: 0 locations
*
0000: MOVLW 00
0001: MOVWF 0A
0002: GOTO 004
0003: NOP
.................... #include <16F877A.h>
.................... //////// Standard Header file for the PIC16F877A device ////////////////
.................... #device PIC16F877A
.................... #list
....................
.................... #fuses HS,NOWDT,NOPROTECT,LVP
.................... #use delay(clock=20000000)
.................... void main()
.................... {
0004: CLRF 04
0005: BCF 03.7
0006: MOVLW 1F
0007: ANDWF 03,F
0008: BSF 03.5
0009: BSF 1F.0
000A: BSF 1F.1
000B: BSF 1F.2
000C: BCF 1F.3
000D: MOVLW 07
000E: MOVWF 1C
.................... output_d(0xFF);
000F: CLRF 08
0010: MOVLW FF
0011: BCF 03.5
0012: MOVWF 08
.................... while(1)
.................... {
.................... }
0013: GOTO 013
.................... }
0014: SLEEP
Configuration Fuses:
Word 1: 3FF2 HS NOWDT PUT NODEBUG NOPROTECT BROWNOUT LVP NOCPD NOWRT
After I program the pic nothing happens, I've connected a LED to RD2 and it doesn't light up. I've tested the led by connecting it to the power supply directly and it works.
Any idea what's wrong ?
PS- there were no errors when i programmed and verified the pic.
Thanks in advance,
Mike.
Last edited: