XboxHacker BBS
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 24, 2013, 09:19:03 PM


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 309022 times)
sandungas
Master Hacker
****
Posts: 212



View Profile
« Reply #600 on: January 14, 2010, 05:33:43 AM »

I agree with this, the 0.47uF for pin 14 is clearly stated in the datasheet pages 172 & 385

The other capacitor (placed in pin 20)... datasheet page 188 gives a maximun of 10uF (aka 10000 nF)
But the original value of 100 nF (aka 0.1 uF) was for decoupling purposes ?

I was reading here how to decouple ICs
http://www.hottconsultants.com/techtips/decoupling.html
If i understood right, over 50Mhz is needed to add several capacitors in paralell along the wires

If we add another capacitor between ground/volts, we must reduce the 10uF one at pin 20?
In my diagram there is space to add another one in pin 13 (pin 13 is volts, and this capacitor will be very close to the pic)

-----------------------
I have no idea about decoupling, but what im saying is:
pin 13 - 0.1 uF <--- new
pin 20 - 0.1 uF
ground/volts - 5uF (range from 0.1 nF to 9uF) <--- this one that is placed in my diagram in pic 20... can be moved to the left-down corner of the board

Not sure if this is needed, but in this link advises that all capacitor for decoupling must have similar values
« Last Edit: January 14, 2010, 05:41:35 AM by sandungas » Logged
threesixtyuser
Master Hacker
****
Posts: 115


View Profile
« Reply #601 on: January 14, 2010, 06:36:31 AM »

So shortly this means that the ideal conclusion for this circuit ends up in:

Looks good,

The only question remaining is the single 10 μF or a 100nF and a 10 μF.



Hmm, yet another version Wink but so far the last one to figure out! In case of 2 caps, where would they be placed?
Logged
sandungas
Master Hacker
****
Posts: 212



View Profile
« Reply #602 on: January 14, 2010, 07:04:15 AM »

The other capacitor (placed in pin 20)... datasheet page 188 gives a maximun of 10uF (aka 10000 nF)
But the original value of 100 nF (aka 0.1 uF) was for decoupling purposes ?

I was reading here how to decouple ICs
http://www.hottconsultants.com/techtips/decoupling.html
If i understood right, over 50Mhz is needed to add several capacitors in paralell along the wires
Quoting myself...

The PIC internally is working at 48MHz... so the decoupling can be done with just 1 capacitor... datasheet gives us a maximun of 10 uF (not for decoupling, but here we are using 1 capacitor for decoupling and the main line)... and designs of other people with this PIC uses 0.1 uF (aka 100 nF) for decoupling.... and other designs uses 10uF (aka 10000 nF) as a "standard"
100 nF was the value of the original diagram, so... i return to this value (but now i will include the range from 0.1 uF to 10 uF)

I will upload the diagram in some minutes (v0.3)
« Last Edit: January 14, 2010, 07:05:58 AM by sandungas » Logged
omegared77
Newbie
*
Posts: 1



View Profile
« Reply #603 on: January 14, 2010, 07:24:35 AM »

Hi !
I'd like to modify this source code but i don't know C very well...
did anyone tried this ?
Logged
SpikedCola
Member
**
Posts: 44


View Profile
« Reply #604 on: January 14, 2010, 01:59:54 PM »

In theory; if a 3v3 regulator was added and the PIC was run at 3v3, the resistors connecting the PIC to the xbox could be removed, right?
Logged
maximilian0017
Xbox Hacker
*****
Posts: 684


View Profile
« Reply #605 on: January 14, 2010, 04:07:09 PM »

In theory; if a 3v3 regulator was added and the PIC was run at 3v3, the resistors connecting the PIC to the xbox could be removed, right?

If i read the ^$% datasheet correctly you cannot run the PIC at 3v3 officially.
Logged
doveman
Master Hacker
****
Posts: 186


View Profile
« Reply #606 on: January 14, 2010, 08:08:04 PM »

What wattage soldering iron do people recommend for soldering to the motherboard?
Logged
SpikedCola
Member
**
Posts: 44


View Profile
« Reply #607 on: January 14, 2010, 08:10:31 PM »

Whys that? Page 369 says Vdd must be from 0.3v to 7.5v and page 172 says that Vdd must be equal to or greater than Vusb (3.3v) at all times for USB functionality to work.

And I recommend a temperature-controlled iron (I got one for xmas and have fallen head-over-heels for them), but if you dont want to spend that kind of cash, I would get a 15w iron.
Logged
doveman
Master Hacker
****
Posts: 186


View Profile
« Reply #608 on: January 14, 2010, 08:39:39 PM »

Cheers. I'll probably just get a 15W one to save a bit of cash. I've actually already got one but it's not working very well and I'm not sure I can get a small replacement tip for it. I've got a 30W with a small tip, but I think it's a bit too hot for the motherboard.

Edit: Actually, I can get this tip which should fit my Antex C15.
« Last Edit: January 14, 2010, 09:02:21 PM by doveman » Logged
maximilian0017
Xbox Hacker
*****
Posts: 684


View Profile
« Reply #609 on: January 14, 2010, 08:58:30 PM »

