| May-akda | Mensahe |
|---|
Kripton2035
Joined: 19 Jul 2001 Posts: 482 Helped: 15 Lokasyon: Earth
| 03 Apr 2006 8:28 Re: Project upang palitan CY7C64613 sa ICD2 | | |
|
| | predrage wrote: | Aking mga kaibigan ako ay hindi na magtagumpay sa programming ICD2_4550_BOOT_0180.BIN sa 4550. I'v tried sa buksan bin file na may winpic 800 software ngunit ito ay nabigo. Ako tryed upang buksan ito sa opsyon na "lahat ng mga file" sa "mga uri ng file" dahil walang direktang suporta para sa mga bin file. ICprog may na sumusuporta sa (para buksan ang bin files) ngunit hindi programa 4550. Sa katunayan ay walang 4550 sa aparato listahan. Ano ang dapat gawin sa susunod ako? Any suggestions? I'm just isang baguhan ngunit ako ay may mabuting ay upang makatulong. Ikinalulungkot ko tungkol sa aking masamang english. |
palitan ng pangalan ang. Bin sa. hex at winpic ay buksan ito! paminsan-minsan ng isang pulutong ng mga file ay. Bin sa katotohanan ay Intel. kulam! upang siguraduhin na, buksan ang file sa Notepad, kung ito ay naglalaman ng mga linya na nagsisimula sa ":" pagkatapos ay palitan ng pangalan sa. kulam at buksan ito sa winpic .. kung ito ay basura, pagkatapos ng isang bin2hex ay dapat na ginagamit upang buksan ito. |
|
| Bumalik sa tuktok | |
 |
narccizzo
Joined: 20 Jan 2006 Posts: 173 Helped: 4 Lokasyon: PATZCUARO, MICHOACAN, MEHIKO
| 03 Apr 2006 9:42 Re: Project upang palitan CY7C64613 sa ICD2 | | |
|
| Ang mga ito ay ang dalawang file na bin-convert sa kulam, binuksan ko na ang bin file na may IC-prog ng software at pagkatapos ay i-save ang file sa hex format, kung ka kumuha ng tumingin sa mga file na ito na maaari mong makita ang isang mababasang string "Microchip Tecnology ICD2 USB Device icd2 usb" sa address 0x0ee7 para sa boot.hex file at ang parehong string sa 0x0b8e para sa os.hex file, i Dont magkaroon ng isang disassembler upang galugarin sa mas maraming mga detalye ng mga file na ito ngunit may nagsasabi sa akin na ang mga ito ng dalawang mga file ay ang lahat na kailangan naming.
BR Narccizzo
|
|
| Bumalik sa tuktok | |
 |
Jay.slovak
Joined: 23 Mar 2006 Posts: 11
| 03 Apr 2006 11:17 Re: Project upang palitan CY7C64613 sa ICD2 | | |
|
| | narccizzo wrote: | Ang mga ito ay ang dalawang file na bin-convert sa kulam, binuksan ko na ang bin file na may IC-prog ng software at pagkatapos ay i-save ang file sa hex format, kung ka kumuha ng tumingin sa mga file na ito na maaari mong makita ang isang mababasang string "Microchip Tecnology ICD2 USB Device icd2 usb" sa address 0x0ee7 para sa boot.hex file at ang parehong string sa 0x0b8e para sa os.hex file, i Dont magkaroon ng isang disassembler upang galugarin sa mas maraming mga detalye ng mga file na ito ngunit may nagsasabi sa akin na ang mga ito ng dalawang mga file ay ang lahat na kailangan naming.
BR Narccizzo |
Sigurado ka ba na may-convert ang mga file ng tama? Kung ako i-import ang mga ito sa MPLAB, ang code ay hindi magkaroon ng kahulugan, ang lahat ng ito ay lamang ang pagpunta sa pamamagitan ng mga Programa ng memorya at paggawa ng NOPs. Walang kapaki-pakinabang ang nangyayari sa parehong Boot at OS HEXs. Kahit na config bits ay naiiba sa parehong file! |
|
| Bumalik sa tuktok | |
 |
Zedman
Joined: 13 Oct 2003 Posts: 294 Helped: 2
| 03 Apr 2006 11:19 Project upang palitan CY7C64613 sa ICD2 | | |
|
| Albert,
ang kernel driver (s) inaasahan, ang mga saypres ay magdudugtong sa iba't-ibang vid / pid kapag firt konektado, at pagkatapos ng loader sys-download ito ay Fw ito ay makipagbalitaan bilang isa pang vid / pid kaya ang iba pang mga sys talks na ito. Kami ay upang ipatupad lamang ang pangalawang isa. Iam @ trabaho kaya hindi ko dapat gawin dito inaasahan hard thinkin ' ... |
|
| Bumalik sa tuktok | |
 |
