Hi,
There are 628's available that are specified to run at 20MHz - i used one this weekend.
With that said, your config for the 818 says INTRC which means you're running from the internal oscillator. Looking at the oscillator section of the datasheet it's clear that the internal oscillator defaults to 31.25kHz while you're telling the compiler that your chip is running at 8MHz - which it isn't. I notice this:
Code:
DEFINE OSC 8 'Set oscillator in MHz
Please note that DEFINE OSC xxx does not SET the oscillator speed in any way. What it does is inform the compiler at which speed you intend to run the PIC so that it can calculate the proper delays etc. In this case you're telling the compiler that the PIC is operating at 8MHz when in fact it's operating at 31.25kHz. Your one second pause becomes a 256 second pause. I think that if you leave the circuit powered up long enough you will see the LED blink.
/Henrik.
EDIT: Add OSCCON = 112 to set the oscillator to 8MHz.
EDIT2: As far as I can see all 16F628A's are specified to run at 20MHz.
Bookmarks