XboxHacker BBS
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 22, 2013, 07:28:14 AM


Login with username, password and session length


Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 »
  Print  
Author Topic: USB SPI Flasher with PIC18F2455 - now with source and binaries  (Read 308572 times)
SpikedCola
Member
**
Posts: 44


View Profile
« Reply #540 on: January 12, 2010, 02:22:05 AM »

I can flash the board with a PICKit, and flash using the bootloader jumper. When I remove the jumper the board hops over into "MemoryAccess" mode, which is good. But, when I put the jumper back, it doesnt go back into bootloader mode (and it doesnt let me use PDFUSB.exe to flash it)

I've done some testing on this (was just testing my newest hardware build so no biggie) and using the latest build from Cory(thanks for that!!) i can get the pic back in bootloader mode.(Picflash_v3b_plus2.zip)

The one thing that troubles me is that +- 100ohms as the total resistance from pin 17 to ground works and 200ohms doesn't, but thats not a weak 10k pullup i would personally expect.(with my little knowledge of PIC hardware)

The port configuration in the Pic sourcecode in GIT looks strange to me (Looks a bit like an alien language)
Hope the compiler has some more info on all of this if i ever have the time to install it.
Lets see:

Code:
//Check Bootload Mode Entry Condition
TRISCbits.TRISC6 = 0; // Set PortC bit 6 as output
LATCbits.LATC6 = 1; // Set PortC bit 6 to High (5v) (WTF?)

if((RV!=0xFFFF) && (PORTCbits.RC6 == 1)) //Portc part: Read PortC bit 6 and if 1 execute the command inbetween {})
 {
    _asm goto RM_RESET_VECTOR _endasm // Goto PIC Flasher
  }

// After this the bootloader starts
(added comments for easy reading and am assuming that the version in GIT is the actual one)

Please correct me if i'm wrong but if i understand correctly the above is a hack to read if C6 is low without a pullup resistor(shorting pin C6(5V) to ground for a very small time if the C^- GND jumper is placed), and this is because a PIC doesn't have selectable pull-ups on all pins?

Would it not be better to connect C6 to a +-1Mohm to VCC or so and then toggle it with a 10k to ground without the TRISKCBit and LATCBit ?, this would also be safer if we want to use the serial lines.

Please dont bite my head off as i am still learning this stuff Smiley
No worries, Im new to PIC aswell (though Ive delt with the 8051 and atMEGA chips). Ive done a few tests, and Ive left myself more confused than when I started. Its getting pretty frustrating, as I dont want to ship my flashers out until this bug is fixed, so I can rule out any sort of hardware problems there may be. Today I downloaded a GIT client and cloned the GIT repo, to get the latest source. I also installed MPLAB, the C compiler, and the PicKit flash tool. With that being said, here's the results of my testing.

Custom USB Device = Boot
Lib-Win32 Device = Flash
-> = Plug in if unplugged, or unplug if plugged in

These =='s refer to this:
if((RV!=0xFFFF) && (PORTCbits.RC6 == 1))

and the commented refers to me doing this, in an effort to add a physical resistor instead of a hardware trick:
 // TRISCbits.TRISC7 = 0;
 // LATCbits.LATC7 = 1;

== 1
Flashed BL -> Connected Jumper -> Flashed flash -> Removed Jumper -> Lib-Win32 Device
Flashed BL -> Connected Jumper -> Flashed flash -> Kept Jumper -> Lib-Win32 Device

== 0
Nothing shows up
Nothing shows up

== 0 commented with 10k pullup, switch to ground
Nothing shows up
Nothing shows up

== 1 commented with 10k pulldown, switch to vcc
Nothing shows up
Nothing shows up

---

Wierd! When I say nothing shows up, I mean the device manager doesnt flash and display the new hardware when I plug the flasher in. I get no sound or recognition that Windows sees the device, but VCC is at 5v (the power LED is on) and the Vusb output is at 3.3v and connected to ground with 100nF (also tried 220nF).