silvio
Joined: 31 Dec 2001 Posts: 800 Helped: 90
| 03 Apr 2006 11:31 Re: Project upang palitan CY7C64613 sa ICD2 | | | tags: mplab protocol icd2 saypres disassembler disassembler saypres |
|
| Hi Zedman,
it's a must to understand what's under cover. Tungkol sa CY hex file na ito ay hindi lamang isang bagay ng magandang disassembler na alam ang saypres chip, ngunit ang pagbabasa ng 436 pahina EZ-USB FX TechRefManual ito ay isang ay dapat na maunawaan kung ano ang sa ilalim ng takip. At hindi ako naniniwala ka na oras para sa mga ito. Gayon pa man, kung ikaw ay hindi pamilyar sa 8051 opcodes, sa pag-parse ng code ay aabot ng ilang oras. (Ko malalaman kung ikaw ay familar sa mga PIC) with appropiate values from CY7C64613 registers 0x7800-0x7FFF but you'll definitely end up turning the pages of TechRefManual looking for definitions. Maaari kong palitan ang lahat ng mga kaganapan ng MOV DPTR, # LXXXX sa naaangkop na halaga mula sa CY7C64613 registers 0x7800-0x7FFF ngunit maari ka talagang end up na baligtad ang mga pahina ng TechRefManual naghahanap ng kahulugan. Maliban na ito ay ilang kung gaano mahirap na magtalaga ng mga pangalan ng bits kung saan ay naka-set o malinaw sa programa hangga't sila ay hindi mapped sa SFR espasyo (na natatapos sa 0 o 8). with MOV DPTR, #EP0CS but it's difficult to say SETB HSNAK due to the above reasons. Ito ay madali para palitan MOV DPTR, # L7FB4 may MOV DPTR, # EP0CS ngunit ito ay mahirap na sabihin SETB HSNAK dahil sa sa itaas ang mga dahilan.
and EP0STAL L which are affected in the bellow code at 0x03E2. Let's kunin ang halimbawa bits HSNAK at EP0STAL L na apektado sa bellow code sa 0x03E2. | Code: | L03E2: LCALL L0FBE JNC L03EE MOV DPTR, # L7FB4 MOVX A, @ DPTR ORL A, # 01h; ilang mga uri ng SETB EP0STALL MOVX @ DPTR, A L03EE: MOV DPTR, # L7FB4 MOVX A, @ DPTR ORL A, # 02h; ilang mga uri ng SETB HSNAK MOVX @ DPTR, A Magpabasa
L0FBE: SETB C Magpabasa
|
Kunin ang para sa mga halimbawa (CP_1.asm) ang code na linya nagsisimula sa offset 0x0100 (isang subroutine mula sa tinatawag na 0x05FA), ang unang linya ng code na ginamit immediatelly bellow vector makatakip mesa Sa RAM 0x7FE9 makakahanap ka ng mga 2nd byte ng 8 bytes USB Setup ng packet data (tingnan ang pahina 215 table9-1), ibig sabihin ay bRequest larangan (tingnan ang talahanayan 9-2).
| Code: | L0100: MOV DPTR, # L7FE9 MOVX A, @ DPTR JNZ L0109 LJMP L029B; kung bRequest = GetStatus tumalon sa 0x029B L0109: Dec A JNZ L010F LJMP L0317; kung bRequest = Clear Feature, tumalon sa 0x0317 L010F: ADD A, # 0FEh JNZ L0116 LJMP L038E; kung bRequest = Itakda Feature, tumalon sa 0x038E L0116: ADD A, # 0FBh JNZ L011D LJMP L0295; kung bRequest = Kumuha Configuration, tumalon sa 0x0295 L011D: Dec A JNZ L0123 LJMP L028F; kung bRequest = Itakda Configuration, tumalon sa 0x028F L0123: Dec A JNZ L0129 LJMP L0283; kung bRequest = Kumuha Interface, tumalon sa 0x0283 L0129: Dec A JNZ L012F LJMP L0289; kung bRequest = Itakda Interface, tumalon sa 0x0289 L012F: ADD A, # 05h JZ L0136 LJMP L03E2; kung bRequest = wala sa itaas, at pagkatapos ay itakda ang bits HSNAK ; at EP0STALL ng EP0CS control & kalagayan magpatala at ; pagkatapos magpabasa sa 0x05FD ; L0136: LCALL L0F7A; kung bRequest = Kumuha descriptor, LCALL 0x0F7A na kung saan ang JC L013E; carry bit ay naka-set sa pamamagitan ng default, kaya tumalon sa 0x013E LJMP L03EE; kung sa 0x0F7A carry ay 0 sa pamamagitan ng default, i-set bit HSNAK ; ng EP0CS control & kalagayan magpatala at magpabasa sa 0x05FD ; L013E: MOV DPTR, # L7FEB; dito dahil bRequest ay isang Kumuha descriptor MOVX A, @ DPTR; kaya, i-check ang WValueH larangan ng USB Setup ng packet ADD A, # 0FEh JZ L015F; kung wValueH ay 0x02 tumalon sa 0x015F Dec A JZ L0190; kung wValueH ay 0x03 tumalon sa 0x0190 ADD A, # 02h JZ L0150; kung wValueH ay 0x01 tumalon sa 0x0150 LJMP L0279; kung wValueh ay naiiba ng alinman sa 0x01 o 0x02 o 0x03 pagkatapos ay itakda ang ; bits HSNAK at EP0STALL ng EP0CS magpatala at magpabasa sa 0x05FD ; L0150: MOV A, 0Ch; dito dahil wValueH ay 0x01, kaya load SUDPTR global USB magrehistro MOV DPTR, # L7FD4; na may halaga 0x0C0D, at pagkatapos ay itakda ang bit HSNAK ng EP0CS at magpabasa sa 0x05FD MOVX @ DPTR, A MOV A, 0Dh MOV DPTR, # L7FD5 MOVX @ DPTR, A LJMP L03EE L015F: MOV DPTR, # L7FEA; hitsura ngayon sa wValueL larangan ng USB Setup ng packet ; ; ; ; ; at kaya sa ...................
|
port2: Microchip MPLAB ICD2 Fw client O ito talahanayang lookup sa offset 0x0622 na tumutugma sa Kripton2035 port2: Microchip MPLAB ICD2 Fw client
| Code: | Mesa 5-9. Default na USB Device descriptor
RAM Halaga Offset Patlang Paglalarawan
0622 0x12 0 bLength Length ng ito descriptor = 18 bytes 0623 0x01 1 bDescriptorType descriptor Type = Device 0624 0x00 2 bcdUSB (L) USB Specification Version 1.10 (L) 0625 0x01 3 bcdUSB (H) USB Specification Version 1.10 (H) 0626 0xFF 4 bDeviceClass Device Klase (FF ay Vendor-Specific) 0627 0xFF 5 bDeviceSubClass Device Sub-Class (FF ay Vendor-Specific) 0628 0xFF 6 bDeviceProtocol Device Protocol (FF ay Vendor-Specific) 0629 0x40 7 bMaxPacketSize0 Pinakamataas Packet Size para sa EP0 = 64 bytes 062A 0xD8 8 idVendor (L) Vendor ID (L) Microchip Technology = 04D8H 062B 0x04 9 idVendor (H) Vendor ID (H) 062C 0x01 10 idProduct (L) Product ID (L) ICD2 = 8001H 062D 0x80 11 idProduct (H) Product ID (H) 062E 0x03 12 bcdDevice (L) Device Release Number (BCD, L) 062F 0x00 13 bcdDevice (H) Device Release Number (BCD, H) 0630 0x00 14 iManufacturer Manufacturer Index String = Wala 0631 0x00 15 iProduct Produkto Index String = Wala 0632 0x00 16 iSerialNumber Serial Number Index String = Wala 0633 0x01 17 bNumConfigurations Bilang ng kumpigurasyon na ito Interface = 1
Mesa 5-10. USB Default Configuration descriptor
RAM Halaga Offset Patlang Paglalarawan
0634 0x09 0 bLength Length ng ito descriptor = 9 bytes 0635 0x02 1 bDescriptorType descriptor Type = Configuration 0636 0x74 2 wTotalLength (L) Total Length (L) Kasama Interface at Endpoint Descriptors = 116 0637 0x00 3 wTotalLength (H) Total Length (H) 0638 0x01 4 bNumInterfaces Bilang ng interface sa configuration na ito 0639 0x01 5 bConfigurationValue Configuration Halaga Ginamit sa pamamagitan ng Set_Configuration Kahilingan para Piliin ito Configuration 063A 0x00 6 iConfiguration Index ng String naglalarawan ito sa configuration = Wala 063B 0x80 7 bmAttributes Katangian - Bus-Powered, Walang Wakeup 063C 0x4B 8 MaxPower Maximum Power - 150 MA
Mesa 5-11. Default na USB Interface 0, Kahaliling set 0 descriptor
RAM Halaga Offset Patlang Paglalarawan
063D 0x09 0 bLength Length ng Interface descriptor 063E 0x04 1 bDescriptorType descriptor Type = Interface 063F 0x00 2 bInterfaceNumber Zero-based Index ng Interface = 0 0640 0x00 3 bAlternateSetting Kahaliling set Halaga = 0 0641 0x0E 4 bNumEndpoints Bilang ng mga Endpoints sa Interface (Hindi bilangin EPO) = 14 0642 0xFF 5 bInterfaceClass Interface Class = Vendor Tiyak na 0643 0xFF 6 bInterfaceSubClass Interface Sub-class = Vendor Tiyak 0644 0xFF 7 bInterfaceProtocol Interface Protocol = Vendor Tiyak na 0645 0x00 8 iInterface Index sa String tagapaglarawan para sa ito Interface = Wala
Mesa 5-14. Default na Interface 0, Kahaliling set 1, Bulk Endpoint Descriptors
RAM Halaga Offset Patlang Paglalarawan
0646 0x07 0 bLength Length ng ito Endpoint descriptor 0647 0x05 1 bDescriptor Uri descriptor Type = Endpoint 0648 0x01 2 bEndpointAddress Endpoint Direksyon (1 ay nasa) at Address = OUT1 0649 0x02 3 bmAttributes XFR Type = Bulk 064A 0x40 4 wMaxPacketSize (L) Pinakamataas na Packet Size = 64 Bytes 064B 0x00 5 wMaxPacketSize (H) Pinakamataas na Packet Sukat - Mataas na 064C 0x01 6 bInterval pagboto na pagitan sa Milliseconds
064D 0x07 0 bLength Length ng ito Endpoint descriptor 064E 0x05 1 bDescriptor Uri descriptor Type = Endpoint 064F 0x02 2 bEndpointAddress Endpoint Direksyon (1 ay nasa) at Address = OUT2 0650 0x02 3 bmAttributes XFR Type = Bulk 0651 0x40 4 wMaxPacketSize (L) Pinakamataas na Packet Size = 64 Bytes 0652 0x00 5 wMaxPacketSize (H) Pinakamataas na Packet Sukat - Mataas na 0653 0x01 6 bInterval pagboto na pagitan sa Milliseconds
0654 0x07 0 bLength Length ng ito Endpoint descriptor 0655 0x05 1 bDescriptor Uri descriptor Type = Endpoint 0656 0x03 2 bEndpointAddress Endpoint Direksyon (1 ay nasa) at Address = OUT3 0657 0x02 3 bmAttributes XFR Type = Bulk 0658 0x40 4 wMaxPacketSize (L) Pinakamataas na Packet Size = 64 Bytes 0659 0x00 5 wMaxPacketSize (H) Pinakamataas na Packet Sukat - Mataas na 065A 0x01 6 bInterval pagboto na pagitan sa Milliseconds
065B 0x07 0 bLength Length ng ito Endpoint descriptor 065C 0x05 1 bDescriptor Uri descriptor Type = Endpoint 065D 0x04 2 bEndpointAddress Endpoint Direksyon (1 ay nasa) at Address = OUT4 065E 0x02 3 bmAttributes XFR Type = Bulk 065F 0x40 4 wMaxPacketSize (L) Pinakamataas na Packet Size = 64 Bytes 0660 0x00 5 wMaxPacketSize (H) Pinakamataas na Packet Sukat - Mataas na 0661 0x01 6 bInterval pagboto na pagitan sa Milliseconds
0662 0x07 0 bLength Length ng ito Endpoint descriptor 0663 0x05 1 bDescriptor Uri descriptor Type = Endpoint 0664 0x05 2 bEndpointAddress Endpoint Direksyon (1 ay nasa) at Address = OUT5 0665 0x02 3 bmAttributes XFR Type = Bulk 0666 0x40 4 wMaxPacketSize (L) Pinakamataas na Packet Size = 64 Bytes 0667 0x00 5 wMaxPacketSize (H) Pinakamataas na Packet Sukat - Mataas na 0668 0x01 6 bInterval pagboto na pagitan sa Milliseconds
0669 0x07 0 bLength Length ng ito Endpoint descriptor 066A 0x05 1 bDescriptor Uri descriptor Type = Endpoint 066B 0x06 2 bEndpointAddress Endpoint Direksyon (1 ay nasa) at Address = OUT6 066C 0x02 3 bmAttributes XFR Type = Bulk 066D 0x40 4 wMaxPacketSize (L) Pinakamataas na Packet Size = 64 Bytes 066E 0x00 5 wMaxPacketSize (H) Pinakamataas na Packet Sukat - Mataas na 066F 0x01 6 bInterval pagboto na pagitan sa Milliseconds
0670 0x07 0 bLength Length ng ito Endpoint descriptor 0671 0x05 1 bDescriptor Uri descriptor Type = Endpoint 0672 0x07 2 bEndpointAddress Endpoint Direksyon (1 ay nasa) at Address = OUT7 0673 0x02 3 bmAttributes XFR Type = Bulk 0674 0x40 4 wMaxPacketSize (L) Pinakamataas na Packet Size = 64 Bytes 0675 0x00 5 wMaxPacketSize (H) Pinakamataas na Packet Sukat - Mataas na 0676 0x01 6 bInterval pagboto na pagitan sa Milliseconds
RAM Halaga Offset Patlang Paglalarawan
0677 0x07 0 bLength Length ng ito Endpoint descriptor 0678 0x05 1 bDescriptor Uri descriptor Type = Endpoint 0679 0x81 2 bEndpointAddress Endpoint Direksyon (1 ay nasa) at Address = IN1 067A 0x02 3 bmAttributes XFR Type = Bulk 067B 0x40 4 wMaxPacketSize (L) Pinakamataas na Packet Size = 64 Bytes 067C 0x00 5 wMaxPacketSize (H) Pinakamataas na Packet Sukat - Mataas na 067D 0x01 6 bInterval pagboto na pagitan sa Milliseconds
067E 0x07 0 bLength Length ng ito Endpoint descriptor 067F 0x05 1 bDescriptor Uri descriptor Type = Endpoint 0680 0x82 2 bEndpointAddress Endpoint Direksyon (1 ay nasa) at Address = IN2 0681 0x02 3 bmAttributes XFR Type = Bulk 0682 0x40 4 wMaxPacketSize (L) Pinakamataas na Packet Size = 64 Bytes 0683 0x00 5 wMaxPacketSize (H) Pinakamataas na Packet Sukat - Mataas na 0684 0x01 6 bInterval pagboto na pagitan sa Milliseconds
0685 0x07 0 bLength Length ng ito Endpoint descriptor 0686 0x05 1 bDescriptor Uri descriptor Type = Endpoint 0687 0x83 2 bEndpointAddress Endpoint Direksyon (1 ay nasa) at Address = IN3 0688 0x02 3 bmAttributes XFR Type = Bulk 0689 0x40 4 wMaxPacketSize (L) Pinakamataas na Packet Size = 64 Bytes 068A 0x00 5 wMaxPacketSize (H) Pinakamataas na Packet Sukat - Mataas na 068B 0x01 6 bInterval pagboto na pagitan sa Milliseconds
068C 0x07 0 bLength Length ng ito Endpoint descriptor 068D 0x05 1 bDescriptor Uri descriptor Type = Endpoint 068E 0x84 2 bEndpointAddress Endpoint Direksyon (1 ay nasa) at Address = IN4 068F 0x02 3 bmAttributes XFR Type = Bulk 0690 0x40 4 wMaxPacketSize (L) Pinakamataas na Packet Size = 64 Bytes 0691 0x00 5 wMaxPacketSize (H) Pinakamataas na Packet Sukat - Mataas na 0692 0x01 6 bInterval pagboto na pagitan sa Milliseconds
0693 0x07 0 bLength Length ng ito Endpoint descriptor 0694 0x05 1 bDescriptor Uri descriptor Type = Endpoint 0695 0x85 2 bEndpointAddress Endpoint Direksyon (1 ay nasa) at Address = IN5 0696 0x02 3 bmAttributes XFR Type = Bulk 0697 0x40 4 wMaxPacketSize (L) Pinakamataas na Packet Size = 64 Bytes 0698 0x00 5 wMaxPacketSize (H) Pinakamataas na Packet Sukat - Mataas na 0699 0x01 6 bInterval pagboto na pagitan sa Milliseconds
069A 0x07 0 bLength Length ng ito Endpoint descriptor 069B 0x05 1 bDescriptor Uri descriptor Type = Endpoint 069C 0x86 2 bEndpointAddress Endpoint Direksyon (1 ay nasa) at Address = IN6 069D 0x02 3 bmAttributes XFR Type = Bulk 069E 0x40 4 wMaxPacketSize (L) Pinakamataas na Packet Size = 64 Bytes 069F 0x00 5 wMaxPacketSize (H) Pinakamataas na Packet Sukat - Mataas na 06A0 0x01 6 bInterval pagboto na pagitan sa Milliseconds
06A1 0x07 0 bLength Length ng ito Endpoint descriptor 06A2 0x05 1 bDescriptor Uri descriptor Type = Endpoint 06A3 0x87 2 bEndpointAddress Endpoint Direksyon (1 ay nasa) at Address = IN7 06A4 0x02 3 bmAttributes XFR Type = Bulk 06A5 0x40 4 wMaxPacketSize (L) Pinakamataas na Packet Size = 64 Bytes 06A6 0x00 5 wMaxPacketSize (H) Pinakamataas na Packet Sukat - Mataas na 06A7 0x01 6 bInterval pagboto na pagitan sa Milliseconds
na kung saan ay sinundan sa pamamagitan ng unicode form ng zero natapos string "Microchip Teknolohiya ICD2 USB Device"
|
Subalit kung ikaw ay makakuha ng suplado sa 4550 bin, ako maaari subukin sa tumulong sa pamamagitan ng pagdagdag ng mga puna sa CY asm file. |
|
| Bumalik sa tuktok | |
 |