Whys that? Page 369 says Vdd must be from 0.3v to 7.5v and page 172 says that Vdd must be equal to or greater than Vusb (3.3v) at all times for USB functionality to work.

Please correct me if i'm wrong but have a look at figure 28.1

The 0.3 -7,5 are probably the absolute ratings:
Absolute Maximum Ratings(†)
Voltage on VDD with respect to VSS -0.3V to +7.5V

It only references to when the chip dies(†) and at 0.3v i would not think you would get a peep out of it.

Maby page 172 is referencing to the low voltage variant, if i look at figure 28.2 i think it can run on 3.3v at a lower frequency, The question is at what frequency is the Pic running?(Page31)

Also they reference low power modes with reduced voltage etc.

How far are you on finding out the problems you are having?
Did you already post a high res picture of the underside of the actual soldered pcb?

Logged
SpikedCola
Member
**
Posts: 44


View Profile
« Reply #610 on: January 14, 2010, 09:24:49 PM »

The problem is fixed - by changing the code a tiny bit (should be back a page or two) I have it going into and out of the bootloader perfectly, so things are almost back on track. However, due to a scheduling mixup, none of my roommates are home, and one of them has my keys, so Ive been sitting in the Atrium since 5pm, waiting for one of them who gets home at 11:30pm.

Anywho.

Yeah, Id never run near those maximum/minimum ratings (as 3v3 is significantly less than ~7v) so I dont expect any problems getting the PIC itself running at 3v3. I was more concerned about the internal transceiver.

I also found a note on page 370 that states:
"For 2.0 < VDD < 4.2 V, FMAX = (16.36 MHz/V) (VDDAPPMIN - 2.0V) + 4 MHz"
Therefore, the max frequency I could run at is (16.36MHz/3.3v)(3.3v - 2.0v) + 4MHz = 10,444,848Hz, which means I can get away with a 10MHz crystal.

HOWEVER, I just noticed that that's for the low-voltage version only (18LF2455). The normal family requires 4.2v minimum. I checked Mouser and the LF version is only ~30 cents more expensive, which isnt as bad as I was expecting. I also checked Digikey, and they have them for 4.59960 at a qty of 25+ which is a hair cheaper than Mouser (and DigiKey also has them in stock)

EDIT Also, to run at 10MHz and generate 48MHz for USB, you need to use the HSPLL osc mode, which according to page 371 requires 3.0v minimum, which is within my spec.

EDIT 2 Whoa, cool! I was comparing prices on the Microchip site, and there's an option that allows you to give them code, and they will pre-program all the chips for you! I didnt see a mention of cost, but Id like to think its free Wink
« Last Edit: January 14, 2010, 09:34:08 PM by SpikedCola » Logged
ReverseAffect
Xbox Hacker
*****
Posts: 1345

360Reball


View Profile WWW
« Reply #611 on: January 14, 2010, 09:35:57 PM »

you guys are running this into lala land....
the chip needs 5 volts...it's does have a built in 3.3 volt regulator for the data lines....
now why are you trying to change something that has been hard coded for many years?Huh
3.3 volts to supply the whole setup...lol your drifting off the subject....other parts need supply power...
unless you plan on pulling the pic apart..which is stupid...
« Last Edit: January 14, 2010, 09:37:42 PM by ReverseAffect » Logged

sick like a mofo..not reballing for a while...
SpikedCola
Member
**
Posts: 44


View Profile
« Reply #612 on: January 14, 2010, 10:04:31 PM »

the chip needs 5 volts...
Wrong, 5v is just a common voltage. It can run on many different voltages.

Quote
it's does have a built in 3.3 volt regulator for the data lines....
Right, the 3v3 regulator is used for the pullups and internal transceiver, but I have found it to be unreliable, as Im sitting on some chips whose internal regulator doesnt function.

Quote
now why are you trying to change something that has been hard coded for many years?Huh
Because the Xbox logic that we're interfacing with runs at 3v3, so running the board on 3v3 aswell would reduce the overall parts count. What do you mean "hard-coded"? Where is it "hard-coded" that all boards must run at 5v?

Quote
other parts need supply power...
Such as?

Quote
unless you plan on pulling the pic apart..which is stupid...
You're right, that is stupid; why would I pull the PIC apart?
Logged
ReverseAffect
Xbox Hacker
*****
Posts: 1345

360Reball


View Profile WWW
« Reply #613 on: January 14, 2010, 11:35:47 PM »

i think it's best if you read up on chips and internals,to see what it's all about...and why most need 5volts to be stable...
I am not here to school you...and won't even try ..because over 100 years of diagrams and scope tests prove it ain't stable
this is why we have a 5 volt layout....go ahead and pump 7+ volts into that...
just do your tests and you will find out in the end..why it's not going to be stable....


and this line,
but I have found it to be unreliable, as Im sitting on some chips whose internal regulator doesnt function.

is what caused me to say good luck.....
« Last Edit: January 14, 2010, 11:38:35 PM by ReverseAffect » Logged

sick like a mofo..not reballing for a while...
Rescue Toaster
Newbie
*
Posts: 6


