差别

这里会显示出您选择的修订版和当前版本之间的差别。

到此差别页面的链接

两侧同时换到之前的修订记录 前一修订版
后一修订版
前一修订版
howtocreatsymbol4kicad6 [2022/06/19 11:59]
gongyu
howtocreatsymbol4kicad6 [2022/06/21 16:09] (当前版本)
gongyu
行 6: 行 6:
  
 我们以一个LCD模块为例。这个模块非常通用,在我们硬禾的很多项目中都用上,它是一个尺寸为1.44寸,分辨率为128*128的LCD,SPI总线接口。 我们以一个LCD模块为例。这个模块非常通用,在我们硬禾的很多项目中都用上,它是一个尺寸为1.44寸,分辨率为128*128的LCD,SPI总线接口。
-{{ :lcd144spec.png |}} +{{ :lcd144pic.jpg |}}<WRAP centeralign>​1.44寸LCD屏幕的图片</​WRAP>​ 
-{{ :lcd144Pin.png |}} +{{ :lcd144spec.png |}}<WRAP centeralign>​1.44寸LCD屏幕的规格</​WRAP>​
-{{ :lcd144size.png |}}+
  
-In this recipe, you will learn how to create a custom symbol by creating a symbol for the 555 timer integrated circuit. There are plenty of libraries for KiCad that contain this symbol, but for the sake of learning, let's pretend that we can’t find it. +要绘制这个模块的原理图符号,需要知道它的管脚定义: 
-What we want to create is a symbol like the one in Figure 35.1. +{{ :lcd144Pin.png |}} <WRAP centeralign>​1.44寸LCD屏幕的管脚定义<​/WRAP> 
- +{{ :lcd144size.png |}} <WRAP centeralign>​1.44寸LCD屏幕的尺寸<​/WRAP>
-Our objective is to create a symbol that complies with the convention. In regards to IC symbols: +
-1. We arrange pins around a rectangle. +
-2. We group pins according to function (like inputs, outputs, power +
-etc.) +
-3. We place the Vcc pin on the top of the rectangle. +
-4. We place the GND pin on the bottom of the rectangle. +
-5. We choose an appropriate name and designator for the symbol. +
-Symbol designators are standardised;​ you can learn more about them here. +
-The physical component that we are working with is in Figure 35.2. This component comes in a standard DIP package with 8 pins. +
-Figure 35.2: The physical component is a 555 timer in a DIP package with 8 pins. +
-Because we are working to create a symbol, we don’t need to know anything about the physical characteristics of the physical component other than the total number of pins that its package contains. You need to know details about the physical characteristics when you are working on the footprint of the component. +
-However, it is beneficial to have access to the data sheet of the component. The data sheet contains information that you need: The names, numbers, and roles of each pin, whether they are input, output, bidirectional,​ power, signals, etc. All this is useful information,​ and the more you have on hand, the better. +
-The data sheet for the example component is available from its manufacturer. The information you need is on page 6, and I have included it in Figure 35.3 for your convenience. +
-Let’s start the process of creating a new symbol. In the main KiCad window, click on the Symbol Library Editor button (Figure 35.4). +
-Figure 35.4: Start the Symbol Editor. +
-You must store each symbol inside a library file, so before you start creating the symbol create a new library. Create a new library by clicking on +
-the 'New library'​ button (   ), or through the File menu. +
-Figure library; I have placed mine in a directory named '​Custom libraries’. +
-KiCad will ask you if you would like this library to be available to all projects ('​Global'​) or only to the current project ('​Project'​). Choose the most appropriate one for your circumstances (I chose '​Global'​). You are now working in the new library, and you will store the new symbol in it. You can confirm this by looking at the header of the Editor window. The path and name of the library you just created must be showing there. +
-Next, click on the '​Create new symbol'​ button in the top toolbar ( ). A prompt will ask you to select the library in which you will store the symbol. The library you just created should be listed. Click on it to select it and click '​ok'​ to continue. The Symbol Properties window will show up. The most important values that you need to complete are the symbol name and designator. The name typically consists of the physical component’s model name and any other information that helps to identify it. When you use it later, you have to search for it in the symbol library and having a good name will help you find it quickly. In my example, because I want to differentiate my 555 symbol to those that exist in other libraries, I add my initials '​PD'​ at the end of the name. +
-For the designator, you should not guess. Visit Wikipedia to see the Reference Designators table (https://​en.wikipedia.org/​wiki/​ Reference_designator). You can see a section of this table in Figure 35.5. The designator for integrated circuits is '​U,'​ so type this in the Default Reference Designator field. For an authoritative discussion on designator and standards, please refer to a series of articles written by Lawrence Joy at https://​txplo.re/​ 96bc7. +
- +
-Figure 35.6, shows the values I have entered in the Symbol Properties window. Other than the symbol name and the designator, everything else remains as per the default. +
- +
-Click Ok to commit and continue. KiCad will place the designator and symbol name in the middle of the sheet, on top of the other. Use the '​M'​ hotkey to relocate the two blocks of text. You should have something similar to the example in Figure 35.7. +
-Figure 35.7An empty new symbol. +
-Continue by drawing the outline of the symbol. You can either use the +
-polygon tool ( ) or the rectangle tool ( ) to do this. Your outline should look like the example in Figure 35.8. +
- +
-Add the background colour that is consistent with other IC symbols by opening the drawing properties window for the rectangle (place your mouse pointer on the rectangle line and type '​E'​). Under 'Fill Style',​ check the 'Fill background'​ radio button (Figure 35.9). +
- ​Figure 35.9: Fill the rectangle background. +
-Next, work on the pins. Keep the datasheet open because you need the information in it. For your convenience,​ refer to the excerpt in Figure 35.3. +
-Click on the pin button in the right toolbar ( ). Place the 8 pins around the perimeter of the symbol outline, as in the example of Figure 35.1. The thing to remember here is that the convention is to group similar pins together and place the two power pins to the top and bottom of the rectangle. Let’s start with the Vcc pin. According to the datasheet, the Vcc pin is number 8, and according to the convention, it should go to the top edge of the rectangle. Click on the pin tool, and then click in the middle of the top edge. The Pin Properties window will come up. Fill it as you can see in the example in Figure 35.10. +
- +
-In Figure 35.10, the fields inside the box are the ones that you need to focus on. The pin name is arbitrary, but of course, you should use a name that is appropriate. I usually use the same name that I see in the documentation for this pin. The Pin number, on the other hand, is very important. The Pin number is how schematic symbols and footprints can associate physical and symbolic pins. When you design the custom footprint for this physical component in the '​Creating new footprint'​ recipe, it is the number that you put in the Pin number field that dictates which net in the schematic diagram connects to the correct pad in the footprint. Take the pin number for the Vcc pin from the documentation ('​8'​) and type it in this field. +
-In the orientation drop-down, select the option that matches the side of the rectangle where you are attaching the pin. The Vcc pin should go on the top of the rectangle and should have its circular connector pointing away from the rectangle. The horizontal line of the pin orientation icon represents the rectangle. If you wanted to place the pin on the left of the rectangle, you would choose the icon with the circular connector printing towards the left. +
-Finally, because the Vcc pin is a power pin, I have selected the 'Power input' electrical type. You should choose the same type for the GND pin. +
-Click Ok to commit the changes. Place the pin in the middle of the top side of the rectangle, as you can see in Figure 35.11. I have moved the text block so that they don’t overlap with the pin. +
- +
-Follow the same process to add the GND pin (pin 1) in the bottom edge of the rectangle. Copy the pin name and number from the datasheet, and mark it also as a Power Input. +
-Continue with the left side of the rectangle where you should place the input pins. According to the datasheet, the input pins are RESET, THRES, TRIG. There is one bidirectional pin, '​CONT,'​ which you can place either on the left or the right of the rectangle. I have placed it on the left. Your symbol should look like the example in Figure 35.12. +
- +
-The pin attributes for the input pins on the left of the symbol look like the example in Figure 35.13. Remember that pin 5 is bi-directional so its electrical type should be '​bidirectional'​. +
- +
-Continue in the same way to create the last two pins. Those are output pins, as per the datasheet. Use the pin names and numbers as those appear in Figure 35.3 for pins 7 and 3. When completed, you should have a symbol that looks like the example in Figure 35.14. +
- +
-The last thing to do is to add the URL for the real-world component datasheet to the symbol properties. This will be useful to you for future reference. It will be surely useful when you go ahead to create a custom footprint to match the symbol. To add the datasheet URL, click on the Symbol, '​Fields...'​ to bring up the Field Properties window. Click on the Datasheet row to select it and then copy/paste the URL in the Field Value field (Figure 35.15). Click Ok to commit the changes. +
- +
-Your work is complete. Save the symbol to the selected library by +
-clicking on the Save Current Symbol button ( ). Then, test that you can use it in Eeschema. Open Eeschema. Go into Symbol Libraries from the Preferences menu and add the new library (read the relevant recipe if you don’t know how to do this). Place your cursor on the Sheet and type '​A'​ to add a new symbol. Search for the name of your library by typing part of its name in the filter field (Figure 35.16). The library should appear. Double-click on the symbol to drop it on the sheet. +
- +
-The custom 555 symbol should now be in place inside Eeschema, and you can go ahead to use it as you do with any other symbol (Figure 35.17). +
-Figure 35.17: Your new custom symbol in Eeschema. +
-In this recipe, you learned how to create a brand-new symbol. What if you have found a symbol that is close to what you want, but could be perfect with a bit of tweaking? In other words, what if you want to modify an existing symbol? You can learn how to do this in the '36. Modifying an existing component (symbol)'​ recipe.+
  
  
  
 +步骤:
 +  - 所有的管脚围绕一个长方形.
 +  - 根据功能将相应的管脚放置在一起
 +  - 将电源管脚放置在长方形的上方
 +  - 将地管脚放置在长方形的下方
 +  - 给这个符号选择一个适当的名字和标示前缀
  
 +符号的标示前缀有标准,符合一些潜规则
  
 +创建原理图的符号,无需知道器件的物理属性,需要知道的是总计有多少个管脚,每个管脚的名字和属性
 +参考规格书,确定每个管脚的名字、编号、作用(输入、输出、双向、电源、信号)
 +参考规格书一般都来自于生产该器件的官方网站
  
 +我们开始创建:
 +  - 打开。。。。按钮
 +  - 选择一个合适的库,全局还是项目
 +  - 点击“创建一个新符号”按钮,选择你要存放新符号的库,点击OK
 +  - 弹出一个图纸 - 符号名字和标识符前缀,我们使用LCD144-128x128-SPI
 +  - 标示符 - 根据潜规则选择
 +  - 绘制符号的外形轮廓 - 多边形工具
 +  - 添加背景颜色 - 同库里的其它器件一致的颜色
 +  - 添加管脚 - 对照数据手册,根据功能放置
 +  - 再调节一下外形轮廓
 +  - 编辑属性
 +  - 添加数据手册链接 - 未来参考,创建封装的时候也会用到,这个LCD144的链接:[[https://​item.taobao.com/​item.htm?​spm=a1z10.1-c-s.w13612060-23991449468.13.14236130sHB0fD&​id=565115137882|1.44寸液晶屏 1.44寸TFT LCD SPI串口模块TFT彩屏st7735 彩色tft]]
 +  - 保存
 +  - 检查 - 加载
 +  - 
  
  
行 78: 行 48:
 <WRAP group> <WRAP group>
 <WRAP half column> <WRAP half column>
-上一节:[[creatschinkicad6|第30节:创建原理图]]+上一节:[[creatschinkicad6|第30节:创建灯板的原理图]]
 </​WRAP>​ </​WRAP>​