Microchip
直播中

王燕

7年用户 222经验值
私信 关注
[问答]

配置器非常混乱

我正在做一个电路的示例项目,我将布局(将使用PIC32 MZ)。所以我使用的是HARMony pin配置管理器,但我就是无法弄清楚(我使用的是.ony、configurator等的所有最新版本)。假设我想配置以下几个pinsas:RG15:LED_ALARM,output,lowRA5:PA._SWITCH,input,pullup onRE5:MOTOR_DRIVE,output,low所以我在MHC配置器PIN SETtiNGS TAB中设置所有这些,并选择希望使用UART&一些uart选项&点击代码ge嵌套按钮。到目前为止没问题……一堆文件神奇地出现了。现在,我怎么/在哪里编写代码来打开LED_ALARM?即使我输入app.c或m a in.c,这个名称似乎在任何地方都不会自动“弹出”……我是否遗漏了某些内容(比如需要手动拉入头文件?)好像它还没有“学会”我的PIN名字。我是否使用适当的程序来命名配置器中的PIN?我找不到在PIN配置器文档中描述任何地方的过程!我四处寻找关于用配置器设置基本引脚I/O的协调信息,但是找不到????

以上来自于百度翻译


      以下为原文

    I am doing a sample project for a circuit I will layout (will use a pic32Mz).  So I am using the Harmony pin configuration manager, but I simply can't figure it out (I am using all of the latest versions of harmony, configurator, etc).  Say I want to configure a few pins as the following:
RG15:  LED_ALARM, output, low
RA5:  PANIC_SWITCH, input, pull up on  
RE5:  MOTOR_DRIVE , output, low
So I set all of this up in the MHC configurator PIN SETTINGS TAB, along with selecting  my desire to use the UART & some uart options & hit the code generation button.  No problem so far...a bunch of files magically appear.
Now how/where do I, say, write a line of code to turn on my LED_ALARM?  The name does not seem to auto "pop up" anywhere even when I'm typing in either my app.c or main.c    ...did I leave something out (such as needing to manuall pull in a header file?) It's as though it hasn't "learned" my pin names.  Am I using the proper procedure to name my pins in the configurator? I can't find the procedure described anywhere in the pin configurator documentation!

I looked around for Harmony info on setting up basic pin  I/O with the configurator, but couldn't find it???
   

回帖(7)

李蕊

2019-6-17 15:06:12
你用什么牌子的?板支持包?Digilents的WF32板:http://micro..wikidot.com/.ony:.-labs的一个示例,因为我使用了BSP包,所以LED3可以称为BSP_LED_3I,可以从main.c app.c:BSP_LEDToggle(BSP_LED_3)调用app.c;我第一次经历的时候,我一直在想“这个状态机的东西是什么,我只想切换LED”。稍后,当试图保持一切正常时,状态机很有意义,所以就跟着流程走。我犯的其它错误是没有使用BSP。没有定义任何内容,并且我试图强制使用pin,所以直到我想到和谐定义(喜欢右键单击名称以查看调用映射)时,它才令人沮丧!售价69美元的WF32板是一个不错的介绍板。让我们知道你使用的开发板,所以我们可以使用相同的BSP命名。

以上来自于百度翻译


      以下为原文

    What board are you using? Board Support Package?
 
An example with Digilents's WF32 board:
http://microchip.wikidot.com/harmony:intro-labs
 
Since I used the BSP package, LED3 can be called BSP_LED_3
 
I can call app.c from main.c
 
app.c:
BSP_LEDToggle(BSP_LED_3);
 
Read through the entry labs. First time I went through I kept thinking "what is with this state machine stuff,
I just want to toggle the LED's".  Later the state machine makes a lot of sense when trying to keep everything straight, so just go with the flow.
 
Other mistake I made was NOT using a BSP. Nothing was defined and I was attempting to force a pin, so it was
frustrating until I thought in terms of Harmony definitions (love that right click over a name to see the call map!)
 
The WF32 board for $69 is a decent intro boards.
 
Let us know what development board you are using, so we can use he same BSP naming.
举报

李蕊

2019-6-17 15:25:37
你用什么牌子的?板支持包?Digilents的WF32板:http://micro..wikidot.com/.ony:.-labs的一个示例,因为我使用了BSP包,所以LED3可以称为BSP_LED_3I,可以从main.c app.c:BSP_LEDToggle(BSP_LED_3)调用app.c;我第一次经历的时候,我一直在想“这个状态机的东西是什么,我只想切换LED”。稍后,当试图保持一切正常时,状态机很有意义,所以就跟着流程走。我犯的其它错误是没有使用BSP。没有定义任何内容,并且我试图强制使用pin,所以直到我想到和谐定义(喜欢右键单击名称以查看调用映射)时,它才令人沮丧!售价69美元的WF32板是一个不错的介绍板。让我们知道你使用的开发板,所以我们可以使用相同的BSP命名。

以上来自于百度翻译


      以下为原文

    What board are you using? Board Support Package?
 
An example with Digilents's WF32 board:
http://microchip.wikidot.com/harmony:intro-labs
 
Since I used the BSP package, LED3 can be called BSP_LED_3
 
I can call app.c from main.c
 
app.c:
BSP_LEDToggle(BSP_LED_3);
 
Read through the entry labs. First time I went through I kept thinking "what is with this state machine stuff,
I just want to toggle the LED's".  Later the state machine makes a lot of sense when trying to keep everything straight, so just go with the flow.
 
Other mistake I made was NOT using a BSP. Nothing was defined and I was attempting to force a pin, so it was
frustrating until I thought in terms of Harmony definitions (love that right click over a name to see the call map!)
 
The WF32 board for $69 is a decent intro boards.
 
Let us know what development board you are using, so we can use he same BSP naming.
举报

张健

2019-6-17 15:36:03
正如我提到的,我没有使用任何板(没有购买的微芯片板,因为我的I/O设备看起来一点都不像它们,比如电机驱动)……这是我自己的设计,所以假设有一个芯片和开关、led等等。我如何使用引脚配置器设置所有的I/O????我假设这是用来建立I/O.的方法。

以上来自于百度翻译


      以下为原文

    As I mentioned, I am not using any board (no purchased microchip board, since my I/O devices will not look at all like any of them, such as motor driving)...this will be my own design, so just assume a chip and the switches, leds, etc.   How do I set up all of my I/O using the pin configurator???  I assume that is what is to be used to set up the I/O.
 
举报

陈晨

2019-6-17 15:52:57
您可以使用PIN配置器来配置端口。使用它不是恶意的。您还可以直接使用库函数或直接使用寄存器。

以上来自于百度翻译


      以下为原文

    You can use the pin configurator to configure the ports. It is not mantitory to use it. You can also use the library functions directly or use the registers directly
举报

更多回帖

发帖
×
20
完善资料,
赚取积分