Temperature

Thread Starter

FroceMaster

Joined Jan 28, 2012
702
Hi
Have recieved the part.
Now i will get started BUT i miss the possibility to chose 16F1509 in MPLAB
How should i fix that ?
 

Thread Starter

FroceMaster

Joined Jan 28, 2012
702
Device file requires a newer version of pickit2,,, but i have the newest one.
Maybe the files is for pickit3 ?
Have now updated the pickit to v 2.61 , file can be read now., biut still do it NOT support 16f1509 unknown device.
 
Last edited:

t06afre

Joined May 11, 2009
5,934
Try to give it 5 volt supply voltage (if you NOT have the LF version). I have checked and the 16(l)f1509 should be compatible with the PICKIT 2. In the programmer toolbar. Select "Manual Device select" Then use the pull-down menu to select 16f1509
 

t06afre

Joined May 11, 2009
5,934
Then swapping a chip it will always be some changes. Like in the the config bits. Confer with the datasheet. As a help open the pic16f1509.h file. Here you will find all options and naming
 

Thread Starter

FroceMaster

Joined Jan 28, 2012
702
Have check it all. But still when loading hex it tells the warning that no config in hex.
But if i set in programmer and program chip. No work on lcd
 

spinnaker

Joined Oct 29, 2009
7,830
Have check it all. But still when loading hex it tells the warning that no config in hex.
But if i set in programmer and program chip. No work on lcd

Then you are missing something. You need to check your datasheet. Also MPLab has a help screen for the configuration bits but it might not work for your chip but you can try. It is found under Configure/ Configuration Bits.

If you temporarily uncheck "Configuration Bits Set in Code" you can see the various setting for the configuration bits under Setting.

Do you have the configuration bits set in your source file? Do you see any errors when compiling?
 

spinnaker

Joined Oct 29, 2009
7,830
Also for future reference, you can check if MPLab supports a chip on the PicKit2 by selecting Configure/Select Device. Search for the device you wish to buy. If the PicKit2 has a red dot next to it then MPLab does not support that device.

You really should only buy devices supported on the PicKit2 or buy a pickit3. It will be a lot easier for you.
 
Last edited:

Thread Starter

FroceMaster

Joined Jan 28, 2012
702
I have removed all part where it read/write to EEprom,
HAve changed some of the config, just let it build and found the errors, and then corrected until no errors.
Then "main" program has not got changed, just the part with eeprom.
My config line is.
Rich (BB code):
__CONFIG (FCMEN_ON & IESO_OFF & BOREN_OFF & CP_OFF & MCLRE_OFF & PWRTE_ON & WDTE_OFF & FOSC_INTOSC);
Memory Summary:
Program space used BD8h ( 3032) of 2000h words ( 37.0%)
Data space used 63h ( 99) of 200h bytes ( 19.3%)
EEPROM space None available
Configuration bits used 1h ( 1) of 2h words ( 50.0%)
ID Location space used 0h ( 0) of 4h bytes ( 0.0%)

Can see that i miss something in config.
 

Thread Starter

FroceMaster

Joined Jan 28, 2012
702
Added more config.
Rich (BB code):
__CONFIG (FCMEN_ON & IESO_OFF & BOREN_OFF & CP_OFF & MCLRE_OFF & PWRTE_ON & WDTE_OFF & FOSC_INTOSC);
__CONFIG (LVP_ON & LPBOR_OFF & BOREN_ON & STVREN_ON & WRT_OFF);
And now i get.-
Memory Summary:
Program space used BD8h ( 3032) of 2000h words ( 37.0%)
Data space used 63h ( 99) of 200h bytes ( 19.3%)
EEPROM space None available
Configuration bits used 2h ( 2) of 2h words (100.0%)
ID Location space used 0h ( 0) of 4h bytes ( 0.0%)

All config is set,
When loading hex into programmer, it says ok,
Then i program to chip, but still no real life.
What am i missing ?
 

Thread Starter

FroceMaster

Joined Jan 28, 2012
702
Got it now.
Must also set "ANSELC=0;"
Then it works.
Time is running very fast, but then delays in subs. are running very slow , Why ?
 

t06afre

Joined May 11, 2009
5,934
That is because you have not read the datasheet ;) Read section 5 and 19 as a start. For the slow delays hint REGISTER 5-1: OSCCON: OSCILLATOR CONTROL REGISTER
 
Top