The odd thing is, when I first tried "== 0", I saw that I got no response, got scared, went back to "== 1" and I could connect again, so I was okay and proceeded on. After getting nothing showing up three times, I tried the original code, but the flasher still isnt recognized. All the vitals of the chip are fine, and I can reprogram with my PicKit 2 perfectly every time.

Is it possible Ive somehow damaged the pin? I have a couple flashers that test out perfectly and the chip is flashable with a PicKit, but the flasher isnt recognized with windows. It seems extremely sporadic.

EDIT It seems that with the code set to write a 1 and check for a 1 (the original git source), I only get 0.07v on pin C6. If its setting it to a 1, shouldnt I be seeing 5v? Could you measure yours?
« Last Edit: January 12, 2010, 02:27:42 AM by SpikedCola » Logged
ChipD
Hacker
***
Posts: 84


View Profile
« Reply #541 on: January 12, 2010, 02:45:07 AM »

Im having a strange problem with installing drivers.I had no problems whatsoever programming the PIC but when i plug it back in i get add hardware for two devices "memoryaccess" and "Usb device" using drivers i think cory1492 posted, i am able to install drivers for "memoryaccess" but i can not get any drivers for "usb device" to install.
Now the strange part is after spending two days on this, i decided to just connect it to 360 and run nandpro, and what do you know, nandpro detects the nand and reads it flawlessly.I dumped it 3 times and all 3 were identical.

But why is this "rouge" device in device mananger? It is really bothering me! I dont like having rouge hardware devices with yellow ! in there.

Anyone know what the deal is please post.

btw, i used a pic18F2550 but its same datasheet, so i dont think it should matter, but throwing it out there just incase.
Logged
maximilian0017
Xbox Hacker
*****
Posts: 684


View Profile
« Reply #542 on: January 12, 2010, 03:34:11 AM »

But why is this "rouge" device in device mananger? It is really bothering me! I dont like having rouge hardware devices with yellow ! in there.

Whats the PID/VID of that device? (Device manager/details)

Did you try to renew the driver pointing to the extracted files of the Nanpro2b archive?
Logged
maximilian0017
Xbox Hacker
*****
Posts: 684


View Profile
« Reply #543 on: January 12, 2010, 03:44:28 AM »

I was hopring to provoke some responce from the PIC minded people over here, as this is Darkstar and also Cory's department i dont want to change anything that can give problems later on.


If you really want to test something test this, only modify these lines:
TRISCbits.TRISC6 = 1; // Set PortC bit 6 as INPUT

// LATCbits.LATC6 = 1; // Set PortC bit 6 to High (5v) (DISABLED)

And connect a 100k or so from the pin to VCC, hopefully standard the PIC flasher will start and if you also connect a 10k to GND the Bootloader will start.
Resistor values are out of the blue and open for discussion ofcourse...  

C6 should read 0v or so if nothing connected and 5v if a 100k to VCC is connected
« Last Edit: January 12, 2010, 03:46:46 AM by maximilian0017 » Logged
ChipD
Hacker
***
Posts: 84


View Profile
« Reply #544 on: January 12, 2010, 03:47:47 AM »

But why is this "rouge" device in device mananger? It is really bothering me! I dont like having rouge hardware devices with yellow ! in there.

Whats the PID/VID of that device? (Device manager/details)

Did you try to renew the driver pointing to the extracted files of the Nanpro2b archive?

1. USB\VID_0547&PID_2235\5&64CC6DC&0&2

2. Yeah ive tried install,reinstall,uninstall,update driver..ect..ect lol pointing to nandpro20b folder,folder with drivers cory1492 supplied, no luck.
Logged
maximilian0017
Xbox Hacker
*****
Posts: 684


View Profile
« Reply #545 on: January 12, 2010, 04:00:27 AM »

USB\VID_0547&PID_2235\5&64CC6DC&0&2

VID 0547  =Anchor Chips, Inc.
 PID 2235  = AN2235 EZUSB-FX Microcontroller