View Profile
« Reply #614 on: January 14, 2010, 11:55:06 PM »

I can't imagine what I could have done wrong... but my PIC18F2455 goes into bootloader when I ground pin 18, not pin 17. Pretty bizzare!

Other than that it seems to be working great. I used a crystal and tiny 0805 SMD caps standing up on edge right against the pins of the socket, with a ground line running down the middle between the socket's pins. Looks sharp and keeps things clean.

EDIT2: SpikedCola, actually from looking, not only might you need to buy an LF part, but that frequency chart could be core frequency, not just clock frequency. (It's not immediately clear to me.) That could preclude full speed operation and require some recoding for different timing when using the SPI bus.
« Last Edit: January 15, 2010, 12:31:20 AM by Rescue Toaster » Logged
SpikedCola
Member
**
Posts: 44


View Profile
« Reply #615 on: January 15, 2010, 12:10:12 AM »

I had five brand-new chips, into a tested prototype, with tested & working code, and all other failures worked out, and still could not get the internal regulator to start. Even Darkstar, the creator of this project, came across it:
You should - however - be careful with the PIC's VUSB voltage regulator. I fried one and I still don't know why. Also, be careful with the xbox side.

Im not going to argue that everything is made for 5v and nothing else, nor did I ever even mention that I was thinking about pumping 7v into it.
Logged
sandungas
Master Hacker
****
Posts: 212



View Profile
« Reply #616 on: January 15, 2010, 01:54:47 AM »

you guys are running this into lala land....
Hhaha, this is why i returned to the original value of the decoupling capacitor in my diagram (v0.3)
In my diagram (v0.2) i changed the values, but we where "messing" with this values in the correct range

I have not technicall knowledge to improve the circuit, and the first drawing that i did was with the intention to make a simply "basic" design of the board

Maybe can be done some improvements i.e. with decoupling adding capacitors like is explained here:
http://www.interfacebus.com/Design_Capacitors.html

Capacitor placement: Cap to Cap
Quote
A capacitor only has an effect with in a certain distance from the device. The more you move away from the capacitor, the less it does



But this kind of improvements are out of my initial intention when i did the drawing, for me is done, v0.3 is the final diagram
I will only modify the diagram if more software functions are added to the code, or if pins changes

Btw... thx to chaos & maximilian0017 to help me lurking for info at the datasheets, etc...
And good work threesixtyuser, the board you build looks really nice, and your drawing too Wink
« Last Edit: January 15, 2010, 02:04:07 AM by sandungas » Logged
ReverseAffect
Xbox Hacker
*****
Posts: 1345

360Reball


View Profile WWW
« Reply #617 on: January 15, 2010, 02:55:16 AM »

I had five brand-new chips, into a tested prototype, with tested & working code, and all other failures worked out, and still could not get the internal regulator to start. Even Darkstar, the creator of this project, came across it:
You should - however - be careful with the PIC's VUSB voltage regulator. I fried one and I still don't know why. Also, be careful with the xbox side.

Im not going to argue that everything is made for 5v and nothing else, nor did I ever even mention that I was thinking about pumping 7v into it.

maybe we getting our wires crossed...lol
PIC18LF2550 is a lower voltage 2.0-5.5 volts
PIC18F2455  is a higher voltage 4.2-5.5 volts
as you see the differences is in the LF(lower voltage) and just F(higher voltage)
and you don't have to argue because common everyday circuits are 1.0-5.0 volts...this is why we have resistors not only to knock down the voltage but to be electrically safe(everything can have a spike)...and is a wide known practice to keep...
I was going to post stuff when peeps started changing cap values for the crystals.because it don't keep the freq locked in like it should and drifts off,and isn't standard (most in the field of electronics know this to..)
we have circuits made in basic ways i do know that can be altered, but lets keep the common 2+2 = 4 in the equation...lol
go ahead and try a  3.3 voltage regulator to see the end results and post your results....
don't let my ramblings stop ya....
I am not going to do this anytime soon I am happy with a PIC18F2455 and the resistors...thanks to Darkstar for the idea Smiley

« Last Edit: January 15, 2010, 03:04:53 AM by ReverseAffect » Logged

sick like a mofo..not reballing for a while...
maximilian0017
Xbox Hacker
*****
Posts: 684


View Profile
« Reply #618 on: January 15, 2010, 05:01:19 AM »

3.3v

Cory said that the pic core runs at 24Mhz, so i hope you changed that also.
(Hope the speed isn't slower that much)

I totally agree with ReverseAffect, if you ask me it's a can of worms.

If you change something to the main code (not the bootloader) people cannot upgrade their firmware with updates posted here.

Dont get me wrong, i hope this works out for you but it seems you are getting in deeper and deeper.
(not talking about the bootloader)

p.s. what was the biggest capacitor you used for Vusb?, and did the whole Vusb problems start after that?
Logged
SpikedCola
Member
**
Posts: 44


View Profile
« Reply #619 on: January 15, 2010, 07:24:19 AM »

0.47uF was the biggest I tried, as the cap is just a filter for Vusb and isnt absolutely necessary (at least thats how I understood the datasheet).

And I have the config bits set to use a 10MHz crystal.
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