Testing PIC16F628A with LED - Which PCB and fuses?

Thread Starter

leye0

Joined Apr 7, 2008
1
Hi!

I'm new with PIC but I can easily program I2C EEPROM from PCB.
But for the PIC, I get no life signs. It looks like nothing works...

For my 16F628A PIC, I made a simple circuit based on:
http://walter.schreppers.com/files/f..._schematic.gif
This is a LED Flash programs:

program myprog
main:
CMCON=%00000111
OPTION_REG = $80 ' Regs config: No pull-up '
trisa = $FF ' PortA Out '
trisb = 0

boucle:
PORTA = $FF
Delay_ms(1000)
PORTA = not PORTA
Delay_ms(1000)
goto boucle
end.

And it is programmed with WINPIC800.

My fuses are set with no external clock or MCLR, and I've tried WDT On or Off. My current is USB power (~ 4.7V). I've tried a lot of capacitors (From 1n to 100n).

And nothing is working!
 

n9352527

Joined Oct 14, 2005
1,198
To set a pin as an output, you have to set the corresponding TRIS register to low. In your code above, you set TRISA to FFh, as inputs, and TRISB to 0h, as outputs. However, you then write to PORTA which is not configured as output pins.
 
Top