-
Notifications
You must be signed in to change notification settings - Fork 744
Conversation
Travis CI doesn't like that I didn't add a datasheet, but I couldn't find one that is official, includes the CH340G, and is in English. Should I add one? If so, which one? I am leaning towards the official Chinese one. |
I put |
First, thanks for adding this IC and for keeping an eye out when another PR was submitted. We really appreciate the community making sure desirable parts are in the library. You've made good reference of other parts in the library. Some of them are old symbols, and the latest guidelines for the library are at http://kicad-pcb.org/libraries/klc/, if you hadn't found that already. Ugh. There isn't a good choice of datasheet. We need an English one but I don't find anything better than the options you showed above. Perhaps we include both WCH links above. I have emailed WCH about this to see. @poeschlr ? Since V3 cannot source current (that I can find), Passive type should be fine. Review feedback:
|
Why is V3 passive? |
Pin types are used for the ERC engine to help identify mis-connection. There is no other reason for pin types in KiCad. In any configuration, V3 is only connected to a passive component and not other pins where the ERC engine could help catch issues. The pitiful documentation means we can't be too sure what the pin really does and connects to in the die, but we can see there are two states:
It's quite reasonable to want to power the IC from 5V since the USB connector can supply it, but that doesn't explain the V3 pin. There's not a combination of both conditions above that I find meshes well together. If I thought a bit more perhaps I could come up with other scenarios, but that's not an official description of the pin anyway. Considering the possible connections of the pin and the reason for setting pin types, Passive is a reasonable choice. If we knew more, perhaps we could choose differently. A bit long-winded, but does that help? |
Here is my best guess about what V3 does: |
I would agree about the function, but those guesses don't align into a single pin type. Nor does it matter since in neither condition is the pin tied to the pin of another IC or to be used as a current source. So, Passive works and shouldn't cause any false negatives in the ERC engine. |
No No No!! USB signaling is 5V! |
In my opinion V3 should be an input since it acts like one. |
USB VBUS is 5V, but the signaling for low-speed and full-speed is 3.3V https://en.wikipedia.org/wiki/USB#Electrical_specification |
V3 is probably regulator output pin for USB transceiver and core logic. Vcc defines logic levels on UART side. When you power this IC from 5V, internal LDO is used and V3 pin is power output of this LDO. If you want 3.3V levels on UART side, you'll just short V3 and VCC and power whole IC from 3.3V. |
@diggit @GrantM11235 |
Sounds good to me |
Sorry for the wrong info |
@evanshultz Have you gotten a response from WCH? |
Nope. :( Thanks for pinging me. @poeschlr |
What datasheets to distributors provide? (So digikey, farnell, ...) |
That's just it: none of them I can find carry the IC by itself. SparkFun hosts the unofficial English datasheet. Other than that, it's the options above from the vendor, neither of which are great. Personally, I'd go with the unofficial one so at least it's English and covers this specific IC (the "G" suffix). |
@poeschlr |
@poeschlr The options I see are:
I prefer the third one. |
Ok lets go with option 3 here. |
Great. @GrantM11235 |
Done |
Thanks for sticking it out through this saga! |
Unofficial CH340G translated datasheet: www.datasheet5.com/pdf-local-2195953
Official CH340 English datasheet (no CH340G): http://wch-ic.com/downfile/79
Official CH340 Chinese datasheet (including CH340G): http://www.wch.cn/downloads/file/79.html
Screenshot (updated for commit bc12df2)
The layout is based on the unofficial datasheet with a few modifications to make it more consistent with other KiCad symbols:
VCC
andGND
on top and bottomUD+
andUD-
toD+
andD-
D+
andD-
near center of left sideD- above D+R232
configuration pin on left sideV3
is meant to be connected toVCC
when VCC is 3.3V, or simply a decoupling capacitor to ground when VCC is 5V. I set its electrical type to "passive", but I am not sure if that is right.Thanks for creating a pull request to contribute to the KiCad libraries! To speed up integration of your PR, please check the following items:
If there are matching footprint PRs, provide link(s) as appropriate