Searching \ for '[PIC]PIC18F4550 board - is my schematic correct?' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/devices.htm?key=18F
Search entire site for: 'PIC18F4550 board - is my schematic correct?'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]PIC18F4550 board - is my schematic correct?'
2009\12\28@160710 by Nathan House

picon face
I'm making a PIC18F4550 board so I can learn USB, is my schematic correct?

http://www.roboticsguy.com/images/misc/PIC18F4550-board.png

Appreciate any advice you might have!

2009\12\28@173629 by mcd

flavicon
face
On Mon, 2009-12-28 at 16:05 -0500, Nathan House wrote:
I'm making a PIC18F4550 board so I can learn USB, is my schematic correct?
>
> http://www.roboticsguy.com/images/misc/PIC18F4550-board.png
>
> Appreciate any advice you might have!

The manuals for the Explorer 16 and the 28 pin starter board both include
schematics, both are available on the Microchip site, and both boards have
an 18Fx550 for USB.  When the board may be powered from the USB port,
Microchip sometimes likes to use an inductor in the line, I suspect to
eliminate any hash from the USB line, but studying someone else's
circuitry is always helpful for me.

Look at your MCLR circuitry.  Depending on the programmer, you may put +12
on the MCLR line during programming.  (Some programmers take care to
deliver something over +12.)  With only a 10K resistor to +5 you might
push +12 into your +5 supply, potentially damaging other parts.  10K is
fine if you aren't doing ICSP, but with the programmer connection, I'd be
a little nervous.

There are a few ways to deal with this.  Microchip suggests a diode (see
any of the ICSP documents online), but as long as you have SOME other
circuitry, changing this resistor to a very high value can also work.
MCLR itself draws next to nothing, so as long as this resistor is
physically close to the pin (very little capacitance) the value can be
quite high.  If your other circuitry can be counted on to draw at least a
few mils during programming, then a large resistor can give you the 7 or 8
volts drop you need.  In a lot of cases, 10K might do it, but it feels a
little low for me, although I just noticed your power LED, it might just
be enough.

--McD


2009\12\28@191900 by M.L.

flavicon
face

On Mon, Dec 28, 2009 at 5:37 PM,  <spam_OUTmcdTakeThisOuTspamis-sixsigma.com> wrote:
{Quote hidden}

10k will only pull up VDD by about 1.4mA - and he has an LED taking
several mA. It's not going to be an issue.

He should, however, ground the PGM line.

--
Martin K.

2009\12\28@214241 by Nathan House

picon face
I'm using an ICD3 as my programmer, if that makes a difference regarding the
voltage issue... I didn't know PGM should be grounded, thanks for pointing
that out!

If anyone has more suggestions for me I would appreciate your advice.

Thanks!

2009\12\29@101503 by Lucas Tanure

picon face
Put a 470uF capacitor on pin 18, I use this for regular capacitor 3.3v. It
would be nice to have a diode in MCLR to avoid loss of signal, the diode is
between the resistor and the pin. Debugger plug connects directly to the
pin.

2009\12\31@181556 by Barry Gershenfeld

picon face
I have done a project like this, where the USB is communications link from
an embedded device to be plugged into a PC, similar to using RS232 in the
good old days.  Meanwhile, the device operates on its own, whether its USB
is attached or not.
.
For keeping the power supplies separate, just don't connect anything to the
USB connector's pin 1.  They have a common ground, but the power supplies
are separate.  If you think something may take its power from the that USB
jack, then you are confusing hosts and devices, and several large
dissapointments are headed your way.  We'll assume not, and that this thing
really is a device.
.
As to sensing when it's connected, this is not done by detecting power
supplies, but rather by detecting that one of the data lines has been pulled
up.  (Can't find which right now, but I believe it is D+).  These lines are
normally pulled low.  When the cable is plugged in, one of the lines goes
high.  You connect a 100K resistor from that line to one of the PIC I/O port
pins.  The firmware watches for that pin to change state.  The source code
has a #define that lets you say which port pin you used for this.
.
One more firmware note.  This may have changed in later releases, but the
USB firmware I got sat in an infinite loop waiting for the connect to
happen.  Needless to say, the rest of the firmware was hung until that
happened.  It was an easy enough matter to change the code so that it polled
for that connection in my application's main loop instead.  Just something
else to watch for.


'[PIC]PIC18F4550 board - is my schematic correct?'
2010\01\01@032359 by Sarin Sukumar A
picon face
make
*R4,r1=1K
USE c1 and c2 =15pF or less or change oscillator to 8MHz

Check the datasheet for VUSB capacitor value
ADD some capacitor on 5V for regulation 10/1uF near the supply (usb
connector).

Remaining all are safe,

*

2010\01\01@070450 by Dario Greggio

face picon face
Barry Gershenfeld ha scritto:

> One more firmware note.  This may have changed in later releases, but the
[...]

Just a couple of notes, Barry:
yes it was the old 16C software - recent ones did "improve" this :)

