Thanks Bruce,
will test that in the evening. Its now 3 pm. will take another 4 hrs til Iīm home.
Does That mean MPASM doesnīt handle extern osc settings ?
Or does it mean the PicKit2 sets its own default osc settings?
very strange.
Thanks Bruce,
will test that in the evening. Its now 3 pm. will take another 4 hrs til Iīm home.
Does That mean MPASM doesnīt handle extern osc settings ?
Or does it mean the PicKit2 sets its own default osc settings?
very strange.
MPASM works just fine with any config directives the PIC has, but they are different than config directives the PM assembler expects. See the thread I linked to above for the details on config use. Melanie does a nice job explaining this.
I don't have a PicKit2, so I can't really say how it works, but I would assume it can read & use config options embedded in the .HEX file, or give you an over-ride option.
Maybe someone else here familiar with the PicKit2 can comment on this one?
Look in the 16F628a.inc file in your PBP directory. If you use PM, it uses the top config defaults. If you use MPASM, then the 2nd default config options are used.
When you insert a bogus config directive in your code, it isn't used, and of course it has no bearing on what config options will be embedded in the .HEX file.
Read the thread by Melanie I linked to earlier. It is well worth the time.
Thanks Bruce,
your file is ok and now 20Mhz could find their way via RA7!
I will try to grasp the "Define-thingy" by reading and trying.
Ha!
Hi Bruce,
as I told you your hex code of my small program really works.
But if I take your previously shown config fuses I get only a compilation error
'************************************************* *******************************************
' 16F628A 20Mhz extern canned Oscillator
' damn program should blink an LED
' Igot that compilation error
'************************************************* *****************************************
@ __config _EXTCLK_OSC & _WDT_OFF & _MCLRE_OFF & _LVP_OFF & _CP_OFF
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
Error[118] c:\pic\16f628a\blinkb~2.asm : Overwriting previous address contents (2007)
when I use only this config:
@ __config _EXTCLK_OSC
I get no comp. error but the thing dosnīt work either.
is an external Osc. with 20 Mhz a no go for PBP ?
If you would just please take the time to read this thread http://www.picbasic.co.uk/forum/showthread.php?t=543 you should get what's happening. If not then let me know.
Hi Bruce,
yeeeees I understood and read the whole thread and you were right: there it all stood.
The most "difficult" part of it was to find out in WHICH of those .INC files the config fuses had to be changed.
there were at least three of them and 2 were in the PBPDEMO folder and those were the ones but I dunno which of those two. commented the configs in both.
After that my BLINKBILLIG20MHz blinked way too fast and the "DEFINE osc 20" programming and compiling worked not for the first 4 times although I erased the PIC complete before programming.
Now it does. And reacts on changing the osc frequency.
thanks a bundle.
I guess your nerves get friggled up with guys like me asking the "obvious" for the 20th time, huh?
next try will be 3 pics with one canned 20Mhz oscillator.....
Not at all. I enjoy answering questions here because I will almost always learn something in the process, and I enjoy learning. A nice by-product of this is that I get to help someone else in the process of learning new things myself.I guess your nerves get friggled up with guys like me asking the "obvious" for the 20th time, huh?
I just see no point in re-typing an answer to a question that has already been thoroughly covered in another thread.
If someone has taken the time to read information in a thread I linked to, the data sheet, manual, etc, and they still have a question about some part of it they aren't 100% clear on, then I'm more than happy to attempt to elaborate.
Bookmarks