Zedman
Joined: 13 Oct 2003 Posts: 294 Helped: 2
| 03 Apr 2006 17:10 Re: Project upang palitan CY7C64613 sa ICD2 | | | tags: icd2.dll |
|
| Hi Silvio,
thanks sa infos, LONG oras nakaraan ako had sa mai-parse ng bin file na darating mula sa isang eprom maliit na tilad. Hindi ko kahit wala ang processor na uri o maging ang circuit. But I had upang mahanap kung paano ito na trato sa isang memory card, at ito ay ang data. I assumed ito ay isang uri ng maliit na tilad 8051 at tried a pulutong ng disassemblers, at natapos sa isang 80C542 (i cant matandaan kung saan ang isa ay na ito eksakto) korte ko ito mula sa mga numero ng port at kung paano ang code na trato sa mga indibidwal na port mapakali. Ngunit ito ay naganap 2 linggo araw at gabi sa trabaho para sa akin, maraming ng pagbabasa / debugging / pag-aaral. Ito ang dahilan kung bakit ako pinaghahanap ng isang assembler kung ano ang kaya mong gawin ang mga bagay na nabanggit sa halip na ako ...  Thanks again Silvio.
-----------------------------
Iam masimulang naniniwala kayong lahat, ayon sa bin file. Ako ay isang pananaliksik sa ICD2 etc at napag-alaman na ito GETUSBDESCRIPTOR mga tawag at mga numero ng mga tseke sa descriptor at kung ito ay tumutugma sa mas bagong bersyon ICD2 kaysa Sumali ako sa aking mga 4550's descriptor kaysa ito ay isang send4550image tawag! At diyan din ay descriptors sa bin file na kawangis ng isang Kripton upload. Isang bagay na hindi ko maunawaan na ang dahilan kung bakit sila ay ibinibigay ang boot imahen? At bakit ICD2.dll sumusubok na i-download ang file na ito? Kung ako makakakuha ng bahay, I'll subukan na i-set ang aking descriptors upang tumugma sa isa ko na natagpuan sa bin at subukan MPLAB sa mga ito.
Sa tingin ko tayo ay nakakakuha ng mas malapit! 
Added pagkatapos ng 46 minuto:
At mayroong isang bagay mahiya sa unang btyes ng boot bin: MCHP (MiCrocHiP?) Hinanap ko na para sa mga ito, kung ito ay mamaya (pagkatapos ng load) pumapalit ang mga ito sa tunay na entry point Goto o st, ngunit sa ICD2.dll hindi.
Added pagkatapos ng 3 oras 34 minuto:
Hanapin sa ito:
Ako did what i said bago, i-set ang bersyon na numero sa mga mas bagong ito expects at MPLAB sumusubok upang ipadala ang OS! (Ng paraanin ang aking Fw ay hindi isang boot loader)
| Code: | MPLAB ICD 2 Handa Kumokonekta sa MPLAB ICD 2 ICD0289: Hindi na muling programa ICD2 USB OS firmware. ICD0021: Hindi makakonekta sa MPLAB ICD 2 MPLAB ICD 2 Handa
|
Sa anuman ang boot loader ay dapat magtrabaho, I'll subukan na gawin ang isang bagay na sa gabi. |
|
| Bumalik sa tuktok | |
 |