And , as for the detection resistor, it used to be D- for low-speed,  D+
for full, and I'm not sure about high. And, on newer parts, it's no
longer added externally, rather available on chip and software-selectable.


--

Ciao, Dario
--
Cyberdyne

2010\01\01@082656 by Alan B. Pearce

face picon face
>And , as for the detection resistor, it used to be D-
>for low-speed,  D+ for full, and I'm not sure about high.

That is correct, and then for high speed, the device starts as full speed,
and then negotiates high speed mode, if it is capable of it.

2010\01\01@235037 by Nathan House

picon face
Thank you all for your help!

>Am I doing that, according to my schematic?

Quoting myself here... I didn't realize I had VBUS connected to VDD in my
schematic, and it is now fixed.

I've made a lot of changes to the schematic and especially to the PCB,
notably:

  - Grounded the PGM line.
  - Disconnected VBUS (voltage line from the USB cable) from VDD.
  - Changed LED resistors from 390 to 1K resistors (if the LEDs are not
  bright enough, I can always change back to 390 Ohm, right?).
  - Changed the crystal's capacitors from 22pF to 15pF.
  - Added 1uF and 100nF capacitors close to the power connector for
  stability.

Schematic:
http://www.roboticsguy.com/images/misc/pic18F4550-schematic-r3.png

PCB with parts labeled:
http://www.roboticsguy.com/images/misc/pic18F4550-pcb-board-labeled.png

One other thing that several people have mentioned, and which does not seem
to be agreed upon, is how to detect when the USB module is plugged in. I
found this image in the 4550 datasheet:
http://www.roboticsguy.com/images/misc/figure-17-11.png

Should I add the sense resistors, as shown in the above picture? Is it even
necessary? I don't understand why the microcontroller needs to know when it
is plugged in, as it is the host (PC) who initiates the communication
anyways..

2010\01\02@002001 by Sarin Sukumar A

picon face
I think it is nesessary because, your microcontroller should know the
presence of host to begin communication. it is better to impliment this,, u
wll require this while making the firmware.
if u r using usb stack provided by microchip u dont have to worry about
this...they have done all this for u. Use this file for more communication.
or u can check its source code
"mpusbapi.dll"

2010\01\04@135913 by Nathan House

picon face
Would a .33uF capacitor work for the VUSB pin? The datasheet says to use a
.22uF capacitor, but several people have recommended using .47uF. A .33uF is
in-between, and it's all I have on hand, but I don't know if it will work
OK?

2010\01\04@144439 by M.L.

flavicon
face
On Mon, Jan 4, 2010 at 2:58 PM, Nathan House <.....nathanpiclistKILLspamspam@spam@gmail.com> wrote:
> Would a .33uF capacitor work for the VUSB pin? The datasheet says to use a
> .22uF capacitor, but several people have recommended using .47uF. A .33uF is
> in-between, and it's all I have on hand, but I don't know if it will work
> OK?


I use a 1uF ceramic and it works fine.

--
Martin K.

2010\01\04@162124 by peter green

flavicon
face
Nathan House wrote:
> Would a .33uF capacitor work for the VUSB pin? The datasheet says to use a
> .22uF capacitor, but several people have recommended using .47uF. A .33uF is
> in-between, and it's all I have on hand, but I don't know if it will work
> OK?
>  
Should be ok as long as it's a suitable type (e.g. ceramic, polyester or
another low esr type)

2010\01\05@184537 by Barry Gershenfeld

picon face
> One other thing that several people have mentioned, and which does not seem
> to be agreed upon, is how to detect when the USB module is plugged in. I
> found this image in the 4550 datasheet:
> http://www.roboticsguy.com/images/misc/figure-17-11.png
>

That should work as well as anything else we described to you.  You just
want to detect when the cable is connected.  Doing it that way means you
will have to go back and get VBUS off of pin 1 of the connector, but be
careful to run it only to the sense resistors and not anywhere else.


> Should I add the sense resistors, as shown in the above picture? Is it even
> necessary? I don't understand why the microcontroller needs to know when it
> is plugged in, as it is the host (PC) who initiates the communication
> anyways..
>

I can't say for sure, but without it your code will be calling into the USB
library without a connection present, and I don't know if there's a way to
get stuck in there.   At the same time, you get the benfit of knowing when
the cable is disconnected, as well.  There are some disconnect routines that
clear buffers and any outstanding messages, and maybe turns off some
hardware.  It's easy enough to leave the resistor off and see what happens,
than to omit it and decide later you really wished you had a place to
install it.

More... (looser matching)
- Last day of these posts
- In 2010 , 2011 only
- Today
- New search...