Maby a support chip of a DVB-T card ?

Doesn't look Xbox specific at all  Smiley

Logged
ChipD
Hacker
***
Posts: 84


View Profile
« Reply #546 on: January 12, 2010, 04:08:03 AM »

USB\VID_0547&PID_2235\5&64CC6DC&0&2

VID 0547  =Anchor Chips, Inc.
 PID 2235  = AN2235 EZUSB-FX Microcontroller

Maby a support chip of a DVB-T card ?

Doesn't look Xbox specific at all  Smiley
I figured out what it was.
It was usb I/O board i had installed but had since been removed.Strange that it thinks the usb spi flasher is the usb I/O board being plugged back in lol.
I probably need dig deep and remove all registry and drivers/software for it.

Thanks for pointing that out.


Logged
doveman
Master Hacker
****
Posts: 186


View Profile
« Reply #547 on: January 12, 2010, 05:21:09 AM »

Is this pad board the stuff you're all using? Bear with me, I never even knew this type of board existed until I saw this thread!

And can I really just drop in an 18F2550 in place of the 18F2455, 'cos Farnell are out of stock of the latter at the moment so it would speed things up if I could?
Logged
threesixtyuser
Master Hacker
****
Posts: 115


View Profile
« Reply #548 on: January 12, 2010, 05:31:44 AM »


Thx for this one! Almost what I need with my components, but I use USB-B chassis so little differences are inevitable
« Last Edit: January 12, 2010, 10:04:39 AM by threesixtyuser » Logged
maximilian0017
Xbox Hacker
*****
Posts: 684


View Profile
« Reply #549 on: January 12, 2010, 05:53:29 AM »



Looks good, but shouldn't there be a wire between pin 8 and pin 19? and isn't 1/4 wat overkill?, always use 1/8 wat myself.

Also the whole reset to bootloader is subject to changes a.t.m. but can always update later.
« Last Edit: January 12, 2010, 05:55:38 AM by maximilian0017 » Logged
DarkstarTM
Member
**
Posts: 45


View Profile
« Reply #550 on: January 12, 2010, 06:07:57 AM »

I was hopring to provoke some responce from the PIC minded people over here, as this is Darkstar and also Cory's department i dont want to change anything that can give problems later on.

I am not departed - just a little quiet.
If you have a specific question, please PM me or start a separate topic.

DarkstarTM
Logged
d4m4n
Master Hacker
****
Posts: 135


View Profile
« Reply #551 on: January 12, 2010, 06:41:39 AM »

Looks good, but shouldn't there be a wire between pin 8 and pin 19? and isn't 1/4 wat overkill?, always use 1/8 wat myself.

Also the whole reset to bootloader is subject to changes a.t.m. but can always update later.

Pins 8 and 19 are internally connected inside the chip. No need to connect them outside.
General 5% carbon or 1% metal film resistors are 1/4W. The smaller metal film resistor is 1/8W. I used 1/10W 0805 SMD resistors. Any of these work fine.
Logged
maximilian0017
Xbox Hacker
*****
Posts: 684


View Profile
« Reply #552 on: January 12, 2010, 06:44:20 AM »

Pins 8 and 19 are internally connected inside the chip. No need to connect them outside.

Was always told to connect all VCC and ground pins, but as long as you are sure this will work correctly i'm ok with it  Smiley
Logged
threesixtyuser
Master Hacker
****
Posts: 115


View Profile
« Reply #553 on: January 12, 2010, 06:48:50 AM »

never mind!  Embarrassed

edit: Maximillian, wasn't directed to you but because I posted something allready answered. Wink

edit2: Just finished the PCB layout for the components in the shopping list I posted earlier:

Incorrect schematic removed, refer to this post for a (at this moment) correct one

Total PCB size approx. 41x56mm

Credits for the originals and special thx go to DarkstarTM, Sandungas and all others that contributed to the resulting schematics!

