Kripton2035
Advanced Member level 4
- Joined
- Jul 19, 2001
- Messages
- 1,184
- Helped
- 212
- Reputation
- 428
- Reaction score
- 194
- Trophy points
- 1,353
- Location
- Western Europe
- Activity points
- 8,207
predrage said:My friends i didn't succeed in programming ICD2_4550_BOOT_0180.BIN into 4550. I'v
tried to open bin file with winpic 800 software but it failed. I tryed to open it with option "all files" in "file types" because there is no direct support for bin files. ICprog have that support (to open bin files) but can't program 4550. In fact there is no 4550 in device list. What should i do next? Any suggestions? I'm just a beginner but I have good will to help.
Sorry about my bad english.
narccizzo said:These are the two files bin converted into hex, i've opened the bin files with the
ic-prog software then i save the files in hex format, if you take a look to these files you can see a readable string "Microchip Tecnology ICD2 USB Device icd2 usb" in the address 0x0ee7 for the boot.hex file and the same string in the 0x0b8e for the
os.hex file, i dont have a disassembler to explore in more detail this files but something tells me that these two files are all that we need.
BR
Narccizzo
L03E2: LCALL L0FBE
JNC L03EE
MOV DPTR,#L7FB4
MOVX A,@DPTR
ORL A,#01h ;some kind of SETB EP0STALL
MOVX @DPTR,A
L03EE: MOV DPTR,#L7FB4
MOVX A,@DPTR
ORL A,#02h ;some kind of SETB HSNAK
MOVX @DPTR,A
RET
L0FBE: SETB C
RET
L0100: MOV DPTR,#L7FE9
MOVX A,@DPTR
JNZ L0109
LJMP L029B ;if bRequest = GetStatus jump to 0x029B
L0109: DEC A
JNZ L010F
LJMP L0317 ;if bRequest = Clear Feature, jump to 0x0317
L010F: ADD A,#0FEh
JNZ L0116
LJMP L038E ;if bRequest = Set Feature, jump to 0x038E
L0116: ADD A,#0FBh
JNZ L011D
LJMP L0295 ;if bRequest = Get Configuration, jump to 0x0295
L011D: DEC A
JNZ L0123
LJMP L028F ;if bRequest = Set Configuration, jump to 0x028F
L0123: DEC A
JNZ L0129
LJMP L0283 ;if bRequest = Get Interface, jump to 0x0283
L0129: DEC A
JNZ L012F
LJMP L0289 ;if bRequest = Set Interface, jump to 0x0289
L012F: ADD A,#05h
JZ L0136
LJMP L03E2 ;if bRequest = none of the above, then set bits HSNAK
;and EP0STALL of EP0CS control & status register and
;then RET at 0x05FD
;
L0136: LCALL L0F7A ;if bRequest = Get Descriptor, LCALL 0x0F7A where
JC L013E ;carry bit is set by default, so jump to 0x013E
LJMP L03EE ;if at 0x0F7A carry would be 0 by default, set bit HSNAK
;of EP0CS control & status register and RET at 0x05FD
;
L013E: MOV DPTR,#L7FEB ;here because bRequest was a Get Descriptor
MOVX A,@DPTR ;thus, check the WValueH field of USB SETUP packet
ADD A,#0FEh
JZ L015F ;if wValueH was 0x02 jump to 0x015F
DEC A
JZ L0190 ;if wValueH was 0x03 jump to 0x0190
ADD A,#02h
JZ L0150 ;if wValueH was 0x01 jump to 0x0150
LJMP L0279 ;if wValueh is different of either 0x01 or 0x02 or 0x03 then set
;bits HSNAK and EP0STALL of EP0CS register and RET at 0x05FD
;
L0150: MOV A,0Ch ;here because wValueH was 0x01, so load SUDPTR global USB register
MOV DPTR,#L7FD4 ;with value 0x0C0D, then set bit HSNAK of EP0CS and RET at 0x05FD
MOVX @DPTR,A
MOV A,0Dh
MOV DPTR,#L7FD5
MOVX @DPTR,A
LJMP L03EE
L015F: MOV DPTR,#L7FEA ;look now at wValueL field of USB SETUP packet
;
;
;
;
;and so on...................
Table 5-9. USB Default Device Descriptor
RAM Value Offset Field Description
0622 0x12 0 bLength Length of this 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 Class (FF is Vendor-Specific)
0627 0xFF 5 bDeviceSubClass Device Sub-Class (FF is Vendor-Specific)
0628 0xFF 6 bDeviceProtocol Device Protocol (FF is Vendor-Specific)
0629 0x40 7 bMaxPacketSize0 Maximum Packet Size for 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 = None
0631 0x00 15 iProduct Product Index String = None
0632 0x00 16 iSerialNumber Serial Number Index String = None
0633 0x01 17 bNumConfigurations Number of Configurations in this Interface = 1
Table 5-10. USB Default Configuration Descriptor
RAM Value Offset Field Description
0634 0x09 0 bLength Length of this Descriptor = 9 bytes
0635 0x02 1 bDescriptorType Descriptor Type = Configuration
0636 0x74 2 wTotalLength (L) Total Length (L) Including Interface and Endpoint Descriptors = 116
0637 0x00 3 wTotalLength (H) Total Length (H)
0638 0x01 4 bNumInterfaces Number of Interfaces in this Configuration
0639 0x01 5 bConfigurationValue Configuration Value Used by Set_Configuration Request to Select this Configuration
063A 0x00 6 iConfiguration Index of String Describing this Configuration = None
063B 0x80 7 bmAttributes Attributes - Bus-Powered, No Wakeup
063C 0x4B 8 MaxPower Maximum Power - 150 mA
Table 5-11. USB Default Interface 0, Alternate Setting 0 Descriptor
RAM Value Offset Field Description
063D 0x09 0 bLength Length of the Interface Descriptor
063E 0x04 1 bDescriptorType Descriptor Type = Interface
063F 0x00 2 bInterfaceNumber Zero-based Index of this Interface = 0
0640 0x00 3 bAlternateSetting Alternate Setting Value = 0
0641 0x0E 4 bNumEndpoints Number of Endpoints in this Interface (Not Counting EPO) = 14
0642 0xFF 5 bInterfaceClass Interface Class = Vendor Specific
0643 0xFF 6 bInterfaceSubClass Interface Sub-class = Vendor Specific
0644 0xFF 7 bInterfaceProtocol Interface Protocol = Vendor Specific
0645 0x00 8 iInterface Index to String Descriptor for this Interface = None
Table 5-14. Default Interface 0, Alternate Setting 1, Bulk Endpoint Descriptors
RAM Value Offset Field Description
0646 0x07 0 bLength Length of this Endpoint Descriptor
0647 0x05 1 bDescriptor Type Descriptor Type = Endpoint
0648 0x01 2 bEndpointAddress Endpoint Direction (1 is in) and Address = OUT1
0649 0x02 3 bmAttributes XFR Type = BULK
064A 0x40 4 wMaxPacketSize (L) Maximum Packet Size = 64 Bytes
064B 0x00 5 wMaxPacketSize (H) Maximum Packet Size - High
064C 0x01 6 bInterval Polling Interval in Milliseconds
064D 0x07 0 bLength Length of this Endpoint Descriptor
064E 0x05 1 bDescriptor Type Descriptor Type = Endpoint
064F 0x02 2 bEndpointAddress Endpoint Direction (1 is in) and Address = OUT2
0650 0x02 3 bmAttributes XFR Type = BULK
0651 0x40 4 wMaxPacketSize (L) Maximum Packet Size = 64 Bytes
0652 0x00 5 wMaxPacketSize (H) Maximum Packet Size - High
0653 0x01 6 bInterval Polling Interval in Milliseconds
0654 0x07 0 bLength Length of this Endpoint Descriptor
0655 0x05 1 bDescriptor Type Descriptor Type = Endpoint
0656 0x03 2 bEndpointAddress Endpoint Direction (1 is in) and Address = OUT3
0657 0x02 3 bmAttributes XFR Type = BULK
0658 0x40 4 wMaxPacketSize (L) Maximum Packet Size = 64 Bytes
0659 0x00 5 wMaxPacketSize (H) Maximum Packet Size - High
065A 0x01 6 bInterval Polling Interval in Milliseconds
065B 0x07 0 bLength Length of this Endpoint Descriptor
065C 0x05 1 bDescriptor Type Descriptor Type = Endpoint
065D 0x04 2 bEndpointAddress Endpoint Direction (1 is in) and Address = OUT4
065E 0x02 3 bmAttributes XFR Type = BULK
065F 0x40 4 wMaxPacketSize (L) Maximum Packet Size = 64 Bytes
0660 0x00 5 wMaxPacketSize (H) Maximum Packet Size - High
0661 0x01 6 bInterval Polling Interval in Milliseconds
0662 0x07 0 bLength Length of this Endpoint Descriptor
0663 0x05 1 bDescriptor Type Descriptor Type = Endpoint
0664 0x05 2 bEndpointAddress Endpoint Direction (1 is in) and Address = OUT5
0665 0x02 3 bmAttributes XFR Type = BULK
0666 0x40 4 wMaxPacketSize (L) Maximum Packet Size = 64 Bytes
0667 0x00 5 wMaxPacketSize (H) Maximum Packet Size - High
0668 0x01 6 bInterval Polling Interval in Milliseconds
0669 0x07 0 bLength Length of this Endpoint Descriptor
066A 0x05 1 bDescriptor Type Descriptor Type = Endpoint
066B 0x06 2 bEndpointAddress Endpoint Direction (1 is in) and Address = OUT6
066C 0x02 3 bmAttributes XFR Type = BULK
066D 0x40 4 wMaxPacketSize (L) Maximum Packet Size = 64 Bytes
066E 0x00 5 wMaxPacketSize (H) Maximum Packet Size - High
066F 0x01 6 bInterval Polling Interval in Milliseconds
0670 0x07 0 bLength Length of this Endpoint Descriptor
0671 0x05 1 bDescriptor Type Descriptor Type = Endpoint
0672 0x07 2 bEndpointAddress Endpoint Direction (1 is in) and Address = OUT7
0673 0x02 3 bmAttributes XFR Type = BULK
0674 0x40 4 wMaxPacketSize (L) Maximum Packet Size = 64 Bytes
0675 0x00 5 wMaxPacketSize (H) Maximum Packet Size - High
0676 0x01 6 bInterval Polling Interval in Milliseconds
RAM Value Offset Field Description
0677 0x07 0 bLength Length of this Endpoint Descriptor
0678 0x05 1 bDescriptor Type Descriptor Type = Endpoint
0679 0x81 2 bEndpointAddress Endpoint Direction (1 is in) and Address = IN1
067A 0x02 3 bmAttributes XFR Type = BULK
067B 0x40 4 wMaxPacketSize (L) Maximum Packet Size = 64 Bytes
067C 0x00 5 wMaxPacketSize (H) Maximum Packet Size - High
067D 0x01 6 bInterval Polling Interval in Milliseconds
067E 0x07 0 bLength Length of this Endpoint Descriptor
067F 0x05 1 bDescriptor Type Descriptor Type = Endpoint
0680 0x82 2 bEndpointAddress Endpoint Direction (1 is in) and Address = IN2
0681 0x02 3 bmAttributes XFR Type = BULK
0682 0x40 4 wMaxPacketSize (L) Maximum Packet Size = 64 Bytes
0683 0x00 5 wMaxPacketSize (H) Maximum Packet Size - High
0684 0x01 6 bInterval Polling Interval in Milliseconds
0685 0x07 0 bLength Length of this Endpoint Descriptor
0686 0x05 1 bDescriptor Type Descriptor Type = Endpoint
0687 0x83 2 bEndpointAddress Endpoint Direction (1 is in) and Address = IN3
0688 0x02 3 bmAttributes XFR Type = BULK
0689 0x40 4 wMaxPacketSize (L) Maximum Packet Size = 64 Bytes
068A 0x00 5 wMaxPacketSize (H) Maximum Packet Size - High
068B 0x01 6 bInterval Polling Interval in Milliseconds
068C 0x07 0 bLength Length of this Endpoint Descriptor
068D 0x05 1 bDescriptor Type Descriptor Type = Endpoint
068E 0x84 2 bEndpointAddress Endpoint Direction (1 is in) and Address = IN4
068F 0x02 3 bmAttributes XFR Type = BULK
0690 0x40 4 wMaxPacketSize (L) Maximum Packet Size = 64 Bytes
0691 0x00 5 wMaxPacketSize (H) Maximum Packet Size - High
0692 0x01 6 bInterval Polling Interval in Milliseconds
0693 0x07 0 bLength Length of this Endpoint Descriptor
0694 0x05 1 bDescriptor Type Descriptor Type = Endpoint
0695 0x85 2 bEndpointAddress Endpoint Direction (1 is in) and Address = IN5
0696 0x02 3 bmAttributes XFR Type = BULK
0697 0x40 4 wMaxPacketSize (L) Maximum Packet Size = 64 Bytes
0698 0x00 5 wMaxPacketSize (H) Maximum Packet Size - High
0699 0x01 6 bInterval Polling Interval in Milliseconds
069A 0x07 0 bLength Length of this Endpoint Descriptor
069B 0x05 1 bDescriptor Type Descriptor Type = Endpoint
069C 0x86 2 bEndpointAddress Endpoint Direction (1 is in) and Address = IN6
069D 0x02 3 bmAttributes XFR Type = BULK
069E 0x40 4 wMaxPacketSize (L) Maximum Packet Size = 64 Bytes
069F 0x00 5 wMaxPacketSize (H) Maximum Packet Size - High
06A0 0x01 6 bInterval Polling Interval in Milliseconds
06A1 0x07 0 bLength Length of this Endpoint Descriptor
06A2 0x05 1 bDescriptor Type Descriptor Type = Endpoint
06A3 0x87 2 bEndpointAddress Endpoint Direction (1 is in) and Address = IN7
06A4 0x02 3 bmAttributes XFR Type = BULK
06A5 0x40 4 wMaxPacketSize (L) Maximum Packet Size = 64 Bytes
06A6 0x00 5 wMaxPacketSize (H) Maximum Packet Size - High
06A7 0x01 6 bInterval Polling Interval in Milliseconds
which is then followed by unicode form of zero ended string
"Microchip Technology ICD2 USB Device"
MPLAB ICD 2 Ready
Connecting to MPLAB ICD 2
ICD0289: Unable to re-program ICD2 USB OS firmware.
ICD0021: Unable to connect with MPLAB ICD 2
MPLAB ICD 2 Ready
narccizzo said:Hi JaySlovak
No, Im not sure, I only opened the bin and save it in hex format.
Connecting to MPLAB ICD 2
ICDWarn0062: The USB Boot firmware of the ICD2 is active and providing communications with the ICD2. This firmware is out-of-date and should be updated. It cannot be updated while active. However, you may continue to operate with the current boot firmware if you choose to do so. Do you want to continue?
ICD0288: Unable to re-program ICD2 USB Boot firmware.
ICD0021: Unable to connect with MPLAB ICD 2
MPLAB ICD 2 Ready
Zedman said:We should write a bootloader compatible with the icd2w2k.sys to get the OS.bin downloaded.
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.In ICD2br uses another kind of chip which generates the Vpp. Rkodaira mentoined, check the posts before.
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.I think ALL we need is written in the 4550 bins supplied with MPLAB.
They supplied the BL010101.hex which needs to be programmed at the factory for the ICD to work.[/quote]why did they supplied the boot image ?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?