DIY Electronics Message Board
Sign up  |   |   |  Latest Topics
 
 
 


Reply
  Author   Comment   Page 1 of 2      1   2   Next
dersk

Registered:
Posts: 7
Reply with quote  #1 
Is there a how to guide for adding PICs to the chipinfo file?  I wanted to add the 16F785. 

Can this information be found in the datasheet? 

Frank

Moderator
Registered:
Posts: 1,900
Reply with quote  #2 
I have never done it myself but I believe you can get the information you need from the datasheet. You need to start with a similar chip from the same 'family' and use that as a guide.
dersk

Registered:
Posts: 7
Reply with quote  #3 
Well, I think I failed on this attempt - I get a syntax error when I set the number of pins (KITSRUS.COM=20pin) - does anyone have any advice?  I tried SocketImage=20pin also. 

And I have no idea what the CoreType or ChipID would be, and I haven't gotten to the fuses yet. 

Has anyone successfully added MCUs to the chipdata.cid file?


CHIPname=16F785
INCLUDE=Y
KITSRUS.COM=20pin
EraseMode=1
FlashChip=Y
PowerSequence=VccVpp1
ProgramDelay=10
ProgramTries=1
OverProgram=1
CoreType=bit14_C
ROMsize=000800
EEPROMsize=00000100
FUSEblank=3FFF 3FFF
CPwarn=N
CALword=N
BandGap=N
ICSPonly=N
ChipID=0DE0
Frank

Moderator
Registered:
Posts: 1,900
Reply with quote  #4 
The best idea might be to use the entry from a similar part. Copy and paste them as a new entry then edit the values to suit.
Hoeb

Registered:
Posts: 17
Reply with quote  #5 
The DIY programmer software is to old to know about 20pin parts, that is why you will always get that error. Try using 14pin instead. There was a thread some time ago about modifying the ZIF socket wiring so that the 20-pin parts could be fitted into the bottom of the zif and programmed. The K149A I believe allows this. Other models don't.

Unless you modify the Zif wiring you should change ICSPonly=N to ICSPonly=Y and use the ICSP mode only.
dersk

Registered:
Posts: 7
Reply with quote  #6 
Thanks Hoeb!  That got me moving again. 

I have a chipdata.cid entry that programs the chip now.  As long as the programmer runs without errors, can I assume that it's programming the chip correctly?  Or could there be unseen errors due to mistakes in the chipdata file?  Or errors because the firmware wasn't meant for this chip? 

Thanks for all the help - I've attached the chipdata entry below if anyone wants to try it out.  Let me know if you have any problems with it. 

-- Entry edited with corrections from newfound (see post below) --

CHIPname=16F785
INCLUDE=Y
KITSRUS.COM=0pin
EraseMode=2
FlashChip=Y
PowerSequence=Vpp1Vcc
ProgramDelay=30
ProgramFlag2=1
PanelSizing=0
CoreType=bit14_B
ROMsize=000800
EEPROMsize=00000100
FUSEblank=3FFF
CPwarn=N
CALword=N
BandGap=N
ICSPonly=Y
ChipID=1200
LIST1 FUSE1 "WDT" "Enabled"=3FFF "Disabled"=3FF7
LIST2 FUSE1 "PWRTE" "Disabled"=3FFF "Enabled"=3FEF
LIST3 FUSE1 "MCLRE" "Enabled"=3FFF "Disabled"=3FDF
LIST4 FUSE1 "Code Protect" "Disabled"=3FFF "Enabled"=3FBF
LIST5 FUSE1 "CPD" "Disabled"=3FFF "Enabled"=3F7F
LIST6 FUSE1 "BODEN" "BODon SBODENoff"=3FFF "BODrun SBODENoff"=3EFF "SBODEN=PCON"=3DFF "BODoff SBODENoff"=3CFF
LIST7 FUSE1 "InEx Switch Over" "Enabled"=3FFF "Disabled"=3BFF
LIST8 FUSE1 "Fail Clock Mon" "Enabled"=3FFF "Disabled"=37FF
LIST9 FUSE1 "Oscillator" "EXTRC_CLKOUT"=3FFF "EXTRC_IO"=3FFE "INTRC_CLKOUT"=3FFD "INTRC_IO"=3FFC "EC"=3FFB "HS"=3FFA "XT"=3FF9 "LP"=3FF8

newfound

Registered:
Posts: 497
Reply with quote  #7 

Please try the following corrections below and if all looks well then it almost certainly is. Post again if you see any error messages. If not please edit you above post with the corrections as the last thing we need is more different copies of the same chipdata.cid entry.


