adding PIC16F1937 HELP!

Problems or tips related to the use of WxPic

adding PIC16F1937 HELP!

Postby JeroenP » 25, 2009 Oct Sun 8:54 am

Hi,

For a college project I'm using the PIC16F1937. I'm trying to find some programming software that I can use to program this IC.
I have a Velleman programmer which seems to work with WxPic. The problem I'm facing now is to get the IC definition right.

I can erase and read the chip but programming the data leads to some errors. The data is programmed partially, some addresses stay empty.

I hope you, or anyone else reading this, is willing to create a definition for my PIC based on the datasheet. I don't have much experience with IC's and for some parameters I'm not sure what to put.

Looking forward to your answer! Thanks in advance...
JeroenP
 
Posts: 3
Joined: 25, 2009 Oct Sun 8:49 am

Re: adding PIC16F1937 HELP!

Postby admin » 25, 2009 Oct Sun 9:55 am

Hi Jeroen,

If you indicate the addresses that fail to be programmed that may help to determine the actual issue.
Though I suppose you will have to read the programmer guide for this model of PIC to determine its specificities and to duplicate and adapt an existing PIC device data to create your own definition.
I will be happy to integrate the result in WxPic and add you in the contributor list. But I am spending a lot of time managing the WxPic code so I am afraid I won't have time to build the definition of all the requested PIC models.

Philippe
admin
Site Admin
 
Posts: 153
Joined: 12, 2009 Jul Sun 7:20 pm

Re: adding PIC16F1937 HELP!

Postby JeroenP » 25, 2009 Oct Sun 10:01 am

Hi,

I understand completely. Can you suggest a model from which I should derive my own definition?
The 16F1937 has two config words. Which programming algo is the best to choose? I already tried a few.
JeroenP
 
Posts: 3
Joined: 25, 2009 Oct Sun 8:49 am

Re: adding PIC16F1937 HELP!

Postby admin » 25, 2009 Oct Sun 10:54 am

You may try the PIC16F737. It has 2 config words and its ID differs only from 2 digits :!:
I have no more clue than that for this proposition.
admin
Site Admin
 
Posts: 153
Joined: 12, 2009 Jul Sun 7:20 pm

Re: adding PIC16F1937 HELP!

Postby JeroenP » 25, 2009 Oct Sun 1:17 pm

Thanks for the idea. I have it working a littble bit.
With the definition below I succeeded to program the CODE memory of the chip. unfortunately I'm not able to program the Config memory and therefore I cannot program the config word. A simple blinking LED is now working with the default config word. But for my real application I need to change the config word.

I was also wondering if WxPic can 'see' my second config word?
The first word is at 0x8007 and the second word at 0x8008. When I hit the 'Program config word only' button it only tries to program the 0x8007 space. Possibly the definition needs some altering? I hope you can help me with this. I'm getting closer though!


Maybe can be of some help, link to the Memory Programming Specification for 16F19X chips; http://ww1.microchip.com/downloads/en/DeviceDoc/41360A.pdf



[PIC16F1937]
info1= PIC16F1937
info2= PIC16F1937
DeviceName=PIC16F1937
DeviceInfoFileName=PIC16F1937.dev
CodeMemType=1
CodeMemSize=8192
DataEEPROMSize=256
InternalRAMSize=512
AddrConfigMem=0x8000
AddrConfigWord=0x8007
AddrDataMem=0x1E000
AddrOscCalib=0xFFFFFFFF
ConfigMemUsedLocs00_1F=0x07CF
ConfigMemUsedLocs20_3F=0x0000
DeviceIdAddr=0x8006
DeviceIdMask=0x2380
DeviceIdValue=0x2382
CanRead=1
EraseAlgo=16F7x7
CodeProgAlgo=16F7x7
ConfigProgAlgo=16F7x7
DataProgAlgo=16F7x7
VppVddSequence=Vpp_before_Vdd
Ti_Clock_us=10
Ti_Prog_us=1000
Ti_Erase_us=30000
CmdLoadConfig=0x00
CmdLoadProg=0x02
CmdReadProg=0x04
CmdIncrAddr=0x06
CmdBeginProg=0x18
CmdEndProg=0x0A
CmdLoadData=0x03
CmdReadData=0x05
CmdEraseProg=0x09
CmdEraseData=0x0B
CmdEraseChip=-1
CmdBeginProgNoErase=-1
JeroenP
 
Posts: 3
Joined: 25, 2009 Oct Sun 8:49 am

Re: adding PIC16F1937 HELP!

Postby admin » 25, 2009 Oct Sun 3:09 pm

That's seems correct but I did not yet verify the programming algo for that device.
In the "Device, config" tab do you see all the expected flags? and do they correctly change when editing the second config word value. Or on the other direction, can you modify the config flags and see the config word #2 value updated?
admin
Site Admin
 
Posts: 153
Joined: 12, 2009 Jul Sun 7:20 pm

Re: adding PIC16F1937 HELP!

Postby admin » 25, 2009 Oct Sun 3:22 pm

I found these errors (but this should not be fatal):
DeviceIdMask=0x3FE0
DeviceIdValue=0x2380

And I discovered that my version of the PIC16F1937.dev file from MPLAB id incomplete: Only 2 bit-group fields are defined for the second config word while there should be 7. This makes impossible to modify those bit using symbol but that should not prevent to program them if obtained by the HEX file or set in the Hexa config word value.
admin
Site Admin
 
Posts: 153
Joined: 12, 2009 Jul Sun 7:20 pm


Return to WxPic Usage

Who is online

Users browsing this forum: No registered users and 1 guest

cron