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
Code:
@ __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
Bookmarks