CHIPname=16F785 Correct!
INCLUDE=Y Correct!
KITSRUS.COM=14pin 0pin is more correct, not sure if it makes much difference
EraseMode=2 Correct!
FlashChip=Y Correct!
PowerSequence=Vpp2Vcc Should be =Vpp1Vcc unless you modify Zif wiring or have a K149A (only) programmer  EDIT for clarity: Vpp1Vcc puts the voltages on the ICSP port, Vpp2Vcc puts them on the Pin-5 & 16 of Zif socket. As this PIC really is a ICSP only PIC it should be Vpp1Vcc.
ProgramDelay=60 Try =30 this will allow 3ms prog specs say 2.5ms go with 3ms though
ProgramFlag2=1 Correct!
PanelSizing=0 Correct!
CoreType=bit14_B Correct!
ROMsize=000800 Correct!
EEPROMsize=00000100 Correct!
FUSEblank=3FFF Correct!
CPwarn=N Correct!
CALword=N Correct!
BandGap=Y Should be =N
ICSPonly=Y Correct!
ChipID=FFFF Should be =1200
LIST1 FUSE1 "WDT" "Enabled"=3FFF "Disabled"=3FF7 Correct!
LIST2 FUSE1 "PWRTE" "Disabled"=3FFF "Enabled"=3FEF Correct!
LIST3 FUSE1 "MCLRE" "Enabled"=3FFF "Disabled"=3FDF Correct!
LIST4 FUSE1 "Code Protect" "Disabled"=3FFF "Enabled"=3FBF Correct!
LIST5 FUSE1 "CPD" "Disabled"=3FFF "Enabled"=3F7F Correct!
LIST6 FUSE1 "BODEN" "BODon SBODENoff"=3FFF "BODrun SBODENoff"=3EFF "SBODEN=PCON"=3DFF "BODoff SBODENoff"=3CFF Correct!
LIST7 FUSE1 "InEx Switch Over" "Enabled"=3FFF "Disabled"=3BFF Correct!
LIST8 FUSE1 "Fail Clock Mon" "Enabled"=3FFF "Disabled"=37FF Correct!
LIST9 FUSE1 "Oscillator" "EXTRC_CLKOUT"=3FFF "EXTRC_IO"=3FFE "INTRC_CLKOUT"=3FFD "INTRC_IO"=3FFC "EC"=3FFB "HS"=3FFA "XT"=3FF9 "LP"=3FF8 Correct!

All config options accounted for correctly. Very nice work indeed to get this so close to best fit possible.

-Jim
dersk

Registered:
Posts: 7
Reply with quote  #8 
Thanks newfound - I programmed with the new parameters, no errors, MCU program was successfully executed. 

How is the ChipID determined? 

newfound

Registered:
Posts: 497
Reply with quote  #9 
Quote:
Originally Posted by dersk
Thanks newfound - I programmed with the new parameters, no errors, MCU program was successfully executed. 

How is the ChipID determined? 



Thanks for the feedback and update. The chipID is found in the devices programming specs toward the very end. Usually after the Config Word info. See prog spec DS41237C-page 21

Base line parts do not have a chipID but almost, if not all, Mid line Flash (except the 16C/F84 and 16F83) and High line Flash parts do.

-Jim
dersk

Registered:
Posts: 7
Reply with quote  #10 
I have real issues deciding which MCU to use - but I really like this one right now and I'm having some more problems writing the chipdata.cid entry for the 16F882.

When I try to program it, it says:
"The programmer does not recognise the [16F882] processor
Continue anyway?"

To which I say yes, and it programs.  It looks like it successfully programmed the chip, but so far I haven't gotten the chip to do anything.  Any ideas?  Has anyone done the chipdata.cid entry for this chip?  I pasted my entry below.  Thanks!

CHIPname=16F882
INCLUDE=Y
KITSRUS.COM=0pin
EraseMode=2
FlashChip=Y
PowerSequence=Vpp1Vcc
ProgramDelay=30
ProgramFlag2=1
PanelSizing=0
CoreType=bit14_B
ROMsize=001000
EEPROMsize=00000080
FUSEblank=3FFF
CPwarn=N
CALword=N
BandGap=N
ICSPonly=Y
ChipID=1000
LIST1 FUSE1 "WDT" "Enabled"=3FFF "Disabled"=3FF7
LIST2 FUSE1 "PWRTE" "Disabled"=3FFF "Enabled"=3FEF
LIST3 FUSE1 "MCLRE" "Enabled"=3FFF "Disabled"=3FDF
LIST4 FUSE1 "Code Protect" "Disabled"=3FFF "Enabled"=3FBF
LIST5 FUSE1 "CPD" "Disabled"=3FFF "Enabled"=3EFF
LIST6 FUSE1 "BODEN" "BODon SBODENoff"=3FFF "BODrun SBODENoff"=3EFF "SBODEN=PCON"=3DFF "BODoff SBODENoff"=3CFF
LIST7 FUSE1 "InEx Switch Over" "Enabled"=3FFF "Disabled"=3BFF
LIST8 FUSE1 "Fail Clock Mon" "Enabled"=3FFF "Disabled"=37FF
LIST9 FUSE1 "LVP" "Enabled"=3FFF "Disabled"=2FFF
LIST10 FUSE1 "DEBUG" "Disabled"=3FFF "Enabled"=1FFF
LIST11 FUSE1 "Oscillator" "EXTRC_CLKOUT"=3FFF "EXTRC_IO"=3FFE "INTRC_CLKOUT"=3FFD "INTRC_IO"=3FFC "EC"=3FFB "HS"=3FFA "XT"=3FF9 "LP"=3FF8

