Nice! Very clever indeed :D. I have never used this command before, but now I can see it's potential.
Reply: It IS more cluttered BUT for those who have both poor vision and do not use a wide
screen monitor it allows you to string
the configs across several lines . . .
And it IS tested, I use it...
The proper way is described in the manual and for a 16F part it IS the "one liner". Back in the day MELABS had their own assembler for which the @ DEVICE stuff you reference was used. PM is now...
lookdown2 index, >= [%00000000,%00000001,%00000010],temp
Darrel showed me to do it this way in PBP, not PBP3 :
@MyConfig = _INTRC_OSC_NOCLKOUT & _WDT_OFF & _PWRTE_ON
@MyConfig = MyConfig & _MCLRE_OFF & _BOR_OFF & _FCMEN_OFF & _IESO_OFF
I have been wanting to migrate to !8F from 16F for some time now. Since your code is written for the 18F it provided me with the motivation to make the switch. My test bed was a LabX1...
You are correct that your timeout1 test/calculation will fail when the RTC roles over from 59 to 00.
Also, if for some reason that the execution is delayed you could miss an entire minute...
What is the proper technique for setting configuration values?
The below works fine, but, being all in one line, it is hard to read vs the older style below it.
Have put together some code as I see it... :-
' Name : PI.pbp
' Compiler : PICBASIC PRO Compiler 2.5
' Assembler : MPASM
' Target PIC : PIC16F628A or similar...
Beep beep beeeeep