Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.
Don´t be shy to ask me anything. I´ll try to help you as possible.
About the hex loaded in the 18F4550, i think it is protected, but i am not sure because the only programmer that I have and can read its content is the ICD2 itself, so i cannot read the chip content without it working in the programmer (
I see that the picture of the site is not good and small. I saw an advertisement in a magazine and i will scan it. Maybe it is more useful for you. Be patience for a while.
I am also interested in new revision of ICD2, RS232 clone is just too slow to be usefull as a debugger. I read somewhere, that MPLAB 7.40 (due in April) will include official support for this revision. I am pretty excited (I have both 16F877A and 18F4550 TQFP ready).
why is this brazilian board "licenced" by microchip ??? what inside this can be licenced by microchip ? why icd cloners take care of writing such terms on their board ?
Albert said he has the sources for the cypress chip in .c format, I hope he'll be back soon, because it would be good to know that ICD2 is a:
- Human Interface Device (HID) 64kbyte/sec
(no driver required)
- Communication Device Class (CDC) 1Mbit/s
(will create a COMx port when connected)
- maybe a Mass Storage device (i don't think it uses this)
- or a Custom one (?)
Maybe the cypress fw will explain this, altough I have the 2 hex files, If I will have a good disassembler which knows the cypress chip I'll start to check it.
Please suggest a good disassembler.
Added after 1 hours 44 minutes:
rkodaira,
if you have time, would you dump some usb communication for us? I attached a link to an usb monitor software. It would help a lot.
thanks
It is like the old ICD (the first one that Microchip doesn´t provide anymore). There is a dc-dc converter (boost) to generate the 13V necessary to Vpp. It can be easily realized because in the ICD2 clone there are the inductor (above the right crystal), a switching transistor, the fast diode (the large diode in the picture), some capacitors to filter it.
I did some research on cypress EZ-USB thing, now I know why there are 2 .sys files.
Had no luck with the hex files, cannot create easily understandable asm from them.
Therefore I don't know what type (class) of usb device is the ICD2. And without that info I cant even do byte/byte debug because the device driver wont let me open itself because it thinks the icd2 is not attached because it sends wrong configuration descriptors...
(Iam trying with the Comm Class sample by microchip, anyway it's working fine emulating a COM4 port, but that not our goal)
rkodeira please if u can do a connect with this monitor program:
(or anyone else who has original ICD2 with the cypress chip)
Another question: does ICD2br have it's own usb driver? Because Cypress chip has 2 (1st loads it's fw, second is for the real communication).
Or it works with the original microchip driver?
Without infos, after a lot of google and dissasembling of device drivers/dll-s I stuck a little bit, and I think we have to write a new device driver too. (and that will be a long journey)
I´m sorry I´m not going to have time to do the USB monitoring in the next days, because I´m not going to stay at home (I use PICs at home lab). I could not even do the download of the monitor.
Answering the question about the driver: I ´m not sure, but it should use the driver used by the original Microchip ICD2, because no driver is provided with my board.
Read the text regarding USB interface found in a document prepared by a member of Edaboard (jonas Meyer) about the Cypress chip:
=================================================
3.2 USB ID’s
To get the programmer working on the USB port the EEPROM U13 connected to
the CY7C64613 has to be programmed with the correct VID/PID/DRev. It is possible
to either use a standard EEPROM programmer or the development tools provided
by Cypress ( 60MB download). The correct EEPROM data is stored in
the ICD2_EEPROM.HEX (also included in ICD2_FW.zip). The first 9 bytes of the EEPROM
have to contain the values 0xb4 0xd8 0x04 0x00 0x80 0x01 0x00 0x06 0x00
(VID/PID/DRev).
If using the Cypress development tools, EZ-USB FX has to be installed first. After
connecting ICD2 to the USB port, the host recognizes the CY7C64613 (with empty
EEPROM) as a Cypress device. Now Cypress drivers have to be installed. Then
the Cypress USB control panel can be started to program the EEPROM with the
corresponding values.
When the EEPROM is programmed correctly ICD2 will be recognized by the OS as
a Microchip device. Now the Microchip USB drivers have to be installed. After starting
MPLAB it first downloads the CY7C64613 firmware. If the download was successful,
MPLAB connects to ICD2 and downloads the appropriate PIC firmware. Now ICD2 is
ready to connect to the target board and download or debug your code.
3.3 USB Drivers
Microchip USB drivers seem to be kind of buggy since they provide a USB driver removal
tool MPUsbClean.exe. It is included in the MPLAB distribution. After installing
MPLAB it is located in the installation directory in /Utilities/MPUsbClean/.
I knew that the cypress reads the VID/PID from an external chip.
I tried to set them, it's ok, but it's much more complex than just showing the correct numbers to the windows' driver.
If it recognizes the correct VID/PID it starts asking the chip for more info.
If someone captures a complete connect sequence with the USB Monitor program I mentoined before, than it will be easier to examine what should I put into those descriptors.
Someone please help us with that monitor thing, it's easy, just install the program, start it, and start MPLAB and connect to ICD2 (real or clone but USB). Save the log file and put it up to the forum. It would be good enough to start.
I think I can help you with it this weekend. I have an original ICD2 in the lab, I'll try to have a break to download the program and monitor the usb port of the USB.
please what is the small ic 8 pins near the inductor ?
regards,
Added after 3 minutes:
i think the 18f4550 is here a cypress 64613 clone... they could have used a 18f2550 and the RB port as a psp port, may be it's easier to use the psp on the 4550?
Added after 12 minutes:
bonus log...
this is the log of the connection of mplab when you connect as a programmer to the icd2
the first one was a connection as a debugger.
good luck.
the debugger is connected, the target is programed,
I start the logger and made a step into with mplab
and stopped the logger just after that.
hope this helps ?
This thread is getting big. I thought Id have time to read the new msgs in a couple of minutes. But I dont have so much time now. Will read them carefully tomorrow.
The source C files that I got was the .sys driver propossed by Cypress. it can be donwloaded from their web as part of the EZ-USB kit. The source makes reference to a well known book that has been posted here at edaboard (I dont remember the exact title).Ill post the c here when I get back home.
This drivers handles the power up and initial load of the CY. It does a 8051reset, downloads a "loader" that is suppossed to be the routines to handle the external RAM (which we dont need). and then after another reset, the user "firmware" The later is linked to the .sys and contains the code for the CY in intel hex format.
It is important to determine if the Brazilian labs had cloned the real microchip ICD2 or they developed the clone emulating the USB interface.
If the brazilians developed the code it will surelly be protected into the chip with CPPon
If microchip developed the code I think it will not be protected because they seem to be using the same philosofy of a bootloader and an operating system. With the code protection on, the bootloader could not modify the internal program memory to upgrade the software of the 4450. Take into account that they can even easyly upgrade the code on the CY. As well as in the 877.
I dont think that such a link will work so here is plan b
search for the name of the chip cy7c6413 at cypress and the scroll down to development kits.
Two zips are available. The one that is 60Megs contains an exe which installs everything including the sources and manuals.
I think that the driver is discussed or based on the book mantioned at "loader.c"
I dont understand very much of USB but it is not HID,
It is highly probable that microchip just did minor changes to this loader.c Including the brand name, If you see at the strings that the microchip .sys contains, you will find "anchor chips" or something like that. That was the firm that developed the processor cy7c6413 that was then purchased by cypress.
You see? This is not even Cypress stuff but older.
Thanks for the USB monitoring it is going to be very useful. Didnt have a real ICD so I had no way to get it.
Im still on my trip. Ill get a beer for the advances that the people made on this project right now.
Thanks Kripton for the files, i'll examine them asap.
Added after 16 minutes:
Kripton please unplug the ICD2 from the port start the monitor and after that connect it again, because the initial sequences are missing.
Anyway it's using bulk transfers! it's a new info!
Added after 2 hours 29 minutes:
Kripton,
all of the type/class descriptors of the endpoints in the USB device are sent when it's physically connected to the host, sorry I haven't wrote it before you started to monitor.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.