Tohle je spravny adresar C:\Documents and Settings\All Users\Dokumenty \Vrh2016\diskE\mikroproc02\33EV\devicefile_PICKIT\programming Postup pro devicefile PICKITa je v C:\Users\kubalik\diskE\skola\rok1314\Microchip\PICKIT_muj_1708 náš PIC je 33EV32 dsPIC33EV32GM002 EV Core FAmily 32 Program Memory kB GM0 Product Group GM = General Purpose plus Motor Control Family 02 Pin Count v devicefile je 33FJ dsPIC33FJ32GP202 FJ Flash Memory Family 3,3V 32 Program Memory kB GP2 Product Group GP2 = General Purpose family 02 Pin Count UserIDRDscript se hýbe během změn součástky u 33FJ UserIDWRscript zdá se, že EV jsou na 5V EP na 3,3V User Memory Limit Write blocks (Instruction Words) erase blocks dsPIC33EV32GMX02 0x00577E (11,200) 175 22 dsPIC33FJ32GP202 0x0057FE (11K) 176 22 0x800FFE (2K) v devicefile je 2C00 to je 57fe / 2 + 1 tak budeme doufat, ze to je stejne i u toho EV nebo lépe 5800 / 2 - to je adresa za koncem config mem u EV vychazi 2BC0 - a opravdu to tam pak vypocitalo 11200 v devicefile09 je to upraveno - ProgMEme 33FJ Locations 0xF80000 through 0xF80017 are reserved for the device Configuration registers. Locations 0xFF0000 and 0xFF0002 are reserved for the Device ID Word registers. These bits can be used by the programmer to identify which device type is being programmed. 33E Locations 0xFF0000 and 0xFF0002 are reserved for the Device ID Word registers. These bits can be used by the programmer to identify which device type is being programmed. ??? Cofiguration bytes - kouknout do MPLABX IDE dsPIC33EV32GMX02 dsPIC33FJ32GP202 Code mem konec 0x00577E Device config zac 0x005780 0xF80000 Device conf konec 0x0057FE 0xF80016 22 bytů ????? 11 registrů no, ale v DEVICEFile má FJ 8 config words, nějakou šílenou adresu a v pdf file to má zcela neodpovídající adresy DeviceID zac 0xFF0000 0xFF0000 a je to 2x16 bitů DeviceID kon takže stejně A EV má 15 konfiguračních registrů 15 devicefile je schopno nastavit jenom 8 registrů FSEC 5780 FBSLIM 5790 FOSCSEL 5798 33EP The key sequence is a specific 32-bit pattern, ‘0100 1101 0100 0011 0100 1000 0101 0001’ (more easily remembered as 4D434851h in hexadecimal). The device will enter ICSP mode only if the sequence is valid. The Most Significant bit (MSb) of the most significant nibble must be shifted in first. 33F The key sequence is a specific 32-bit pattern, ‘0100 1101 0100 0011 0100 1000 0101 0000’ (more easily remembered as 0x4D434850 in hexadecimal format). No, takže se nám to liší !!!! A to ještě nevíme, co to udělá s 33EV NEEEE - je to u obou stejne, 0x4D434850 je enhanced mod programming 0x4D434851 je normalni mod. devicefile pouziva normalni mod The SIX control code is used to send instructions to the CPU for execution and the REGOUT control code is used to read data out of the device via the VISI register. Stejné Tohle je script21 , ktery je jako ProgEntryScript u dsPIC33 Delay 100ms 500us MLCR pulse 1ms delay after first MCLR pulse for RESET sync. PIC24 code sequence 4D434851 Delay 50ms Plus extra 5 bits for 1st SIX 33FJ32GP202 je family 5 dsPIC33 ProgEntryScript je 21 a to ma code sequence 4D434851 TAKZE TO SOUHLASI S EP !!!!!!! ---------------------------------------------------------- user OTP memory 0x800F80 0x800FFE 27.2 User OTP Memory Locations, 800F80h-800FFEh, are a One-Time- Programmable (OTP) memory area. The user OTP words can be used for storing product information, such as serial numbers, system manufacturing dates, manufacturing lot numbers and other application-specific information. Takže na to se asi vykašleme ------------------------------------------- HOTOVO: ProgramMem ASi ANO, je tam jine cislo. Skouknuto 7.8.2017 Program maem je u 33FJ32GP202 11264 2C00 (2C00 - 1) * 2 je počet buněk 57FE DEVID adresy pro DEVID a REVID jsou stejne jako u 33FJ32GP202 nebudeme je tedy resit ----------------------------------------------- mov #404F, W10 mov W10, NVMCON BSET.b NVMCON+1, #7 256 NOPs ~13ms ---------------------------------------------- Porovnávám oba programovací manuály 33EV32GM002 33F entring ICSP mode normální kapitola 3.2 5.2 MCLR vyleze na VDD VIH kolik to je ???? 32 pulzu na hodinach Program/Verify Entry Code = 4D434851h Program/Verify Entry Code = 0x4D434851 taKŽE KÓD JE STEJNÝ, LIŠÍ SE TO NAPĚTÍM ALE 4. After a P7 + 5 * P1 delay, five clock pulses must be generated on the PGECx pin. strana 17 manuálu tohle je navíc 0xFF0000 DEVID adresa je stejná u obou procesoprů 33FJ32GP202 a 33EV32GM002 Tady je trochu popis devicefile C:\Documents and Settings\All Users\Dokumenty\Vrh2016 \diskE\mikroproc02\33EV\devicefile_PICKIT\rok1314\Microchip\PICkit2_PCAppSource_V2_61 -------------------- vyrabim to cele znova devicefile_07 vyrobil jsem novou z devicefile 06 , export do xml07 , zde na konec pridana nova family , 22 , family je udelana podle dsPIC33 a ukladam jako devicefile07 A TADY JSEM YATIM SKONCIL devicefile 08 je s pridanym 33EV32GM002 dsPIC33F je trochu jinak , nez potrebujeme mame jeste na vyber 30F potrebuji prog entry script s 5 pulsiky CLK za MCLR TABLE 5-10: SERIAL INSTRUCTION EXECUTION FOR READING THE APPLICATION ID WORD strana 49 33F ProgEntryscript HV 0 Standard 12V Vpp 100ms delay after entering. Drop Vpp & retake high to try entry on parts with internal MCLR & osc, and ICSP pin(s) high outputs. ProgEntryScript 21 Delay 100ms 500us MLCR pulse 1ms delay after first MCLR pulse for RESET sync. PIC24 code sequence 4D434851 Delay 50ms Plus extra 5 bits for 1st SIX FIGURE 3-2: ENTERING ICSP™ MODE NO ALE TO JE VONO !!!!!! Read DEV ID script 22 --------------- strana 350 normálního pdf 33EV32 TABLE 30-13: DC CHARACTERISTICS: PROGRAM MEMORY Word Write Cycle Time 45.78 — 48.15 µs TWW = 346 FRC cycles ????, asi přitom běží FRC oscilátor, a ten časuje zápis. Napovídaly by tomu i zmínky v pdf programování, že čas je závislý na přesnosti FRC 7.37MHz ano, dá to 47 mikrosec strana 83 84 kap 5.3.1 přečíst COMPRESSED FORMAT (RPDF = 1) 6: Not used in ICSP™ mode tím se nemusíma zabývat 11200 wordů. programuji po 2 280 milisec to je nic SET_ICSP_SPEED největší rychlost je 1 mikrosekunka na hodinách SCLK cyklus na konci má 7 instrukcí po 24 bitech to nemusíme nic testovat, to se prostě udělá - dej tam pár NOPů a je to