narccizzo
Joined: 20 Jan 2006 Posts: 173 Helped: 4 Lokasyon: PATZCUARO, MICHOACAN, MEHIKO
| 03 Apr 2006 18:43 Project upang palitan CY7C64613 sa ICD2 | | |
|
| Hi JaySlovak Hindi, Im hindi ang nananagot, ako lang binuksan ang bin at i-save ito sa hex format. |
|
| Bumalik sa tuktok | |
 |
Jay.slovak
Joined: 23 Mar 2006 Posts: 11
| 03 Apr 2006 20:45 Re: Project upang palitan CY7C64613 sa ICD2 | | |
|
| | narccizzo wrote: | Hi JaySlovak Hindi, Im hindi ang nananagot, ako lang binuksan ang bin at i-save ito sa hex format.  |
Yep, ito ay sa normal na ang string ay nababasa, lamang ang mga code ay wala |
|
| Bumalik sa tuktok | |
 |
Zedman
Joined: 13 Oct 2003 Posts: 294 Helped: 2
| 03 Apr 2006 22:25 Re: Project upang palitan CY7C64613 sa ICD2 | | | tags: icd2.dll |
|
| Mabuting balita pagkatapos ng 2 oras ng debugging,
ICD2.dll ay gumamit pareho ng bin file. Ang OS file na gustong ma-download na lamang sa mga ICD2s na may bagong produkto serial number. NGUNIT kapag ikaw baguhin ang bersyon id sa filename ng OS.bin sa * _FFFF.bin kaysa ito nagsimulang i-check ang bootloader bersyon hitsura:
| Code: | Kumokonekta sa MPLAB ICD 2 ICDWarn0062: Ang USB Boot firmware ng ICD2 ay aktibo at pagbibigay ng mga komunikasyon sa ICD2. Ang firmware ay sa labas ng petsa at ang dapat na-update. Ito ay hindi maaaring-update habang aktibo. Gayunman, kayo ay maaring magpatuloy na patakbuhin gamit ang mga kasalukuyang boot firmware kung pipiliin mo na gawin ito. Gusto mo bang magpatuloy?
|
Kung ako OO pindutin dito kaysa sa sumusubok makakonekta sa ICD2 mismo, at freezes (ako ay may lamang ang 4550-install pa). Kung ako pindutin HINDI kaysa tila ito sumusubok na i-update ito ngunit kailangan namin ng dito ng isang bootloader na ito, sa gayon ay lilitaw ang mensaheng ito:
| Code: | ICD0288: Hindi na muling programa ICD2 USB Boot firmware. ICD0021: Hindi makakonekta sa MPLAB ICD 2 MPLAB ICD 2 Handa
|
Okay guys, isip-isip-isip PAANO ang maaari naming gamitin na bin upang makakuha ng isang nagtatrabaho bootloader sa 4550!
Added matapos ang 2 minuto:
Ako din compiled ang sample bootloader sa tamang vid / PID ngunit got ang parehong bilang resulta sa aking 4550.
Added pagkatapos ng 16 minuto:
Ito ay maaaring, na hindi namin makuha ang unang unang unang:) bahagi ng bootloader na naglo-load ang unang bootloader na naglo-load ang os ...
Pagkatapos ng 5 minuto Added:
Ito ay ang oras kapag rkodaira dapat buntunan kanyang 4550 para sa mga 0 antas ng bootloader. (na may isang malaking pag-asa na ito ay hindi protektado ...)
Rkodaira kailangan namin ng IKAW |
|
| Bumalik sa tuktok | |
 |
