|
maximilian0017
|
 |
« Reply #420 on: December 30, 2009, 04:33:21 PM » |
|
Any recommend Load Capacitance for the 12Mhz crystal? 18pf with 2x31pf caps to ground?
Normally you check the datasheet and get ColtB45's formula to get it exact. If you allready have a crystal and cannot get a datasheet 2x18pF to ground will probably work without problems.
|
|
|
|
|
Logged
|
|
|
|
|
cory1492
|
 |
« Reply #421 on: December 30, 2009, 04:47:40 PM » |
|
ChaoZ: I couldn't tell you really, I use a willem which supports full voltage programming so even if LVP is disabled and pages are locked I can erase them. I do recall you need 5V for LVP from looking at the datasheet. No, the 18f2450 doesn't have the necessary MSSP(SPI/I2C) interface. It could never be used as a SPI interface. 18f2455/this project is not using the MSSP-SPI/I2C interface at all, it is using bitbang on gpio pins. I suspect the SPI interface could be faster, but also assume there was a reason why DarkStarTM chose not to use it which I have not found just yet.
|
|
|
|
« Last Edit: December 30, 2009, 04:49:30 PM by cory1492 »
|
Logged
|
|
|
|
|
Mooner2
|
 |
« Reply #422 on: December 30, 2009, 07:48:04 PM » |
|
Any recommend Load Capacitance for the 12Mhz crystal? 18pf with 2x31pf caps to ground?
Normally you check the datasheet and get ColtB45's formula to get it exact. If you allready have a crystal and cannot get a datasheet 2x18pF to ground will probably work without problems. I do know how to calculate the capacitance needed for the crystal by looking up the crystal's recorded load capacitance. I was wanting to know if there was a ranged load capacitance needed by the PIC. Or is it more of choose a load capacitance and add the correct amount capacitor's needed?
|
|
|
|
|
Logged
|
|
|
|
AirJonn
Newbie

Posts: 2
|
 |
« Reply #423 on: December 30, 2009, 08:13:31 PM » |
|
First off thanks for all info shared its kept me off the street latest days.
Anyways, i still dont got it running and i must say its the first time im ever building something like this.
I could not find a resonator, so i used a crystal 12mhz and placed caps on both legs to ground, but the device does not get regonized by windows. So i checked the caps and they are 0,1nF, the schema i saw later says use 0,022nF caps to ground when using 2legs resonator/crystal.
Could this be the reason the device is not regonized at all and juts dont run? Or would it run and just dont work right so the error is somewhere else? Dont have the right caps nearby soon otherwise i wouldnt ask afcourse.
|
|
|
|
|
Logged
|
|
|
|
|
cory1492
|
 |
« Reply #424 on: December 30, 2009, 11:38:35 PM » |
|
The 'optimal' caps you calc are best for fastest bring up time on crystal, anything within a certain range should work. From what I understand, one can make a simple oscillator out of just caps alone, but it's not very accurate - but - crystals won't start oscillating unless they are 'primed' in some way, so a quick couple cycles from some small value (fast charge/discharge cycle) caps and it's going with the caps no longer having any real direct effect on the crystal. In other words, a 15-30pF cap should suffice to 'prime' most any crystal oscillator.
I may be misinformed though, which was why I asked for some clarification from the fellow who dumped the formula here.
And yes, using a 100pf cap could easily account for the issue, so long as when you programmed the bootloader onto the pic you did check the fuse value for the oscillator frequency was set to match your oscillator.
|
|
|
|
|
Logged
|
|
|
|
|
ColtB45
|
 |
« Reply #425 on: December 31, 2009, 01:12:26 AM » |
|
I may be misinformed though, which was why I asked for some clarification from the fellow who dumped the formula here. You are not misinformed at all. Everything you said is dead on. I must have missed your post, what clarification do you need from me? EDIT: Found it! ColtB45 how close to that formula is actually needed for caps that prime a crystal? Honestly, I don't know how far out of spec you can get before having problems. Large values of C1 and C2 increases frequency stability but decreases gain and may cause start-up problems. Lower values of C1 and C2 decreases frequency stability but increases loop gain. Loop gain should always be at least 40% of Vdd. In our circuit that's ~2 volts. Mooner2:Do you know what the part# of your crystal is? If you post it here I can probably tell you what C1 and C2 need to be.
|
|
|
|
« Last Edit: December 31, 2009, 02:15:19 AM by ColtB45 »
|
Logged
|
|
|
|
ChaoZ
Newbie

