I need some help!
I'm not able to do a simpe led blinking with this new microprocessor.
I'd like to use the internal 16Mhz clock
Thanks
Bye
Printable View
I need some help!
I'm not able to do a simpe led blinking with this new microprocessor.
I'd like to use the internal 16Mhz clock
Thanks
Bye
I may be wrong...but I do not think Pic Basic supports that chip?
F, LF, it's all the same but different.Quote:
Latest Release: 2.50
DOWNLOAD PATCH to 2.50b:
Adds support for PIC16F722, 723, 724, 726, 727, PIC16LF722, 723, 724, 726, 727, PIC18F6393, 6493, 6628, 66J11, 66J16, 6723, 67J11, 8393, 8493, 8628, 86J11, 86J16, 8723 and 87J11.
Guess I need a patch :o
This is what you need in the config line then
Then look in the data sheet under the OSC section at the OSCON register.Code:_INTRC_OSC_NOCLKOUT
Yes, LF is different from F and I'm using a different programmer (pickit2) running at 3.3 volts.
Using AN589 and ICprog I made a lot of project in the last 3 years.
I'm using the 2.50 version and I can see the PIC in the processo list.
My question is regardin the configuration bits, using PICKIT 2.
How I can select any bits of configuration word 1 (CONFIG1) using PBP 2.50, like @CONFIG or OSCCON %01001110 or __CONF or ... like described on pade 89 of PICF72X/PIC16LF72X manuals.
I want, for the moment, to see just a led blinking.
Thanks
Bye
I'm using:
- Melabs default (PM) assembler.
- PBP 2.50b
- PICKIT 2
- PIC 16LF722
- one led connected to portb.0
How I can set the micro for the internal 16Mhz oscillator?
How can I select the single parameters in the configuration word 1 (CONFIG1) like described on page 89 of PICF72X/PIC16LF72X manuals?
How can I write the PBP commends?
Thanks
Bye
Reply With Quote
I got patched up :)
This is a cool chip, I need to get some.
The code below should blink an LED, on for 1/2 second and off for 1/2 second.
I do not use PM, so the config line for PM may not be correct.
The code as is works with MPASM. I will suggest you start using MPASM as you will need it for other chips and/or projects.
Also, if you are new to all of this a different chip might be better to learn on. 16F676,16F88 ??
Hope this works for you.
Code:'16F722
'SETS UP THE INTERNAL OSC FOR 16 MHZ
DEFINE OSC 16
OSCCON= %00111000
'SET THE FUSES - COMMENT OUT THE PBP INC FILE
'PM CONFIG
'device pic16F722, INTRC_osc_noclkout, wdt_on, protect_off
'MPASM CONFIG
@ __config _CONFIG1, _INTRC_OSC_NOCLKOUT & _WDT_ON & _CP_OFF
TRISB = $00000000 'MAKES PINS OUTPUT
ANSELB =$00000000 'MAKES PORT B DIGITAL
START:
HIGH PORTB.0
PAUSE 500 '1/2 SECOND
LOW PORTB.0
PAUSE 500
GOTO START
END
I usually modify the PIC16FXXX.INC file, the one that PBP includes (I program with MPLAB), did not know it can be done like that :eek:.
I saw this chip too and, like you, need to get some, and if you're stunned, look at this:
http://www.picbasic.co.uk/forum/show...7816#post67816