albert22
Joined: 20 Jul 2004 Posts: 95 Helped: 3
| 03 Apr 2006 22:46 Re: Project upang palitan CY7C64613 sa ICD2 | | |
|
| Ako ay pag-aaral ng isang printout na ako ay may kasama ako ng BL010101. at hanapin ang ilang mga bagay-bagay. Mukhang na tanggapin 5 command pagdating alinman sa mula sa PSP o ang USART. 0x55 execute code simula sa 0x0010. 0x56-load kulam (ito ang isa tila sa may mas subcommands) 0x5a nagpapadala ang data 0x01 0x01 0x03 (Version ng BL????) Dalawang iba pang mga utos lamang turn sa Error at Busy Leds at hangs sa isang inffinite loop.
Ang mga sumusunod na gawain ay may kinalaman sa kung ano ang aking tinatawag na "load kulam" na utos:
Sa ibang gawain ang BL nagpapadala ang mga sumusunod na string 0x5b, "0810C9", 0x5d Iba pang mga embeded nagpapadala ng mga sagot sa sumusunod na string 0x5b, "0A000", U, 0x31, U, 0x5d. (kung saan U parang 0x31, 0x34, 0x36 at 0x37).
I didn't magkaroon ng maraming oras upang magpatuloy sa pagtatasa. Alinma'y hindi ko nakita ang USB pagmamanman na nai-post dahil Im sa isang cyber. Pero tingin ko ang data na ito ay dapat na nakaimpake sa USB komunikasyon |
|
| Bumalik sa tuktok | |
 |