Posts: 5
|
 |
« Reply #426 on: December 31, 2009, 03:39:32 AM » |
|
Thanks Cory!
Found the solution, my bad.
I was following the circuit diagrams listed in this forum, seems that there is only 1 VDD for PIC18F2450, there is 2 x VDD and VSS for PIC18F4550. decided to put the power on. (still reads 2.5v damn!) and bring bring pin 38(RB5/KBI1/PGM) to high just to be sure it is in LVP mode.
Bootloader flashed v3b plus 2 code flashed v3b plus 2 (keep having error when readying both using nandpro a or b) set to bootloader mode, flash PICFLASH from first page of forum, by darkstar (slightly better in reading, but onces i walk away, from the desk, there is goes again! LOL)
next thing i might try is to read 64 blocks at a time.
anyone else also having errors when reading?
|
|
|
|
|
Logged
|
|
|
|
|
maximilian0017
|
 |
« Reply #427 on: December 31, 2009, 07:03:08 AM » |
|
I was following the circuit diagrams listed in this forum, seems that there is only 1 VDD for PIC18F2450, there is 2 x VDD and VSS for PIC18F4550. decided to put the power on. (still reads 2.5v damn!) and bring bring pin 38(RB5/KBI1/PGM) to high just to be sure it is in LVP mode.
Thought you were talking about the flasher and not the Art2003 programmer. If you have a 3,3v LPT port and use the wrong diodes you can get a 0,7v voltage drop, sounds about right. You could try an older pc, they still use 5v for the LPT port. But that doesn't really explain why the voltage stayed 2,5v when you powered the Art2003 with usb, could you check the diodes for shorts/wrong way around?
|
|
|
|
|
Logged
|
|
|
|
ChaoZ
Newbie

Posts: 5
|
 |
« Reply #428 on: December 31, 2009, 08:09:38 AM » |
|
Hi maximilian,
I have solve the problem with the ART2003 programmer. What happen was, it only allow me to read, but not write. (detects the correct chips in winpic800) Apparently, the voltage across are is still about 2.5-2.7v
anyway, when it gives me $#!t, what i did was i toggle pin 1, and it will allow me to write again.
The problem i have now, is nandpro a or b keeps producing error message when reading. I think the error is not with the wires or anything, it is like the pic18F keeps shutting down. remain connected, run the nandpro command again, it just can't detect usb flasher.
I did not solder the jtag links, only SPI links. do I need to solder the JTAG links?
BTW if I am using cory's code, which circuit diagram should I follow?
|
|
|
|
« Last Edit: December 31, 2009, 08:34:13 AM by ChaoZ »
|
Logged
|
|
|
|
|
maximilian0017
|
 |
« Reply #429 on: December 31, 2009, 09:52:45 AM » |
|
I have solve the problem with the ART2003 programmer. What happen was, it only allow me to read, but not write. (detects the correct chips in winpic800) Apparently, the voltage across are is still about 2.5-2.7v
What kind of diodes have you used? The problem i have now, is nandpro a or b keeps producing error message when reading. I think the error is not with the wires or anything, it is like the pic18F keeps shutting down. remain connected, run the nandpro command again, it just can't detect usb flasher. I did not solder the jtag links, only SPI links. do I need to solder the JTAG links? BTW if I am using cory's code, which circuit diagram should I follow?
Jtag doesn't need to be soldered to read/write the flash, only if you want to run Xell/Xbr/Freeboot. You followed the instructions and programmed the bootloader with the Art2003 programmer, then connected the PIC to the usb port and then flashed Cory's latest package? Does the Memory Access usb device get detected if you connect the flasher to the USB port? If it gets detected and drops connection i would check the Crystal/copacitors side and then check for loose wires, how long is your usb cable? Maby a picture of your setup could help?  Works best if the resonator is changed out by a crystal connected to pin 9/10, then from the crystal 2 18pF capacitors to ground.
|
|
|
|
« Last Edit: December 31, 2009, 10:06:06 AM by maximilian0017 »
|
Logged
|
|
|
|
ChaoZ
Newbie

