主题中讨论的其他器件: EVM430-F6736、 MSP430F6736
您好!
我们正在尝试使用 MSP430F6726来实现单相电表、但我们在使用能量计库时遇到了一些问题。
我们知道 MSP430F6726只有两个 SD24通道、这非常适合我们、因为我们不需要中性电流支持。
我们使用了相同的电路图(没有中性电流部件)。 由于 MSP430F6726未包含在能量计库中、
请您指导我们进行必要的修改吗?
此致、
帕维尔
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
您好!
我们正在尝试使用 MSP430F6726来实现单相电表、但我们在使用能量计库时遇到了一些问题。
我们知道 MSP430F6726只有两个 SD24通道、这非常适合我们、因为我们不需要中性电流支持。
我们使用了相同的电路图(没有中性电流部件)。 由于 MSP430F6726未包含在能量计库中、
请您指导我们进行必要的修改吗?
此致、
帕维尔
您好 James、
默认情况下禁用零线监控。 我们将器件更改为 MSP430F6726、但这会导致 构建期间出现"与默认包含文件匹配失败"错误。
我们尝试在 io.h 中添加以下行
#Elif defined (_MSP430F6726__)
#define _MSP430_6726__
然后、我们得到的下一个错误是"未知架构!"、因此我们在 io.h 中添加了:
#Elif defined (_MSP430F6726__)
#include
现在项目编译无错误、电压测量工作正常、但电流始终为0 (我们将再次检查电路和代码)
感谢您的支持!
此致、
帕维尔
您好、Pavel、
编辑:我没有读过您的第一个错误。 您已经执行了此操作、我没有注意到。
[引用用户="Pavel Kristov"]
我们尝试在 io.h 中添加以下行
#Elif defined (_MSP430F6726__)
#define _MSP430_6726__
[/报价]
对于您的第一个错误、您处于正确的轨道上。 基本上、您需要再添加两行、将此定义链接到相应的头文件、如第443行和第444行。
添加这些代码行的另一种方法是在"io.h"文件中搜索"6736"并将其替换为"6726"。 不过、我只是添加了这些代码行、并在下面附上了这些代码行、方便您查阅。 这为我解决了错误。
io.h
//*按照 MSPGCC 处理包含特定模型头的方式建模*/ #ifndef _IO_H_ #define _IO_H_ #if defined (__IAR_systems_icc_)|| Defined (__IAR_systems_asm_asm__) //转换 IAR 生成的定义 * MSP430x1xx 系列 /#if defined (__MSP430C111__)|| defined (__MSP430F111__) #define __MSP430F112__ #Elif defined (__MSP430C112__)|| define (__MSP430F1121_ )|MSP430F1121_(__define MSP430F1121_)|MSP430F1121_(#define)_ MSP430F1121_ MSP430F1121_(#define) _ MSP430F1121_ MSP430F1121_(#define)_ MSP430F1121_ MSP430F1111_(#define)_ MSP430F1121_ MSP430F1111_(#define)_ MSP430F1121_ MSP430F121_(#define)_ MSP430F112_MSP430F112_MSP430F121_(#define (#define 已定义(__MSP430F1232__) #define __MSP430_1232__ #Elif defined (__MSP430C1331__)|| Defined (__MSP430F1331__) #define __MSP430F1331__ #Elif Defined (__MSP430F1351__)|MSP430F1351__ (__define MSP430F1451__ )|MSP430F1351__(__define (__define)|MSP430F141351__ (#define)|MSP430F141351__(#define 已定义(__MSP430F168__) #define __MSP430_168__ #Elif defined (__MSP430F169__) #define __MSP430F169__ #Elif defined (__MSP430F1610__) #define __MSP430F1610__ #Elif defined (__MSP430F1611__) #define MSP430F1610__#define (__MSP430F1610__ * MSP430x2xx 系列 / #Elif defined (__MSP430F2001__) #define __MSP430F2001__ #Elif defined (__MSP430F2011__) #define __MSP430F2011__ #Elif_(__MSP430F2012_ )#define MSP430F2012_(__MSP430F131_ )#define MSP430F2012_ MSP430 已定义(__MSP430F2252__) #define __MSP430F22252___ #Elif defined (__MSP430F2272__) #define __MSP430F2272__Elif defined (__MSP430F2234__) #define __MSP430F274__#Elif define (__MSP430F2370__MSP430F2350__define * msp430x3xx 系列 / #Elif defined (__MSP430C311S__) #define __MSP430C331__ #Elif defined (__MSP430C312__) #define __MSP430_312__ #Elif defined (__MSP430C313__)|#define (__MSP430C315_define)#MSP430C313__MSP430C325__ (__MSP430C315_define 已定义(__MSP430E337__)||已定义(__MSP430P337__) #define __MSP430_337__/ ********* * MSP430x4xx 系列 / #elif defined (__MSP430C412__)|| defined (__MSP430F412__) #define __MSP430_412__ #elif defined (__MSP430C413__)|| define (__MSP430F442__MSP430 定义)#define (__MSP430F424__MSP430F423__#define)#define MSP430 已定义(__MSP430FE425__) #define __MSP430_E425__ #Elif defined (__MSP430FE427__) #define __MSP430FE4274__ #Elif defined (__MSP430FE423A_define) #define _MSP430FE4242_MSP430E242__#define MSP430FE4242__MSP430E242__ #define _MSP430 _MSP430_435__ #elif defined (__MSP430F436__) #define __MSP430F436__Elif defined (__MSP430F437__) #define __MSP430F437__ #Elif define (__MSP430F4438_MSP430F46437__ #define)#define (__MSP430F46430F46424__#define )_MSP430 已定义(__MSP430F4783__) #define __MSP430F4783__ #Elif defined (__MSP430F4793__) #define __MSP430F4793__ #Elif defined (__MSP430F4794__) #define _MSP430F47186__#Elif define (__MSP430F47176__define ) __#Elif_ MSP430F47176__MSP430F4794__#define (__MSP430F47176__#define _MSP430_47197__ #elif defined (__MSP430F6726__) #define __MSP430F6726__ #elif defined (__MSP430F6733__) #define __MSP430F6733__ #elif define __MSP430F6736__) #define __MSP430F231_ (#define)#define _MSP430E1123_(#define_endif_msp430F1_)#define (#define_msp430F1_#define)#define (#define)#define_msp430_endif_msp430F1_(#define)#define (#define)#defendif_msp430_msp430_msp430_endif_msp430_endif_msp430_endif_msp430_endif_msp430F1_(#define)# #elif defined (__MSP430_110__)|| defined (__MSP430_112__) #include #elif defined (__MSP430_122__)|| defined (__MSP430_123__) #include #elif defined (__MSP430_1122__)|| defined (__MSP430_1132__) #include #elif defined (__MSP430_1222__)|| defineed (__MSP430_1232__) #include #elif defined (__MSP430_133__)|| defined (__MSP430_135__) #include #elif defined (__MSP430_147__)|| defined (__MSP430_148__)|| defined (__MSP430_149__) #include #elif defined (__MSP430_1331__)|| defineed (__MSP430_1351__) #include #elif defined (__MSP430_1471__)|| defined (__MSP430_1481__)|| defined (__MSP430_1491__) #include #elif defined (__MSP430_155__)|| defined (__MSP430_156__)|| defined (__MSP430_157__) #include #elif defined (__MSP430_167__)|| defineed (__MSP430_168__)|| defined (__MSP430_169__)|| defined (__MSP430_1610__)|| defined (__MSP430_1611__)|| defined (__MSP430_1612__) #include #Elif defined (__MSP430_2001__)|| defineed (__MSP430_2011__) #include #elif defined (__MSP430_2002__)|| defined (__MSP430_2012__) #include #elif defined (__MSP430_2003__)|| defined (__MSP430_2013__) #include #elif defined (__MSP430_2101__)|| defineed (__MSP430_2111__)|| defined (__MSP430_2121__)|| defined (__MSP430_2131__) #include #elif defined (__MSP430_2234__)|| defined (__MSP430_2254__)|| defined (__MSP430_2274__) #include #elif defined (__MSP430_311__)|| defined (__MSP430_312__)|| defined (__MSP430_313__)|| defined (__MSP430_314__)|| defined (__MSP430_315__) #include #Elif defined (__MSP430_323__)|| defineed (__MSP430_325__) #include #elif defined (__MSP430_333__)|| defined (__MSP430_337__) #include #elif defined (__MSP430_412__)|| defined (__MSP430_413__)|| defined (__MSP430_415__)|| defined (__MSP430_417__) #include #elif defined (__MSP430_423__)|| defined (__MSP430_425__)|| defined (__MSP430_427__) #include #elif defined (__MSP430_4250__)|| defined (__MSP430_4260__)|| defined (__MSP430_4270__) #include #elif defined (__MSP430_E423__)|| defineered (__MSP430_E425__)|| defineered (__MSP430_E427__) #include #elif defined (__MSP430_E423A__)|| defined (__MSP430_E425A__)|| defined (__MSP430_E427A__) #include #elif defined (__MSP430_E4232__)|| defineed (__MSP430_E4242__)|| defineed (__MSP430_E4252__)|| defined (__MSP430_E4272__) #include #elif defined (__MSP430_W423__)|| defineered (__MSP430_W425__)|| defined (__MSP430_W427__) #include #Elif defined (__MSP430_G434__)|| defined (__MSP430_G4338__)|| defined (__MSP430_G439__) #include #elif defined (__MSP430_435__)|| defined (__MSP430_436__)|| defined (__MSP430_43437__) #include #elif defined (__MSP430_447__)|| defined (__MSP430_448__)|| defined (__MSP430_449__) #include #elif defined (__MSP430_G4616__)|| defineed (__MSP430_G4617__)|| defined (__MSP430_G4618__)|| defined (__MSP430_G4619__) #include #elif defined (__MSP430_4783__)|| defineed (__MSP430_4793__) #include #elif defined (__MSP430_4784__)|| defineed (__MSP430_4794__) #include #elif defined (__MSP430_47163__)|| defined (__MSP430_47173__)|| defined (__MSP430_47183__)|| defined (__MSP430_47193__) #include #elif defined (__MSP430_47166__)|| defined (__MSP430_47176__)|| defined (__MSP430_47186__)|| defined (__MSP430_47196__) #include #elif defined (__MSP430_47167__)|| defined (__MSP430_47177__)|| defined (__MSP430_47187__)|| defined (__MSP430_47197__) #include #Elif defined (__MSP430F6726__) #include #Elif defined (_MSP430F6733__) #include #Elif defined (_MSP430F6736__) #include #Elif defined (_MSP430AFE253_) #include #elif defined (_MSP430__) #error "Unknown architecture! 请选中 "#include #endif #endif
此致、
James
MSP 客户应用