Zedman
Joined: 13 Oct 2003 Posts: 294 Helped: 2
| 03 Apr 2006 23:30 Project upang palitan CY7C64613 sa ICD2 | | |
|
| Albert,
I-tsek ang mga serial comm laban sa USB, USB ay gumagamit ng isang bata labangan ang serial bagay. Mukhang ito ay gumagamit ng EP1 para sa control port (it's out at SA) at EP2 bilang data port, tanging SA (icd-> pc). |
|
| Bumalik sa tuktok | |
 |
albert22
Joined: 20 Jul 2004 Posts: 95 Helped: 3
| 05 Apr 2006 6:39 Re: Project upang palitan CY7C64613 sa ICD2 | | |
|
| Narito ang aking mga advances sa BL Walang ganoong subcommands. Ang load hex utos lamang tumatagal ang hex talaan at magsusulat ang data sa programa memory 2 bytes sa isang pagkakataon. Ito tseke para sa iba't-ibang error kasama ang hanay ng mga address. AP. upang maiwasan ang tuntong sa BL programa. Kinukumpirma ito na ang BL ay allways residente sa 877. Ang [0A000 ", U, 0x31, U]. (Ang 2nd U ay ang unang U 1) ay hindi na makikita dahil ito ay isang ulat ng error. Mali ang: masamang format, checksum, masamang address saklaw at EEPROM sumulat ng error . Ang hihintayin na gawain para sa 16 na karakter simula sa isang 0x3c ('<') at nagtatapos sa isang 0x3e ('>'). ito 16 na karakter header na naglalaman ng mga address, haba at checksum para sa data na nakasulat sa Ascii. Kung ang mga header ay tama AP. BL ang mga sagot sa "[0810C9]" Ang data cames matapos ang isang 0x7b Ang format na ito tila sa maaari iba mula sa isang Intel hex format.
Zedman. Maaaring kayo na kinikilala ng isang bagay tulad na ito sa RS232 Bukas ko Wil maging sa aking bahay at makapag-install ng hdd na i-check ang logs at makita kung ako ay maaaring ng anumang tulong. |
|
| Bumalik sa tuktok | |
 |
Zedman
Joined: 13 Oct 2003 Posts: 294 Helped: 2
| 05 Apr 2006 12:17 Re: Project upang palitan CY7C64613 sa ICD2 | | | tags: mplab protocol icd2 icd2.dll icd2w2k.sys mplbcomm.dll |
|
| Ako ay suplado sa USB bagay. At ako ay malungkot.
Hindi ko talaga alam kung ano ang dapat gawin sa susunod. Ako na ginugol ng isang pulutong ng mga oras na debugging ang icd2.dll.
Ang problema ay: hindi ko magpadala ng kahit isa byte bumalik sa MPLAB.
Kukunin ko ang magpapaliwanag kung ano ang aking nahanap na hanggang ngayon, kahit na walang tunay na interesado sa (lamang ang nais na sunggabin ang natapos bagay). (Maliban: Albert, Kripton, rkodaira, silvio at ang mga guys sa thread na ito)
Kaya, MPLAB nakikipag-usap ang mga ICD2 sa ganitong paraan:
[MPLAB -> ICD2.dll -> MPLBCOMM.dll -> icd2w2k.sys ->] --- [ICD2 aparato]
Kung pinili mo ang USB uri ng koneksyon na ito ay hilingin ang aparato descriptor mula sa ICD2 at tseke para sa mga produkto bersyon salita, kung ito ay 0x0003 kaysa sa ito ay isang Cypress base ICD2, kung ito ay 0x0010 kaysa sa ito ay isang 4550 batay isa. Kung 0x0010 natagpuan ito kaysa sa kung ano ang sinasabi ko na nai-post na bago na ang mga OS sa ICD2 ay dapat na-upgrade. Ito ay kagiliw-giliw na kung ang bersyon (0100) sa filename ng OS.bin ay binago sa FFFF kaysa ito skips ang hakbang na ito at tseke ang bootloader bersyon. Narito ako had sa patch ICD2.dll sa kumuha ito subukan na i-check ang BL.bin file masyadong bersyon, ito ay hardcoded na kahit na ito ay naka-set sa FFFF ito kostumbre subukan na mag-upgrade, na ang dahilan kung bakit ako patched ito (naka-set hardcoded FFFF sa mas mababa) kaya ngayon nagsasabi na kung ano ang aking mentoined masyadong bago: ang bl bersyon ay masyadong lumang ngunit ito ay hindi maaaring-upgrade habang ito ay aktibo.
Okay. Ko na ginawa ng isang maliit na prog mula sa mga sample bootloader, kasama ang wastong descriptors at nagsisikap upang makipag-usap sa MPLAB upang decrypt ang protocol at upang tularan ang BL sa bagong 4550 ICD2. ICD2 na Kripton ay gumagamit, (saypres version) set 7 out / SA Endpoints, ngunit ayon sa mga logs na ito ay ginagamit lamang para sa mga SA EP1 / out at EP2 para sa SA. (Ibig sabihin nito ay ang mga PC-> Device) Mukhang ito ang usb nagpapadala ng mga tiyak na utos at ang data sa pamamagitan ng EP1, at bumalik sa EP1 sa, at nagpapadala ng mga bytes readed mula sa ICD2's 877 sa pamamagitan ng magkahiwalay na endpoint EP2 in
Kapag MPLAB sumusubok na magpadala ng ika-OS.bin na mag-upgrade ang Fw os ito isyu ng isang getUSBdescriptor tumawag sa kernel driver, at nagpapadala ng isang 0x12 bytes mahaba utos gamit DeviceIOControl command. Ako debugged, ito ay matagumpay na dumating sa 4550. Kaysa sa MPLAB mga isyu ng isang GetStatus tawag, at tila ang tawag mula sa mga parameter na ito expects 0x08 bytes ng data likod. Ako magse-set up ang aking buffer sa 8 bytes, at itakda ang pagmamay-ari sa SIE. Ngunit ito ay hindi kailanman nagpapadala na 8 byte likod (ito ay hindi lilitaw sa USBMon). Basta hihintayin. Maaring may mga bagay-bagay. Siguro ko st sira ang setup ng 4550, ngunit ako tried ito sa ibang progs at ito ay gumagana, ay maaaring magpadala ng bytes likod. Kilala ko ang host ay dapat na magpadala at SA command upang hayaan ang aparato magpadala sa kung ano ang gusto. Ngunit kapag ako ay nag-debugged MBLBCOMM, Nakita ko na ang DeviceIOControl command bigo! I tought na baka ilang katalinuhan ay binuo sa. Sys file at ito ay bumaba ang packet dahil sa ito ay mali ang mga nilalaman, ngunit tingin ko ito DAPAT maging isang mas mataas na antas ng gawain. Kailan ako makakakuha ng bahay ko na i-check ang Getlasterror ng halaga.
Ang sinuman ay may anumang mga ideya kung paano ang maaari kong makita kung diyan ay isang SA packet ipinadala out, o kung paano ako maaaring dalhin sa? |
|
| Bumalik sa tuktok | |
 |
Kripton2035
Joined: 19 Jul 2001 Posts: 482 Helped: 15 Lokasyon: Earth
| 05 Apr 2006 16:59 Project upang palitan CY7C64613 sa ICD2 | | |
|
| ay maaaring dapat mong ikunekta ang isang 877 sa PSP port ng 4550 upang makita kung ano ang darating sa pamamagitan, at mga programa ng 877 kasama ang bootloader na namin? ay maaaring ang bytes ikaw ay naghihintay dumating mula sa EP2 at sa gayon ang 877?
gawin ang nais mo sa akin na magpadala ng isa pang mag-log-file ng isang tiyak na kalagayan? sa pamamagitan ng ang paraan ng ito ay sigurado na kailangan mo ng isang rokaida mag-log sa kanyang 4550 icd2 ..
PS: hindi ako interesado sa mga proyekto na .. Ako lang babae! Mayroon na akong usb icd2! |
|
| Bumalik sa tuktok | |
 |
Zedman
Joined: 13 Oct 2003 Posts: 294 Helped: 2
| 05 Apr 2006 20:08 Project upang palitan CY7C64613 sa ICD2 | | |
|
| Thanks Kripton,
Kukunin ko ang ipaalam sa inyo kapag kailangan ko ng mas maraming mga tambakan ng basura , Ito ay isang bit mas kumplikadong kaysa lamang sa pamamagitan ng pagdaan sa 877 bytes at likod, ito ay isang protocol na pambalot sa mga ito. Kung ano ang sinabi mo ay very helpful, ngunit rkodeira kostumbre sacrify kanyang bagong ICD2 ... Kung siya ay, kaysa sa mga tambakan ng basura ng mga ito ay i-update ang OS na proseso ay tukuyin ang protocol ng mabuti ... |
|
| Bumalik sa tuktok | |
 |
Kripton2035
Joined: 19 Jul 2001 Posts: 482 Helped: 15 Lokasyon: Earth
| 05 Apr 2006 22:09 Project upang palitan CY7C64613 sa ICD2 | | |
|
| | well ako Dont tingin siya sa mga pangangailangan sacrify kanyang icd2! lamang ng ilang kalungkutan sa usbmon gusto ko ay .. inaasahan namin na ang aking icd2 ay gumagana pa rin! |
|
| Bumalik sa tuktok | |
 |
albert22
Joined: 20 Jul 2004 Posts: 95 Helped: 3
| 05 Apr 2006 22:16 Re: Project upang palitan CY7C64613 sa ICD2 | | | tags: icd2 load hex command |
|
| Hindi ako makapag-install ng HHD monitor para makita ang mga logs dahil ako lamang ang may w98 sa bahay. Puwede ba kayong i-export ang isang tambakan ng basura ng OS sa isang pag-download. Txt, para sa akin? ------- Kung paano ang CY resets ang 877? Mayroong isang senyas (pin 43) sa base ng Q1 na ang mga kolektor ay MCLR. Ngunit ito ay pumunta sa isang connector na tinatawag na prog. Ako ngayon mapagtanto na ang hudyat na ito ay dapat pumunta sa 877 masyadong. Kami ay kailangan mong malaman kung aling mga USB command resets ang 877. Maaaring ito ay isa ng ang control endpoints? Dont ko alam kung ano ang function ng mga ito prog connector. ngunit ang mga dagdag na endpoints ay maaaring may kaugnayan sa mga ito. ---------- Ang isa sa mga OS ikinakarga sa ICD2 parang: ICD01020405.hex ako may tried sa disassemby ito ngunit hindi ko makuha ang disassembler na palitan ang hex address gamit ang pangalan ng registers. Ito ay tumagal ng mas maraming oras sa tayahin lumitaw paano ito gumagana. Ng isang nakawiwiling katunayan na ang code ay nagsisimula sa 0x0010. Tandaan na ang BL tawag sa address na ito sa execute command.
Ang mga BL bersyon iniulat ng mplab ay 01.01.01.00 ito goes may kabutihan sa mga BL-utos na mga sagot 01,01,01,03 --------- Walang DPot (MCP41xxxx) sa Brazilian ICD. Paano nila set Vpp? Karamihan sa mga clones ay may taning na Vpp. Ba ito ay nangangahulugan na ang mga Brazilian ICD ay isang mababang gastos at hindi I-clone ang mga bagong ICD2? I Dont isipin na microchip nagpunta para sa isang taning na vpp. Kung may iba pang paraan ng kontrolado ng vpp, bukod sa DPot ito ay kailangan firmware pagbabago ng ICD OS. Ang lumang OS ay hindi gagana sa bagong isa. Na maaaring ang dahilan na ang mga etc ay suri ang bersyon. |
|
| Bumalik sa tuktok | |
 |
Zedman
Joined: 13 Oct 2003 Posts: 294 Helped: 2
| 05 Apr 2006 22:32 Project upang palitan CY7C64613 sa ICD2 | | | tags: mplab protocol icd2 icd2w2k.sys icd2w2k download 4550 bootloader sumulat icd2w2k.sys download download icd2w2k |
|
| Hindi sa tingin namin ay dapat na pakikitungo sa anumang bagay tungkol sa circuit o protocol o ang koneksyon sa pagitan ng 877 at 4550 pa. Sa tingin ko ang LAHAT na kailangan namin ay nakasulat sa 4550 bins ibinibigay sa MPLAB. Kami ay dapat na magsulat ng isang tugmang bootloader sa icd2w2k.sys upang makuha ang OS.bin-download, at matapos na kami ay maaaring scracth ang aming mga ulo kung paano ang 877 ay konektado.
Pagkatapos ng 5 minuto Added:
Sa ICD2br ay gumagamit ng ibang uri ng maliit na tilad na bumubuo sa Vpp. Rkodaira mentoined, i-check ang post na bago. |
|
| Bumalik sa tuktok | |
 |
silvio
Joined: 31 Dec 2001 Posts: 800 Helped: 90
| 06 Apr 2006 2:36 Re: Project upang palitan CY7C64613 sa ICD2 | | | tags: icd2w2k.sys icd2w2k download 4550 bootloader write icd2w2k.sys download download icd2w2k |
|
| | Zedman wrote: | We should write a bootloader compatible with the icd2w2k.sys to get the OS.bin downloaded.
|
Yes, this is the main reason for which I said that dissasembling CY fw it's useless as long as we have the OS and BL bin file provided by Microchip. To start coding from scratch for 4550 and simulate the CY fw would be time consuming and worthless. That's I appreciate zedman's efforts.
However sometimes I can't help myself to ask this stupid question : If the BL cannot be upgraded while it's active, what was Microchip's ICD2 designers approach for upgrade ? In parallel programmer before soldering 4550 ? Or through ICSP with a clean bin image downloaded after boot block erased ? If rkodaira will find that CPB and EBTRB bits are cleared , then how can OS.bin be loaded in 4550 ? I start asking like you : why did they supplied the boot image ? Or, as Jay.slovak said "the string is readable, just the code does nothing" because it's encrypted and makes sense only for original boot code. So, the only solution is to simulate the 4550's bootloader and get the mirror bin image of OS ? |
|
| Back to top | |
 |
albert22
Joined: 20 Jul 2004 Posts: 95 Helped: 3
| 06 Apr 2006 4:36 Re: Project to replace CY7C64613 in the ICD2 | | | tags: mplab protocol icd2 |
|
| | Quote: | In ICD2br uses another kind of chip which generates the Vpp. Rkodaira mentoined, check the posts before.
| I didnt mean the MIC2175, which is a switching regulator as the MC34063. I was aiming at the DPOT and specifically to its I2C interfase because it requires the support of the firmware in the 877 to set the correct Vpp voltage. As I said before if the new ICD2 relies in other component to change the Vdd, all the firmware needs to change.
May be Rkodaira could check ithe circuit associated with pin 3 (FB) of the MIC2172 to see if vpp can be controlled or it is fixed.
Let me make my statement a little clear. If the Brazilian ICD has no control of Vpp it is highly probable that it is just a clone. In that case there is no warranty that the real new ICD2 is based on a 4550 and a 877. It could be just a 4450 alone for example (why not) in that case the following statement would not be true. | Quote: | | I think ALL we need is written in the 4550 bins supplied with MPLAB. | As we dont know for sure the arquitecture of the new ICD we need to emulate the CY. However chances are that the 4550BINs will still be usefull to solve the USB protocol. I tried to disassemble it today but found nothing coherent yet.
To the question: | Quote: | | why did they supplied the boot image ? | They supplied the BL010101.hex which needs to be programmed at the factory for the ICD to work.[/quote] |
|
| Back to top | |
 |
Zedman
Joined: 13 Oct 2003 Posts: 294 Helped: 2
| 06 Apr 2006 11:48 Re: Project to replace CY7C64613 in the ICD2 | | | tags: icd2 load hex command |
|
| Silvio,
the BL cannot be upgraded thing was a little trick. Actually MPLAB is set to check the BL's version against 0xFFFF, and if 0xFFFF (it's only a word) is lower than it will try to upgrade the bootloader. So it wont ever get here, because larger number than 0xFFFF cannot be set on a word. So I patched it to skip this test and try to do it, but anyway it's a BUILT IN function in MPLAB! It CAN update the boot image too. I just patched the version check out. But think: it's not accidentaly set to 0xFFFF, they may not want to use this function yet. According to the OS.bin file, if the product version is 0x0010 than it's downloaded all the time. Maybe 0x0010 is the BL's version only, and set to lower when OS will run in it! The OS.bin's version is also checked against 0xFFFF. If it's equals to 0xFFFF it's starts the checking for the BOOT.bin file as I mentoined above.
I'll check how it handles the active check when it complains about "it cannot be upgraded while active".
Another strange thing is if the original bootloader handles the decryption of the OS.bin image, than it will be a nice thing to clone... Anyway there is no processing on the .bin files in the software as I saw.
the DeviceIOControl command returns 0x57: The parameter is incorrect. (ERROR_INVALID_PARAMETER)
If we get the OS.bin downloaded than we can read it back with another icd2 and see how it works.
Albert,
they wont change the 877 firmware. They have a lot of hexs supplied with MPLAB should work with both versions. They may do minor changes, but thats all. Sorry I misunderstood that DPOT thing. The question "Why they supplied the boot image?" I asked was for the 4550_boot.bin file. |
|
| Back to top | |
 |
