How do you know your PIC is not working?
Consider the test code below...
If your 555 is running at 100kHz it would actually take 40 seconds before the LED lit (with PBP set to a 4MHz default - unless you've told it otherwise). What speed is your 555 running at? Is it running? Have you remembered to tie MCLR to Vdd or otherwise set it to internal?Code:LED var PortB.0 TRISB=%00000000 loop: Pause 1000 Toggle LED Goto Loop End
I checked my 555 oscillator with a plain LED prior to switching across. As far as setting fuses I assume that when I choose 'EXTClk' as the oscillator fuse setting in ICProg that the correct settings will be applied. Perhaps I just didn't give the PIC time to fire. I will check the frequency of my 555 oscillator and try again. Please just clarify one thing: ?I totally vanish my XTAL setup (ie crystal and caps) and replace with a signal line in to RA7 from whatever oscillator setup I wish to use?
Here is my test code:
device = 16f628a
loop:
high porta
pause 33
low porta
pause 33
goto loop
OK, I'm now going to kick you where it hurts with my spikey heel just to make you feel doubly bad...
Your example code...
Fault 1.
The 16F628A has ANALOG feature pins on PortA. If you don't switch the ANALOG features OFF first, some of those pins won't work.
Fault 2.
Look at the PBP Manual. HIGH and LOW commands only work on an individual PIN and not on an entire PORT!
Fault 3.
Oh, and the 'device=' statement probably means you're on the wrong forum... so you defiitely deserve that kick! *smiles*
Bookmarks