PDA

View Full Version : Data Programming Error at 0000



cpatnoi
- 20th May 2009, 21:19
I'm using MicroCode Sudio Plus V3.0.05, PBP 2.46A, MPASM 8.15 and an Epic plus programmer (EpicWin V2.45). This setup has worked fine for 1000's of chips that I've programed over the years. However, I am trying to use the "DATA" or "EEPROM" commands on a new project. I've cut the code down to the basic for this discussion. The code compiles but gives me a "Data Programming Error at 0000" error when programming a PIC16F628A but works fine when programming PIC16F628 chips. I have 2 NEW tubes of 25 16F628A chips and none of them will program data to the EEPROM. They work fine if the "DATA" or "EEPROM" statements are removed. I've searched the forum for 2 days but can't find an answer. The "Option" box on the EPICWin dialog box is as follows:
Program/Verify Code - On
Program/Verify Configuration - On
Program/Verify Data - On
Program/Verify Osc Cal - On
Update Configuration - On
Read File Before Programming - On
Erase Before Programming - On
Verify After Programming - On

I am able to Read and Write to EEPROM with success but the DATA or the EEPROM commands don't work. I read the PIC after I get the error message and then look at its EEPROM Data and sure enough every byte but the 1st is $FF. Hoping someone has run across this problem before and will pass on the info of what I am doing wrong.

Thanks for your time and effort.
c.patnoi



@ __config _XT_OSC & _WDT_ON & _PWRTE_ON & _MCLRE_OFF & _BODEN_ON & _LVP_OFF & _CP_OFF & _DATA_CP_OFF

DEFINE LCD_EREG PORTB ' Set LCD Enable to PortB
DEFINE LCD_EBIT 7 ' Set LCD Enable line to PortB.7
DEFINE LCD_RSREG PORTB ' Set LCD Register Select to PortB
DEFINE LCD_RSBIT 6 ' Set LCD RS line to PORTB.6

I con 254 ' Instruction prefix.
ClrLCD con 1 ' Clear-LCD instruction.
cgRAM con 64 ' Address 0 of CG RAM.
EEptr var word ' Pointer into EEPROM.
temp var byte ' Temporary byte variable.

LCDOUT I,ClrLCD
PAUSE 500

Data 1,2,3,4,5,6,7,8 ' Dummy data
'eeprom 0,[1,2,3,4,5,6,7,8] ' This doesn't work either
LCDOUT I,cgRAM

for EEptr = 0 to 7 ' Write the bit patterns
READ EEptr,temp ' to the LCD.
lcdout temp
next

LCDOUT I,ClrLCD
PAUSE 1

END

Darrel Taylor
- 20th May 2009, 23:08
When compiling the program in MCS, have you selected the 16F628A in the device drop-down box.

A program compiled for a 628, probably won't work with a 628A.
<br>

cpatnoi
- 21st May 2009, 00:28
When compiling the program in MCS, have you selected the 16F628A in the device drop-down box.

Yes, Darrel. Both Drop Down boxes have 16F628A selected. The MCS & the EPICWin. That's what's funny. Everything programs except DATA & EEPROM commands. It has programed the DATA or EEPROM for other chips in the past. I know it has programmed the 16F628 chip because I programmed one yesterday. I have a bread board sitting in front of me, using your large number program, counting up right now.

Darrel, I replaced the power supply with two 9 Volt batteries. It gave the same Data Error message. Maybe I'll rewrite the 16F628A file to the EPIC directory. It might be corrupted. I looked at it and it looked OK. Is there a setting or a file in MPASM that has to be set or could be corrupted?

Thank for the time and effort.

cpatnoi

Darrel Taylor
- 21st May 2009, 01:02
Can't see any reason off hand.

Something you might try is the latest version of meProg.exe
It works with the EPIC programmer, and has more options than EPICWIN.

Beta Software for EPIC™Programmer
http://www.melabs.com/support/progsoft.htm
<br>

cpatnoi
- 21st May 2009, 02:24
Darrel, thanks for your time and effort.

I just took a 16F628A off a production boards getting ready to ship. It had a different date code than the ones in the 2 tubes I had just received for prototyping. It worked like a champ. No problems. I should have done it 2 days ago, but I hate to touch production units. I have a call into my supplier.

I'm sorry for wasting your time.

Thanks
cpatnoi

cpatnoi
- 22nd May 2009, 03:37
Something you might try is the latest version of meProg.exe
It works with the EPIC programmer, and has more options than EPICWIN.

Beta Software for EPIC™Programmer
http://www.melabs.com/support/progsoft.htm
<br>

I down loaded the beta software, installed it and set it up with MCS. It programmed the EEPROM area with no errors.

Many thanks Darrel,

cpatnoi