rkodaira
Joined: 08 Jun 2004 Posts: 332 Helped: 54 Location: Sao Paulo - Brasil
| 06 Apr 2006 14:19 Re: Project to replace CY7C64613 in the ICD2 | | |
|
| Hi guys !
Bad news. I could not install the USB monitor in my PC with Windows98SE, because it doesnīt accept to be installed. I think it (if installed) wouldnīt make any damage to my ICD2, but i could not test it.
About the Vpp control, I think that there is only the high voltage generator for Vpp and there is another way to control this voltage. I donīt know if the DG411 has this role, and there is a power mosfet also in the circuit.
I donīt think my clone is the new ICD2 from Microchip. I suppose the local manufacturer only made a clone using more available parts and making some changes in the firmware to adequate the new parts. Sorry I cannot make any attempt to read the 18F4550 contents.
Added after 15 minutes:
One more thing:
I tried to build the PICKIT2 programmer (onlu the basic part: the PIC, crystal and some connections) some weeks ago. It has the schematic and "all" the software available for download in the Microchip pages. I bought some 18F2550 and programmed with the firmware provided. I installed the programmer software and connected the hardware to the USB port. The PC recognized it once but the software did not. I think that there is something missing in the package, that blocks the programmer to communicate with the software. Could be the same case be happening with the hex files provided for the ICD2 ? Or in other words: Microchip doesīt provide the complete code for the ICD2. |
|
| Back to top | |
 |
albert22
Joined: 20 Jul 2004 Posts: 95 Helped: 3
| 06 Apr 2006 18:26 Re: Project to replace CY7C64613 in the ICD2 | | |
|
| Please Can somebody export to .txt the USB log files captured by HDD monitor? I cannot install this soft at my home. Otherwise Ill have to wait until next week to read them on my PC at work. I am now studying the protocol between the CY and the 877 OS. If they are too big. A connect log, and a program log would be nice. Thanks |
|
| Back to top | |
 |
Kripton2035
Joined: 19 Jul 2001 Posts: 482 Helped: 15 Location: Earth
| 06 Apr 2006 19:31 Re: Project to replace CY7C64613 in the ICD2 | | |
|
| | rkodaira wrote: | Hi guys ! Bad news. I could not install the USB monitor in my PC with Windows98SE, because it doesnīt accept to be installed. I think it (if installed) wouldnīt make any damage to my ICD2, but i could not test it.
|
may be you can try this one : they say it works under w98... http://www.perisoft.net/bushound/
zedman needs a log of a real 4550... my cypress clone doesnt give all he needs... |
|
| Back to top | |
 |
Zedman
Joined: 13 Oct 2003 Posts: 294 Helped: 2
| 06 Apr 2006 20:14 Project to replace CY7C64613 in the ICD2 | | |
|
| | It can be exported from USBMon to HTML format, but I have only serial ICD2. |
|
| Back to top | |
 |