as you can see I need one extra wire bridge due to the USB-B chassis and I'm using 100nF instead of 10uF and 27pF instead of 22pF because I allready ordered the components before it got clear that some different values would be better. If it turns out it causes trouble I will replace those ofcourse.

Because of the irregular pitch of the USB-B socket I'll have to bend the legs a bit or enlarge the PCB holes a bit.

BTW I use AWG24 Ribbon cable with a core pitch of 2,54mm, that's why I can use a single row of the connector without having to peel the cable apart.
« Last Edit: January 15, 2010, 09:14:08 AM by threesixtyuser » Logged
maximilian0017
Xbox Hacker
*****
Posts: 684


View Profile
« Reply #554 on: January 12, 2010, 06:57:38 AM »

edit: Maximillian, wasn't directed to you but because I posted something allready answered. Wink
Ok, no problem,  Smiley
Parts list looks good.

« Last Edit: January 12, 2010, 12:33:01 PM by maximilian0017 » Logged
ultra64
Hacker
***
Posts: 50


View Profile
« Reply #555 on: January 12, 2010, 05:14:07 PM »

I'm really looking forward to what the future might hold for this, thanks to everyone involved, greatly appreciated.
I've built a couple of the PIC programmers and flashers by the old diagrams, I cut the PCBs with my scissors so they look a little funky but they work nicely and are really tiny Wink

Logged
sandungas
Master Hacker
****
Posts: 212



View Profile
« Reply #556 on: January 12, 2010, 05:15:38 PM »

I am not departed - just a little quiet.
Nice to see you again Smiley
Good moment to make some questions

The reset in MCLR (pin 1) is disabled in the bootloader code ?
The PIC is still able to reset when joining pin 1 & ground, or this can damage the PIC ?

There is more code/functions for the PIC pins that are not used in my diagram ?
The connexions to the programmer part (like the diagram in the first post of this thread) are still present in the code ?

And the last one... can you post the pins that are still not used ?

-------------
@maximilian0017
I will redo the diagram if needed (i.e. bootloader pin), but i guess its ok now (i spent some days verifying all technicall data)
I used 1/4 watt resistors because are easy to find
Logged
chaoz2
Member
**
Posts: 10


View Profile
« Reply #557 on: January 12, 2010, 05:54:21 PM »

never mind!  Embarrassed

edit: Maximillian, wasn't directed to you but because I posted something allready answered. Wink

edit2: Just finished the PCB layout for the components in the shopping list I posted earlier:


Total PCB size approx. 41x56mm

Credits for the originals and special thx go to DarkstarTM, Sandungas and all others that contributed to the resulting schematics!

as you can see I need one extra wire bridge due to the USB-B chassis and I'm using 100nF instead of 10uF and 27pF instead of 22pF because I allready ordered the components before it got clear that some different values would be better. If it turns out it causes trouble I will replace those ofcourse.

Because of the irregular pitch of the USB-B socket I'll have to bend the legs a bit or enlarge the PCB holes a bit.

BTW I use AWG24 Ribbon cable with a core pitch of 2,54mm, that's why I can use a single row of the connector without having to peel the cable apart.

pin 20 and 19 should be at least 0,22uf (220nf) or greater (max 10uf) and not 100nf
Logged
maximilian0017
Xbox Hacker
*****
Posts: 684


View Profile
« Reply #558 on: January 12, 2010, 06:01:25 PM »

pin 20 and 19 should be at least 0,22uf (220nf) or greater (max 10uf) and not 100nf

Thats what i thought at first but no, Vusb needs a 200nF (+-20%) capacitor according to the datasheet.

I agree that the 100nF is quite small and i used a much larger one myself.
(Capacitors are good, Crystals are good Smiley, shorts are baddddddd Sad )
Logged
threesixtyuser
Master Hacker
****
Posts: 115


View Profile
« Reply #559 on: January 12, 2010, 06:08:15 PM »

got the 100nF value from the old diagram, the 10uF wasn't stated at that time yet, can 100nF damage my circuit/PIC or could it just cause stabillity problems?
Logged
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 »
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM