PDA

View Full Version : config



n0yox
- 31st May 2014, 18:53
Can anyone tell me why this does not work?

I started with "@ DEVICE MCLRE_OFF, INTRC_OSC, WDT_OFF, LVP_OFF, BOD_OFF, PWRT_ON, PROTECT_OFF" in PBP2.50 and need to know the proper syntax for PBP3?

#config
__config _MCLR_OFF & _INTRC_OSC & _PROTECT_ON & _WDT_OFF & _BOD_OFF & _PWRT_OFF
#endconfig

Thanks

Roger

Demon
- 31st May 2014, 19:44
Post all your code and model of PIC.

What errors do you get? How does it "not work"?

Robert

n0yox
- 1st June 2014, 02:03
Post all your code and model of PIC.

What errors do you get? How does it "not work"?

Robert

I am using a 16f628a. I was unable to compile because of undefined symbol "INTRC_OSC"

this seems to work
#config
__config _INTOSC_OSC_NOCLKOUT & _WDT_OFF & _MCLRE_OFF & _LVP_OFF & _CP_ON
#endconfig



I was having problems with the "INTOSC_OSC_NOCLKOUT" in PBP2.5 this was "INTRC_OSC". I would like to see a list of all of these changes if anyone know where to find them?

Thank you very much for your reply Robert!

Roger

Demon
- 1st June 2014, 02:32
Have you read this?

http://www.picbasic.co.uk/forum/showthread.php?t=543

Did you change to MPASM instead of PM?

Robert

n0yox
- 1st June 2014, 03:07
I just received my new PBP3 and this documents seems to say that the PM assembler is no longer supported?

http://pbp3.com/downloads/Migrating%20existing%20programs%20to%20PBP3.pdf

Please take a look and tell me I am wrong. I have used PBP for many years and change is not my favorite thing:)

Thanks for all of your help!

Roger

Demon
- 1st June 2014, 04:44
PM is now "extinct".

You have to download MPLAB X (I think), and then point to MPASM.

You don't have to use MPLAB, you only need the new assembler.

Robert


Edit:
http://www.picbasic.co.uk/forum/showthread.php?t=18520

n0yox
- 1st June 2014, 05:17
Now I am really confused! I will sleep maybe it will all make sense in the moring:confused:

Thank You

Roger

Demon
- 1st June 2014, 13:39
Yeah, I can see why. I think that thread is when you want to use MPLAB.

Here's what I do for PBP 2.6:

- install MPLAB.
- install PBP.
- install Microcode Studio.
- in MCS, point to PBP and MPASM.

Unless v3 has a major change in the way things work, the same should work.

Hopefully someone with v3 can chime in.

Robert

Archangel
- 1st June 2014, 19:08
Make a separate directory for pbp3 from earlier versions so you can use both.

n0yox
- 3rd June 2014, 02:13
Thank You to everyone!

Roger

ChrisKiwi
- 9th June 2014, 08:47
If you go into the "DEVICE_REFERENCE" folder of your PBP3 install directory you will find a bunch of files *.INFO. Find the file that relates to your PIC and open it to find a complete list of all the config options with descriptions and an example of how to use the settings in PBP3, e.g for PIC16F1509

; Available __CONFIG labels for PIC16F1509:
;
;CONFIG1 Options
;
; Oscillator Selection Bits
; _FOSC_ECH ;ECH, External Clock, High Power Mode (4-20 MHz): device clock supplied to CLKIN pins
; _FOSC_ECM ;ECM, External Clock, Medium Power Mode (0.5-4 MHz): device clock supplied to CLKIN pins
; _FOSC_ECL ;ECL, External Clock, Low Power Mode (0-0.5 MHz): device clock supplied to CLKIN pins
; _FOSC_INTOSC ;INTOSC oscillator: I/O function on CLKIN pin
; _FOSC_EXTRC ;EXTRC oscillator: External RC circuit connected to CLKIN pin
; _FOSC_HS ;HS Oscillator, High-speed crystal/resonator connected between OSC1 and OSC2 pins
; _FOSC_XT ;XT Oscillator, Crystal/resonator connected between OSC1 and OSC2 pins
; _FOSC_LP ;LP Oscillator, Low-power crystal connected between OSC1 and OSC2 pins
are the config options for the oscillator. When you install PBP3 it has the option of installing the correct assembler if not already installed.

n0yox
- 10th June 2014, 07:09
That is exactly the file I was trying to find!

Thank You!

Roger

ChrisKiwi
- 10th June 2014, 09:07
Your most welcome!