Brem
Joined: 06 Apr 2006 Posts: 36
| 06 Apr 2006 20:22 Re: Project to replace CY7C64613 in the ICD2 | | | tags: mplab protocol icd2 icd2 load hex command |
|
| Hi group,
Zedman drew my attention to this thread. I find it very interesting.
Last winter my hobby project was to build an ICD clone on a 2455/2550. I used the CDC firmware for RS232 emulation to connect to MPLAB. I disassambled the 877 firmware and made it more readable with a VB program. As far as I can tell the protocol CY<->877 and the protocol RS232<->877 are the same. There are no USB specific things in the 877 firmware.
I'll try to explain what I learned of the protocol.
MPLAB starts a connection by sending a 'Z'. ICD should reply with some kind of version nr in binary: 0x01,0x01,0x03.
Now MPLAB sends a 'V' if it wants to connect to the bootloader, ICD should reply with a 'v' 'U' if it wants to connect to the OS, ICD should reply 'u'
Next is the version of the ICD hardware, this has to be compatible with the old ICD1, so its different from all other commands: MPLAB send '$7F00\r', ICD replies '02' for ICD2
From here on all commands are send in packets in the form: '<', packet len, command, [params], checksum, '>' all items are sent in hex, packet length is including the <>. An example: '<0801C9>', len=8, cmd=1 (GETFIRMWAREVERSION), no params, checksum=0xC9
Reply's to commands are in the same form, except packed in []. Reply to the above example would be: '[0E0102630102]', len=14, cmd=1 (GETFIRMWAREVERSION), param 2.99.1, checksum=0x02.
Large chunks of data are sent in {} packets : {data [,data..], checksum}. For example the write program command: MPLAB: <184300005DC000000120FF>, len 24, cmd=0x43 (WRITEPROGRAM), program size= 0x05DC, start address=0x0120, checksum = 0xFF ICD: [0843CF], len 8, cmd 0x43, checksum 0xCF MPLAB: {FF3FFF3F.....3C} , data data data.., checksum-0x3C ICD: [0843CF], ack cmd 0x43 again
I used the information from this thread to connect my existing program with the real ICD USB Driver. I got so far that I receive the GETFIRMWAREVERSION command, but my response seems not to be understood. It sends the same command again and then hangs (?) . |
|
| Back to top | |
 |
albert22
Joined: 20 Jul 2004 Posts: 95 Helped: 3
| 06 Apr 2006 23:17 Re: Project to replace CY7C64613 in the ICD2 | | |
|
| | Quote: | | It can be exported from USBMon to HTML format, but I have only serial ICD2. | Zedman may be you can open the log files that had been posted here and export them to html. No need to have the USB ICD2.
Brem, Great. I was just at the routines that handle connection with the ICD once the OS is loaded. Thanks. |
|
| Back to top | |
 |
Zedman
Joined: 13 Oct 2003 Posts: 294 Helped: 2
| 06 Apr 2006 23:29 Re: Project to replace CY7C64613 in the ICD2 | | | tags: mplbcomm.dll |
|
| Hey Brem!
nice to see you here! Thanks for the infos on the protocol.
| Quote: | I used the information from this thread to connect my existing program with the real ICD USB Driver. I got so far that I receive the GETFIRMWAREVERSION command, but my response seems not to be understood. It sends the same command again and then hangs (?) .
|
would you please explain this a bit more? What's that mean you response is not understood? You got an usb packet starting with 0x01, replied it succesfully and just the content was wrong?
Please explain this, because as you can see from the thread Iam stuck with the replying. 
-------------------
Iam now trying an alternate way to **** with the replying thing, I wrote a small program in Delphi to test if the reply works, getting the same results yet but it's faster than switching the programmer in mplab while using it too.
here is the proc (values got from disassembled/debugged MPLBCOMM.dll): | Code: | procedure TForm1.Button1Click(Sender: TObject); var hnd: cardinal; InBuffer: array[0..3] of byte; OutBuffer: array[0..17] of byte; bytesReturned: cardinal; a: integer; begin hnd:=CreateFile('\\.\i3kmc-0', $C0000000, 2, 0, 3, 0, 0);
if hnd <> INVALID_HANDLE_VALUE then begin // get usb descriptor for a:=0 to 3 do InBuffer[a]:=0; for a:=0 to 17 do OutBuffer[a]:=0; bytesReturned:=0; if (DeviceIoControl(hnd, $0A4122404, @InBuffer, 4, @OutBuffer, $12, bytesReturned, nil)) then begin Memo1.Lines.Add('1 OK'); end;
// write command for a:=0 to 3 do InBuffer[a]:=0; for a:=0 to 17 do OutBuffer[a]:=0; bytesReturned:=0; OutBuffer[0]:=3; if (DeviceIoControl(hnd, $0A4122451, @InBuffer, 4, @OutBuffer, $12, bytesReturned, nil)) then begin Memo1.Lines.Add('2 OK'); end;
// get status for a:=0 to 3 do InBuffer[a]:=0; for a:=0 to 17 do OutBuffer[a]:=0; bytesReturned:=0; InBuffer[0]:=7; if (DeviceIoControl(hnd, $0A412244E, @InBuffer, 4, @OutBuffer, 0, bytesReturned, nil)) then begin Memo1.Lines.Add('3 OK'); end; Memo1.Lines.Add('- done.'); end; end;
|
the 3rd DeviceIOControl returns failed.
I can't even remeber how my wife look like... |
|
| Back to top | |
 |
Brem
Joined: 06 Apr 2006 Posts: 36
| 07 Apr 2006 0:31 Re: Project to replace CY7C64613 in the ICD2 | | |
|
| Hi Zedman,
Besides some recognizable data like the 'Z', the 'U' and <0801C9>, I receive packets I don't understand. They are all 18 bytes long, 1st char is 0x00,0x01 or 0x02, 2nd char seems to be some kind of seq.nr, 3rd byte a length.
First packet received is: HOST->DEV: 02 C1 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 I reply with 8 x 0 DEV->HOST: 00 00 00 00 00 00 00 00 00 Second packet received is: HOST->DEV: 01 C2 01 00 00 00 00 00 00 00 C9 00 00 00 00 00 00 00 Here the first byte 0x01 seems to mean "data incoming", 3rd bytes undicates length. I dont send reply on this packet. Next rcvd is a singe 'Z', I reply with the hardware version HOST->DEV: 5A DEV->HOST: 01 01 03 Next again a packet starting with 0x02, same reply HOST->DEV: 02 C1 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 DEV->HOST: 00 00 00 00 00 00 00 00 00 then a "data incoming" packet folowed by a 'U', connect to OS HOST-DEV: 01 C2 01 00 00 00 00 00 00 00 C9 00 00 00 00 00 00 00 HOST-DEV: 55 Now MPLAB seems to want 8 bytes so I send a 'u' with 7 zeros DEV->HOST: 75 00 00 00 00 00 00 00
Now comes the tricky part. A packet starting with 0x02 means MPLAB wants data on EP2. HOST-DEV: 02 C3 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 DEV-HOST (on EP2!!): 75 DEV-HOST (on EP1): 00 00 00 00 00 00 00 00
And here I get stuck at the moment. MPLAB sends a <0801C9> but my response is ignored. I think from here on the ICD should send all data over EP2. |
|
| Back to top | |
 |
Zedman
Joined: 13 Oct 2003 Posts: 294 Helped: 2
| 07 Apr 2006 10:51 Project to replace CY7C64613 in the ICD2 | | |
|
| Brem,
Iam a lamer. PLEASE TELL ME how do you reply? How the hell does it work for you? What am I missing? If I set up the shared ram with 0s set the Cnt to 8 and set UOWN bit to SIE, MPLAB wont send me ANY more data, and UOWN never get cleared!! But from this I see u managed it to work!!!
HELP ME PLEASE!
| Code: | HOST->DEV: 02 C1 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 I reply with 8 x 0 DEV->HOST: 00 00 00 00 00 00 00 00 00
|
|
|
| Back to top | |
 |