Quote Originally Posted by Mugelpower View Post
Hi Guys!

This works:

'************************************************* *******************************************
' 16F628A 20Mhz extern canned Oscillator
' damn program should blink an LED
' Yeah Works!
'************************************************* *******************************************

<font color=red> @config_EXTCLK_OSC</font color> ' Incorrect way<br>
<font color = blue>@ __config _EXTCLK_OSC & _WDT_OFF & _MCLRE_OFF & _LVP_OFF & _CP_OFF</font color> ; MPASM Assembler<br>
<font color=green>@ DEVICE EXTCLK_OSC, WDT_OFF, MCLR_OFF, LVP_OFF, PROTECT_OFF</font color> ; PM ASSEMBLER


DEFINE OSC 20
LED VAR PORTB.7
CMCON = 7 ' RA0-RA3 are digital I/O

TRISB = %01111111 ' RB7 is output, rest are inputs.

main:
led = 1
pause 500
led = 0
pause 500
goto main

END ' End of program

And heres the mistake:
http://hobby_elec.piclist.com/e_pic8_8.htm

Look at the osc wiring diagram: ext osc MUST be connected to RA6! hahahaha!
I'll bet you had to set the OSC fuse manually on the programmer ! Do it the way Bruce showed you and it will set automaticly when you load the hex file.