Posts: 5
|
 |
« Reply #430 on: December 31, 2009, 10:09:46 AM » |
|
hi maximilian, art2003 programmer as per the one with 8 x 1N4148 Some how, programing seems okay. glitch once in a while.
But I get the concept now, ( i hope these helps others who are still looking around.)
flash pic with bootloader (using ART2003 + winpic800)
connect pic with USB setup to PC (with bootloader mode on) get detected and install MCHPUSB drivers
load picflash.hex, and write to pic disconnect USB
disconnect bootloader pin from GND
reconnect USB with PIC, detected as memory access install drivers from Cory's pack for Nandpro
use command prompt with Nandpro to dump XBOX -------------------
Yupe, got detected and installed drivers from nandpro pack from Cory
USB cable is 2 feet long, I thou USB length should not matters, like the LPT, LOL!
It works, and it gets detected, will only start to fail, when it starts reading from the nand.
I will go check the xtal, could I use something else beside 12MHZ? I followed, a circuit from Xbox-scene, which uses 12Mhz with a pair of 33pF
the longest read, I got was up till, around 1000HEX, but then I decided to reflashed it with Cory's pack, and it always lasted will only x001F. :-(
|
|
|
|
|
Logged
|
|
|
|
|
|
|
ColtB45
|
 |
« Reply #432 on: December 31, 2009, 01:51:07 PM » |
|
That's exactly right. You want to use ~19pF for C1 and C2. You can go up or down a little if you need to (18pF-20pF would also work just fine). What else do you need cleared up?
|
|
|
|
|
Logged
|
|
|
|
|
maximilian0017
|
 |
« Reply #433 on: December 31, 2009, 02:04:28 PM » |
|
It works, and it gets detected, will only start to fail, when it starts reading from the nand.
I will go check the xtal, could I use something else beside 12MHZ? I followed, a circuit from Xbox-scene, which uses 12Mhz with a pair of 33pF
Check also the wiring between the xbox and the flasher, as short ast possible You can check the Pic datasheet for sutable crystals, dont forget to reprogam the pic for that crystal.
|
|
|
|
|
Logged
|
|
|
|
ChaoZ
Newbie

Posts: 5
|
 |
« Reply #434 on: December 31, 2009, 11:57:42 PM » |
|
May I ask how do you change the code to match the XTAL? to the bootloader or the picflash?
let's say 24MHZ
|
|
|
|
|
Logged
|
|
|
|
|
maximilian0017
|
 |
« Reply #435 on: January 01, 2010, 04:52:31 AM » |
|
May I ask how do you change the code to match the XTAL? to the bootloader or the picflash?
All the info needed is here in the thread, you can use the search function to search it all. You can change the frequency in WinPIC800 before writing to the PIC.
|
|
|
|
|
Logged
|
|
|
|
|
doveman
|
 |
