USB PIC ANSCHLUSS

Gast #3071299
Lesenswert?

Hi,

Bräuchte euren Rat.

Die Steuerung was an die Schaltung später kommt soll vom PC aus über USB 
gesteuert werden.

Ist der Anschluss richtig, die Platine hat eine eigene Stromversorgung 
und die Schaltung laut dem Bild.

Oder soll ich da was ändern?

MFG
Angehängte Dateien:
Gast #3071418
Lesenswert?

VBUS ist ok, entweder ignorieren oder als USB_BUS_SENSE an einen Eingang 
führen. (Üblich ist aber Spannungsteiler auf 3,3V statt auf 2,5V).

Bei VUSB gibt es zwei Arten. Bei manchen Pics ist VUSB ein Eingang - auf 
3,3V legen. Bei Anderen muss man einen Kondensator anschließen.
#3071445
Lesenswert?

Ja, deine Verdrahtung passt. Jedoch wirst du noch einen 5V toleranten 
Pin am PIC für USB_BUS_SENSE in der USB firmware opfern müssen, sofern 
du USE_USB_BUS_SENSE_IO aktivierst, was man nach USB Spezifikation muss 
(muss aber für Eigengebrauch nicht), vor allem nötig wenn das Gerät vom 
PC im Betrieb abgesteckt werden kann.
Durch diesen extra Pin erkennt die Firmware wann das Gerät an einen PC 
gesteckt wird und schaltet daraufhin das USB Modul ein. Nutzt du diese 
Funktion nicht, bleibt das USB Modul ständig an und schaltet sich nicht 
ein/aus.
Gast #3072862
Lesenswert?

Frank M. schrieb:
> Ja, deine Verdrahtung passt. Jedoch wirst du noch einen 5V toleranten
>
> Pin am PIC für USB_BUS_SENSE in der USB firmware opfern müssen, sofern
>
> du USE_USB_BUS_SENSE_IO aktivierst, was man nach USB Spezifikation muss
>
> (muss aber für Eigengebrauch nicht), vor allem nötig wenn das Gerät vom
>
> PC im Betrieb abgesteckt werden kann.
>
> Durch diesen extra Pin erkennt die Firmware wann das Gerät an einen PC
>
> gesteckt wird und schaltet daraufhin das USB Modul ein. Nutzt du diese
>
> Funktion nicht, bleibt das USB Modul ständig an und schaltet sich nicht
>
> ein/aus.


Ich dachte durch den VBUS erkennt er schon das da was an dem USB 
angeschlossen ist ???

oder verstehe ich da was falsch??

MFG
#3073056
Lesenswert?

Stefan schrieb:
> Ich dachte durch den VBUS erkennt er schon das da was an dem USB
> angeschlossen ist ???
>
> oder verstehe ich da was falsch??
>
> MFG

leider ist das nicht der Fall.
Soweit ich mich erinnern kann, habe ich mal in einem Microchip Forum 
gelesen, dass man mit etwas getrickse, indem man irgendwie das USB OTG 
Modul nutzt, es auch ohne Sense_Pin hinbekommt. Genaueres weiß ich dazu 
aber nicht. Ich nutze einen Sense_Pin.

Denn normalerweise:

Zitat aus Microchip USB Device Firmware Framework User’s Guide
http://ww1.microchip.com/downloads/en/DeviceDoc/51679b.pdf
1
USE_USB_BUS_SENSE_IO indicates that the firmware will use the pin defined in
2
HardwareProfile.h to determine when to enable the USB module. If the target
3
board design does not use an I/O pin to detect the presence of the USB bus, this
4
definition must be commented out.
5

6
When USE_USB_BUS_SENSE_IO is undefined, the USB module will always be
7
enabled. Using this feature helps to improve the power efficiency of the system
8
because the USB module is only enabled when the bus is present. Additionally, in
9
order for the device to pass USB compliance certification, all self-powered
10
devices are required to support a bus sense feature. Self-powered devices which
11
do not implement this feature will fail the back drive voltage tests. The USB specifications
12
require that devices should not source current on D+ or D- (and never
13
VBUS) unless the host is actively powering the VBUS line. A self-powered device
14
will not know when the host is actively powering VBUS (and when it is acceptable
15
to enable the D+ or D- pull-up resistor) unless a bus sense feature is
16
implemented. Purely bus-powered devices do not need to implement this feature
17
and this feature may be commented out

Antwort schreiben

Bitte melde dich an, um einen Beitrag zu schreiben.

oder

Mit Google-Account einloggen

Die Registrierung ist kostenlos und dauert nur eine Minute.

Jetzt registrieren