In message <30F3D6A7.C814C748@online.ru>, Vassili Zibarov writes >Hello > >I built a programmer for 16f84 in accordance with Microchip's >programmins specs. It works fine but there is trouble with BULK ERASE >and CODE UNPROTECT sequences. They just won't work. Here is how I tried: > >Bulk Erase: >1. Enter Programming Mode >2. Perform Load all "1" (As I understood this means "Load Data for >Programm memory" command 000011 with all "1" in data field ) >3. Do "Bulk Ease Programm Memory" (thou in programming specs for 16F8X >item 2.3.1.8 refers as "Bulk Erase Test Memory". I did not find such a >command in list) >4. Do "Begin Programming" >5. Wait 10 ms > >I tried this for data memory either - no result. > >Also I followed Microchip's recomendations about disabling code protect >but I could only write the new comfiguration word using their sequence. >As for disabling code protect also - no result. > >If you can help me solve this problem and describe what are the commands >000001 and 000111? >Do they require data field or not? >Please send me right programming sequences or refer to www resources >where I can get them > >Regards >Vassili Zibarov If it's any help this is the routine (in Turbo Pascal and Delphi) that I use to erase a 16x84. I couldn't get it to work either, then someone told me to add a 'Begin Programming' command before the 'Erase' command, and that cures the problem. Const {16C84 serial programming commands} LdConf = 0; LdProg = 2; LdData = 3; RdProg = 4; RdData = 5; IncAdd = 6; BegPrg = 8; ErsPrg = 9; ErsDat = 11; Procedure EraseAll; Var i : Byte; Begin {Clear Protect fuse} ProgMode(POn); Command(LdConf); OutWord($3FFF); FOR i := 0 TO 6 Do Command(IncAdd); Command(1); Command(7); Command(BegPrg); Delay(PgmCfg[Current].Settings[DelayTime]); Command(1); Command(7); Command(BegPrg); Delay(PgmCfg[Current].Settings[DelayTime]); ProgMode(POff); {Clear Data memory} ProgMode(POn); Command(LdData); OutWord($3FFF); Command(BegPrg); Command(ErsDat); Command(BegPrg); Delay(PgmCfg[Current].Settings[DelayTime]); ProgMode(POff); {Clear Program memory} ProgMode(POn); Command(LdProg); OutWord($3FFF); Command(BegPrg); Command(ErsPrg); Command(BegPrg); Delay(PgmCfg[Current].Settings[DelayTime]); ProgMode(POff); End; -- Nigel. /--------------------------------------------------------------\ | Nigel Goodwin | Internet : nigelg@lpilsley.demon.co.uk | | Lower Pilsley | Web Page : http://www.lpilsley.demon.co.uk | | Chesterfield | | | England | | \--------------------------------------------------------------/