newfound

Registered:
Posts: 497
Reply with quote  #11 
There is an entry for one of the 16F88x PICs on this forum. I found it here:

http://www.websitetoolbox.com/tool/post/diykit/vpost?id=1931405&highlight=16f887

There is an issue with the standard DIY update firmware not being able to program the second config word. This will not stop the PIC from working though. If you have the "extra" update (chipdata.a00) then it is fully supported and programs much quicker.

The correct chipID for the 16F882 is:
ChipID=2000
You can program these PICs onboard so use:
SocketImage=28Npin
ICSPonly=N
Programming will still be available via the ICSP port.

These PICs have Vpp before VDD so use:
PowerSequence=Vpp1Vcc

Even with what you're got, it still should work and it is very likely that your code is not right. Generally if the programmer does not report an error then the chip is programmed correctly.

BTW. I have spent many hours lately adding PICs an correcting a swag of errors. In future all chipdata files will be machine generated from a master database and have standard acronyms. It is crazy that some settings have six or more different names. The order of settings will also be standard too: Here is a partially completed guide. Note that this will choke microbrn (and microbrn38) as it is for new software.

Code:
CHIPname=16F882

INCLUDE=Y
SocketImage=28Npin
EraseMode=2
FlashChip=Y
PowerSequence=Vpp1Vcc
ProgramDelay=10
ProgramFlag2=57
PanelSizing=7
CoreType=bit14_D
ROMsize=000800
EEPROMsize=00000100
FuseOr=0000 38FF
FuseAnd=3FFF 3FFF
cpmask01=0040
cpmask0=0040
cpmask1=0000
ConfigBlankMask16=3FFF 3FFF
CPwarn=N
CALword=N
BandGap=N
ICSPonly=N
ChipID=2000
LIST1 FUSE1 "WDT" "Enabled"=3FFF "Disabled"=3FF7
LIST2 FUSE1 "PWRTE" "Disabled"=3FFF "Enabled"=3FEF
LIST3 FUSE1 "BOREN" "Enabled"=3FFF "BORXSLP"=3EFF "SWBOREN"=3DFF "Disabled"=3CFF
LIST4 FUSE1 "LVP" "Enabled"=3FFF "Disabled"=2FFF
LIST5 FUSE1 "MCLRE" "Disabled"=3FDF "Enabled"=3FFF
LIST6 FUSE1 "CPD" "Enabled"=3F7F "Protected"=3FFF
LIST7 FUSE1 "DEBUG" "Disabled"=3FFF "Enabled"=1FFF
LIST8 FUSE1 "OSC" "INTIO"=3FFC "INTCLK"=3FFD "EXTIO"=3FFE "EXTCLK"=3FFF "EC"=3FFB "HS"=3FFA "XT"=3FF9 "LP"=3FF8
LIST9 FUSE1 "CODEPROT" "Disabled"=3FFF "Enabled"=3FBF
LIST10 FUSE1 "FCMEN" "Disabled"=37FF "Enabled"=3FFF
LIST11 FUSE1 "IESO" "Disabled"=3BFF "Enabled"=3FFF
LIST12 FUSE2 "BODEN" "4V Reset"=3FFF "2.1V Reset"=3EFF
LIST13 FUSE2 "WRT" "Write Protect off"=3FFF "0000-00FF Protected"=3DFF "0000-03FF Protected"=3BFF "All memory write Protected"=39FF


Anyway, as I said, I think it is your code, not your chipdata entry (except for the wrong chip id.)

Jim
dersk

Registered:
Posts: 7
Reply with quote  #12 
When I tried to change the CoreType to "D" instead of "B", I get this error:

Chip configuration file contains syntax errors.
16F882 Line 2742 CORETYPE = BIT14_D

How critical is the CoreType?  I can't find it in the programming specifications. 

I'm having serious difficulties pinning down whatever the problem is - I'm still playing with the chipdata file because my code is empty except for fuse settings and something is still amiss. 

Also, ProgramDelay=10 isn't long enough (gives error).  I'm using 30.  Thanks for your help - when is this new software, chipdata coming out? 

Mav_2014

Registered:
Posts: 4
Reply with quote  #13 
Hi all, I'm needing to program an 18f6270 with my k150 and not in the list, can anyone help?

Cheers

Tony
Frank

Moderator
Registered:
Posts: 1,900
Reply with quote  #14 
The DIY PIC programmers are no longer supported.

Only option I can suggest is to find a similar PIC that is supported, duplicate its entry in the chipinfo file and then edit it to suit.

Frank
Mav_2014

Registered:
Posts: 4
Reply with quote  #15 
Thanks for the reply Frank, I know it's an old thread... being fairly dumb on this lot... quite openly ... if I duplicate one that is supported, where would I find the correct in for for the 18f6270 to put into the chipinfo file (opened that and seen the data, just not sure where the info for the 18f6270 would come from)

Many thanks
Tony
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.

Thank you for visiting.