MCUmall EPROM BIOS Chip Burner Forum
MCUmall EPROM BIOS Chip Burner Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 MCUmall Forums
 TOP USB Programmer
 top2004 and pic16f84a + EAccess Violation
 Forum Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

oozelot

Italy
4 Posts

Posted - 03/18/2009 :  10:15:13  Show Profile
For a long time I used icprog to program my 16f84a pic, now I've bought a top2004 and I don't understand one thing.
When I try to program the flash datas are corrects but I'got some problem on eeprom datas
For example this is correct eeprom data
02 02 02 00 01 04 07 07

This is what I find on pic eeprom
02 00 02 00 02 00 00 00 01 00 04 00

I understand that the program read the hex in the same way as it is
:104200000200020002000000010004000700070095
:104210000300080001000000070003000100040083

Maybe I've to set something on setting1 increment but I don't understand how.
Thanks


Edited by - oozelot on 03/20/2009 08:28:41
Reply #1

ZLM

2945 Posts

Posted - 03/19/2009 :  00:16:10  Show Profile
Looks like a software bug.
Go to Top of Page
Reply #2

oozelot

Italy
4 Posts

Posted - 03/20/2009 :  08:37:21  Show Profile
To fix two bugs :)
I make one (two patches)
I don't know if is it possible to give the link on my page web

This is the read me
If it is allowed and someone is interested I will write the link (it is free of course)

1) Sometimes when topwin is opening you can find the error message
E ACCESS VIOLATION
This is due to a cfg file created by topwin.

2) Topwin has a bug when it reads the data eeprom of microchip pic.
Infact, topwin reads the data byte as opcode byte, for example

This is a opcode line
:10 000000 3E29 1007 8207 3F34 4834 5234 5B34 6334 4E
Topwin reads correctly the opcodes byte (4 units)
(3e29 1007 etc)

But this is a dataeprom line
:10 420000 0100 0200 0300 0400 0500 0600 0700 0800 8A

the correct way to read this data is:
01 02 03 04 05 06 07 08 (2 units)

Topwin reads in a wrong way
01 00 02 00 03 00 04 00 05 00 06 00 07 00 08 00
----
How to resolve.
a) Intall topwinen in default path (c:\top\topwinen\)

b) copy opentopwin.exe into topwinwn folder

c) create a opentopwin.exe link and copy it where you want (for ex. into start program folder)
If you use this exe to open topwin you'd resolve the problem 1 (see below to explication)

d) to resolve the problem 2 follow the same steps (point "c" it is not obligatory),
copy Patc_ee_TW.exe into topwinen folder create a link and put it where you want.

e) using Patc_ee_TW.exe you can charge a hex file (for pic) and you will find
another file hex (in the same folder of first file hex) called like this
topwin_dd_mm_yy-hh_mm_ss_oldname.HEX

f) it is possible to open topwin using the special icon directly from Patc_ee_TW.exe

------
How they work

Both are vb6 programs

**opentopwin.exe**

is very simple

just few lines of code

>>>>>>>>>>>>>>>>>>>>>>>>
Private Sub Form_Load()
Dim Ritorno As Long
On Error Resume Next
Kill (App.Path & "\top2004.cfg") <<<< delete the file cfg

Ritorno = Shell("c:\top\topwinen\topwinen.exe", vbNormalFocus) <<<<< open topwinen
If Ritorno = 0 Then MsgBox "Si è verificato un errore nell'apertura", vbCritical + vbOKOnly, "Errore!"
Unload Me
End Sub
>>>>>>>>>>>>>>>>>>>>>>>>


** Patc_ee_TW.exe **
Read the hex file and copy the opcodes lines to another hex file.
When it finds eeprom data save only the valid ones.
Then using valid data it makes new hex line and find a new checksum byte.
For ex.

EEpom data lines of original hex
:02400E00F23F7F << config bit
:10420000010002000300040005000600070008008A
:1042100009000A000B000C000D000E000F0010003A
:1042200011001200130014001500160017001800EA
:1042300019001A001B001C001D001E001F0020009A
:10424000AA00BB00CC00FF00FF00FF00FF00FF0042
:10425000FF00FF00FF00FF00FF00FF00FF00FF0066
:10426000FF00FF00FF00FF00FF00FF00FF00FF0056
:10427000FF00FF00FF00FF00FF00FF00FF00FF0046
:00000001FF << ending string


EEpom data lines of modify hex
:02400E00F23F7F << config bit
:104200000102030405060708090A0B0C0D0E0F10DB
:104210001112131415161718191A1B1C1D1E1F20D9
:10422000AABBCCFFFFFFFFFFFFFFFFFFFFFFFFFFCF
:10423000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC9
:00000001FF << ending string

In this way because of topwin reads all bytes you will find the data eeprom bytes in correct location.


Tested up pic 16f84a but should works in several kinds of microchip's pics

Edited by - oozelot on 03/20/2009 08:42:57
Go to Top of Page
  Previous Topic Topic Next Topic  
 Forum Locked
 Printer Friendly
Jump To:
MCUmall EPROM BIOS Chip Burner Forum © Copyright 2003 - 2009 Mcumall Electronics Inc. Go To Top Of Page
Generated in 0.08 sec. Snitz Forums 2000