« Reply #436 on: January 01, 2010, 11:41:17 AM » |
|
I've knocked up a shopping list for the Art2003 programmer and Darkstar flasher now. Some parts I've sourced from maplins where farnell doesn't have them, require minimum quantities, or are just a lot more expensive. I'd be grateful if someone would look it over and check I haven't got anything wrong. The only thing I haven't been able to find is board with individual copper holes rather than strips. The only thing I've found that might be suitable is called Tripad Board and has each strip divided into 3-hole segments: http://www.maplin.co.uk/Module.aspx?ModuleNo=1922Art2003 Programmer: 1x 28pin socket DIL Socket 28-Pin BL21X £0.21 http://www.maplin.co.uk/Module.aspx?ModuleNo=25308x 1N4148 Diodes Switching Diode QL80B £0.24 (£1.92) http://www.maplin.co.uk/Module.aspx?ModuleNo=463861x 1/4W 220 Resistor Metal Film 0.6W M220R £0.17 http://www.maplin.co.uk/Module.aspx?ModuleNo=3415641x 47uF Electro 3017382 MULTICOMP - MR25V476M6.3X7. - CAPACITOR, 47UF 25V £0.026 (min order 5=£0.13) http://uk.farnell.com/multicomp/mr25v476m6-3x7/capacitor-47uf-25v/dp/3017382?Ntt=30173821x D-SUB BU 25 LPT Connector 1084703 MULTICOMP - 5504F1-25S-02-03-F1 - SOCKET, D, PCB, R/A, 25WAY £0.75 Total £3.18 --- DarkStar USB/SPI Flasher: 1x PIC18F2455 1579600 PIC18F2455-I/SP - MCU, 8-BIT, 24K FLASH, SPDIP28 £4.35 http://uk.farnell.com/microchip/pic18f2455-i-sp/mcu-8-bit-24k-flash-spdip28/dp/1579600?Ntt=15796001x 28pin socket DIL Socket 28-Pin BL21X £0.21 http://www.maplin.co.uk/Module.aspx?ModuleNo=25301x 12Mhz Crystal 1611710 CITIZEN AMERICA - HC49US12.000MABJ-UB - CRYSTAL, 12M, 18PF CL, HC49/4H £0.42 http://uk.farnell.com/citizen-america/hc49us12-000mabj-ub/crystal-12m-18pf-cl-hc49-4h/dp/1611710?Ntt=16117102x 18pf capacitor Ceramic 18 WX47B £0.15 (£0.30) http://www.maplin.co.uk/Module.aspx?ModuleNo=3042x 10k ohm resistor 1652647 VISHAY BEYSCHLAG - METAL FILM RESISTOR £0.066 (£0.132) http://uk.farnell.com/vishay-beyschlag/b0207c10k00f5t/metal-film-resistor/dp/1652647?Ntt=16526475x 100 ohm resistor 1652646 VISHAY BC COMPONENTS - METAL FILM RESISTOR £0.02 (£0.10) http://uk.farnell.com/vishay-bc-components/5043100r0f12af5/metal-film-resistor/dp/1652646?Ntt=16526461x 100nf capacitor Metallised Ceramic Plate 10000pf WX77J £0.15 http://www.maplin.co.uk/Module.aspx?ModuleNo=3041x 220nf capacitor Metallised Ceramic Plate 22000pf WX78K £0.15 http://www.maplin.co.uk/Module.aspx?ModuleNo=304Header to mainboard: RA Lch PCB Plg 4-Way L65AZ £0.59 RA Lch PCB Plg 3-Way L64AZ £0.49 Jumper header: RA Lch PCB Plg 2-Way L63AZ £0.39 http://www.maplin.co.uk/Module.aspx?ModuleNo=1489USB B Socket 1308876 LUMBERG - 2411 03 - SOCKET, USB, TYPE B £0.31 http://uk.farnell.com/lumberg/2411-03/socket-usb-type-b/dp/1308876Total £7.592
|
|
|
|
|
Logged
|
|
|
|
|
blackillusion
|
 |
« Reply #437 on: January 01, 2010, 12:16:00 PM » |
|
wow, if those are all ok that'll be extremely helpful and i can order. Im not sure about the caps did you check using the formula for those on the crystal
|
|
|
|
|
Logged
|
|
|
|
|
doveman
|
 |
« Reply #438 on: January 01, 2010, 12:33:47 PM » |
|
I'm not sure about any of it, so I suggest you wait for someone else to confirm it's all good  Actually, as that crystal has a CL of 18pf, we probably need 2*31pf instead of 2*18pf. Maplins have 27pf or 33pf.
|
|
|
|
« Last Edit: January 01, 2010, 12:46:00 PM by doveman »
|
Logged
|
|
|
|
|
dak
|
 |
« Reply #439 on: January 01, 2010, 06:36:44 PM » |
|
I used 33pf on 8 flashers and they all work great.
|
|
|
|
|
Logged
|
|
|
|
|