完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
电子发烧友论坛|
我是一个需要帮助的新手。我想用最初的这个.ASM文件来执行一个无线控制时钟(不是我的项目)。不幸的是,我不知道我得到的PIC16F628 A不适用。有人能帮助我详细地把MODS建议给这个文件,考虑到我不知道。知道大会吗?谢谢你
以上来自于百度翻译 以下为原文 I'm a newbie needing help.I would like to carry out a radiocontrolled clock (not my project) using originally this .asm file Unfortunately I didn't know that the PIC16F628A that I got,doesn't work with it. Can someone help me suggesting in detail the mods to this file,taking into account that I don't know the assembly? Thank you Attachment(s) dcf77.asm (14.01 KB) - downloaded 148 times |
|
相关推荐
19个回答
|
|
|
这张照片的两个版本只有几个不同之处。不起作用“真的没用,它什么也没告诉我们。请具体说明:PIC是做什么的?它不做什么?这里是迁移文档的链接:HTTP:/WW1.MICCHIP.COM/DeLooSs/En/DeVICEDC/O48A.PDF。
以上来自于百度翻译 以下为原文 There are only a few differences betwen the two versions of this pic. "doesn't work" really is useless, it tells us nothing. Please be more specific: what does the pic do? what does it NOT do? Here is a link to the migration document: http://ww1.microchip.com/downloads/en/DeviceDoc/40048a.pdf . |
|
|
|
|
|
请参阅PIC16F62A/628 A/648 A迁移(DS400 48 A)。唯一的显著差异是,在代码中不能补偿的电子规格,以及配置比特,您必须改变这些配置比特:必须使用“628数据表”,然后使用其数据表,为“62A”写一个新配置。ND替换所有文本:16F628与16F628,这是一个FugLy*的方式来指定一个配置字。MPASM P16F….Inc包括文件,每个配置位都有有意义的名称,转到MMPASM文件夹,并在P16F628 A.Inc文件中查看参数和模板/代码/16F628 ATMU.ASM,以便在实际的Y-O.CONFIG指令中使用它们。
以上来自于百度翻译 以下为原文 See PIC16F627A/628A/648A Migration (DS40048A) The only significant differences are electrical specs, which you cant compensate for in code, and the CONFIG bits, which you must change You'll have to decode what: PROCESSOR 16F628 RADIX DEC INCLUDE "P16F628.INC" __CONFIG 11110100010100B means using the '628 datasheet then write a new config for the '628A using its datasheet, and replace all text: 16F628 with 16F628A That's one *FUGLY* way to specify a Config word. The MPASM P16F....INC include files have meaningful names for each Config bit - goto your MPASM folder and look in the p16f628a.inc file for the parameters and in Template/Code/16F628ATEMP.ASM for how to use them in an actual __CONFIG directive. |
|
|
|
|
|
是的,我几乎可以互换它们…配置设置有点不同,这会阻止它们启动。
以上来自于百度翻译 以下为原文 Yeah, I used them almost interchangeably... CONFIG settings are a bit different and it would prevent them from starting |
|
|
|
|
|
是的,Hth:
以上来自于百度翻译 以下为原文 Yeah, HTH: #IFDEF __16F628 ; sul 628 non ci sono analogici... list p=16F628,r=dec ; list directive to define processor, r=RADICE numerica di default (dec, hex...) #include __CONFIG _CP_OFF & _WDT_ON & _BODEN_ON & _PWRTE_ON & _HS_OSC & _MCLRE_OFF & _LVP_OFF ; '__CONFIG' directive is used to embed configuration data within .asm file. ; The lables following the directive are located in the respective .inc file. ; See respective data sheet for additional information on configuration word. messg "*** Creazione programma per 16F628" #endif #IFDEF __16F628A ; sul 628 non ci sono analogici... list p=16F628A,r=dec ; list directive to define processor, r=RADICE numerica di default (dec, hex...) #include __CONFIG _CP_OFF & _WDT_ON & _BODEN_ON & _PWRTE_ON & _HS_OSC & _MCLRE_OFF & _LVP_OFF messg "*** Creazione programma per 16F628A" #endif |
|
|
|
|
|
谢谢大家。对不起:我犯了一个我感到羞愧的错误,所以现在用MaPaBide IDE和两个图片都得到同样的十六进制。只有一个问题,就是不称职,我不知道如何解决。我附加了.txt .rr文件,再次请求帮助。只是警告或错误阻止正确的操作?
以上来自于百度翻译 以下为原文 Thank you to everybody. And sorry:I made a mistake of which I am ashamed,so now with MAPLAB IDE I get the same HEX with both PICs. There is just a problem that being incompetent,I don't know how to solve. I attache as .txt the .err file,asking again for help. Just warnings or errors preventing the correct operation? Attachment(s) dcf77.txt (3.39 KB) - downloaded 119 times |
|
|
|
|
|
更改包含“P16F628。Inc”的行,而不是包含“P16F628 A.Inc”,用“RES”指令去掉所有行中的两个前导空间。
以上来自于百度翻译 以下为原文 Change the line where "P16F628.INC" is included, to instead include "P16F628A.INC" Get rid of the two leading spaces on all the lines with the "RES" directive. |
|
|
|
|
|
现在,Err文件要小得多,但是最后两行困扰着MeMeSea[302 ] C:文档和设置管理员DealTrimeDCF.ASM 131:在操作数中注册而不是在银行0中注册。确保银行位是正确的。消息[302 ] C:文档和设置Ad\DealTrimeDCF.ASM 132:在操作数中注册而不是在银行0中注册。确保银行比特正确无误。
以上来自于百度翻译 以下为原文 Than you all againSmile: Message[302] C:DOCUMENTS AND SETTINGSADMINISTRATORDOCUMENTIDCF.ASM 131 : Register in operand not in bank 0. Ensure that bank bits are correct. Message[302] C:DOCUMENTS AND SETTINGSADMINISTRATORDOCUMENTIDCF.ASM 132 : Register in operand not in bank 0. Ensure that bank bits are correct. |
|
|
|
|
|
HiTes只是警告。你要做的是确保在这些行之前选择正确的RAM库,这样你就不会访问错误的寄存器。查看数据表上的“数据存储组织”部分。
以上来自于百度翻译 以下为原文 Hi Those are only warnings. All you have to do is, make sure that the correct RAM bank is selected before those lines so you don't end up accessing the wrong register. Review "Data Memory Organization" section on the datasheet. Best regards Jorge |
|
|
|
|
|
是的,这只是一个“消息”,甚至不是一个“警告”。它只是告诉你,你正在访问的地址不在银行0。你的代码是正确选择银行1。汇编器太笨,无法跟踪选择哪一个银行,检查是否正确。
以上来自于百度翻译 以下为原文 Yep, it's just a "message" not even a "warning". It's just advising you that you are accessing addresses that are not in bank 0. Your code is correctly selecting bank-1. The assembler is too dumb to track which bank is selected and check if you have done it correctly. |
|
|
|
|
|
如果他们打扰你太多,让他们眨眼消失:
以上来自于百度翻译 以下为原文 If they bother you too much, make them disappear with errorlevel -302 ; turn off banking msg wink: |
|
|
|
|
|
是的微笑:这不是困扰我的信息,而是它真正的意义!所以特别感谢QHB。
以上来自于百度翻译 以下为原文 Yes Smile: |
|
|
|
|
|
对于所有组装错误、警告和消息的含义,请查看MPLAM用户指南中的“错误、警告、消息和限制”章节,在MPLAB安装文件夹中可用。
以上来自于百度翻译 以下为原文 For the meaning of all the assembly errors, warnings, and messages, take a look to the "Errors, Warnings, Messages, and Limitations" chapter of the MPASM User's Guide, available in your MPLAB install folder. |
|
|
|
|
|
其他问题。我安装了最后一个MPLAB 8.92(以前是8),现在“构建失败”“错误-部分”。Org1不能适应绝对的部分。节'Org1 '开始= 0x00亿,长度=0x000 000 0340“,所以它不起作用,现在发生了什么?
以上来自于百度翻译 以下为原文 Other problems.I installed the last MPLAB 8.92 (previous was 8.00) and now "BUILD FAILED" "Error - section '.org_1' can not fit the absolute section. Section '.org_1' start=0x00000000, length=0x00000340" .So it's not working,what happened now? Attached Image(s) |
|
|
|
|
|
该错误是使用可重定位模式组装绝对代码/指令的结果。您的邮政编码1的代码与可重定位指令混合绝对值。尝试替换或替换
以上来自于百度翻译 以下为原文 That error is a result of assembling absolute code/directives using relocatable mode. Your code from Post #1 is mixing absolute with relocatable directive. Try replacing ORG 20H with udata or udata 0x20 and replacing ORG 0 with code 0 |
|
|
|
|
|
谢谢,谢谢。DONE.当我选择“构建失败”和错误[149 ] C:PROFADCF1.ASM 46:当生成对象文件错误时,只允许使用指令: PROVADCF1.ASM 96:当生成一个对象文件时,只允许在我选择可重定位时,得到与前和MP相同的十六进制。链接4.49,Link设备数据库版本1.14版权(C)1998年-2011年Microchip Technology Inc.错误:0MP2HEX 4.49,COFF到HEX文件转换器版权(C)1998—2011微芯片技术公司错误:0PoFaCDCF.COO.---------------------------------DEBUCG项目的建立:语言工具版本:MPASMWIN .EXE V5.51、MPLIKIN .EXE V4.49、MPLBI.EXE V4.49预处理器符号'*调试'。SAT APR 08 16:45∶14 2017—----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------现在,绝对和可重定位之间的差异,但我问:“如果我用这个十六进制编程的PIC16F628 A仍然是相同的(当生成时),它是否工作?”对不起我的愚蠢问题,谢谢。
以上来自于百度翻译 以下为原文 Thank you.Done.When I choose absolute,no HEX,"BUILD FAILED" and Error[149] C:PROVADCF1.ASM 46 : Directive only allowed when generating an object file Error[149] C:PROVADCF1.ASM 96 : Directive only allowed when generating an object file When I choose relocatable,I got the same HEX as before and MPLINK 4.49, Linker Device Database Version 1.14 Copyright (c) 1998-2011 Microchip Technology Inc. Errors : 0 MP2HEX 4.49, COFF to HEX File Converter Copyright (c) 1998-2011 Microchip Technology Inc. Errors : 0 Loaded C:provaDCF.cof. ---------------------------------------------------------------------- Debug build of project `C:provaDCF.mcp' succeeded. Language tool versions: MPASMWIN.exe v5.51, mplink.exe v4.49, mplib.exe v4.49 Preprocessor symbol `__DEBUG' is defined. Sat Apr 08 16:45:14 2017 ---------------------------------------------------------------------- BUILD SUCCEEDED Unfortunately,I don't know the difference between absolute and relocatable,but I ask: "If I program my PIC16F628A with this HEX which is still the same (when generated),does it work or not?" Sorry for my silly questionswink: |
|
|
|
|
|
RES是可重定位的指令。绝对代码不能与可重新定位的代码混合。绝对代码使用CbOb/EntC(或不太优选的)指令来定义变量,而可重定位代码使用各种UDATA和RES指令来保留变量。绝对代码使用ORG指令,而可重定位代码使用代码指令来定位程序代码段。主要区别是可重定位模式使用链接器,而绝对模式不使用链接器。在绝对模式下,程序员必须做所有事情(这意味着更多的控制)。建立成功并拥有一个十六进制文件并不等同于一个工作代码。;)
以上来自于百度翻译 以下为原文 RES is a relocatable directive. You cannot mix absolute code with relocatable code. Absolute code uses CBLOCK/ENDC (or the less preferred EQU) directive to define variables, while relocatable code uses the various UDATA and RES directives to reserve variables. Absolute code uses the ORG directive while relocatable code uses the CODE directive to locate program code sections. The main difference is relocatable mode uses the linker, while absolute mode does not. In absolute mode, you the programmer would have to do everything (which means more control). Building successful and having a hex file does NOT equate to a working code. ;) |
|
|
|
|
|
首先,我非常感谢你的帮助。40年后,我退休了,成为业内的电信工程师,这是我第一次面对这样的问题,幸运的是,作为一个业余爱好者,我以前认为,这是电子领域的一个很尖锐的领域。事实上,只是一个问题:你,论坛人,真的创造了一个工作设计,HW+SFW,或者只是编程PIC和类似的纸在一个世界分开?祝你一切顺利。
以上来自于百度翻译 以下为原文 First,I thank you so much for helping.I'm retired after 40 yrs as telecommunications engineer in the industry and this is the first time that I face up to this kind of problems,fortunately as an hobbyist. I thought before,that this was a sharp sector of electronics field.It seems something very different indeed.Just a question:you,forum people,happen to really create a working design,hw + sfw,or just programming PIC and similar on the paper in a world apart? All the best. |
|
|
|
|
|
许多论坛成员和我设计和创造大量生产的产品-硬件,软件,固件等。我看到你的ASM文件名是DCF77,这是德国长波时间信号。我已经设计和编码了时间设备,接收DCF77和世界各地其他时间信号,用于“原子钟”类产品。
以上来自于百度翻译 以下为原文 Many forum members and I design and create mass production products -- hardware, software, firmware, etc. I see your asm filename is DCF77, which is the German longwave time signal. I have designed and coded time keeping devices receiving the DCF77 and other time signals around the world used in "atomic clock" like products. |
|
|
|
|
|
恭喜LOL:很高兴在论坛上见到你。是的,我正在尝试实现这个Claudio Fin项目,但是,正如你所看到的,我在PIC上遇到了一些我无法处理的问题。你真的认为,根据这个经验,这个问题(ASM ---GT,HEX --- & PIC)会如此难以克服吗?
以上来自于百度翻译 以下为原文 Congrats LoL: |
|
|
|
|
只有小组成员才能发言,加入小组>>
MPLAB X IDE V6.25版本怎么对bootloader和应用程序进行烧录
501 浏览 0 评论
5808 浏览 9 评论
2350 浏览 8 评论
2237 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3543 浏览 3 评论
1155浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
1119浏览 1评论
我是Microchip 的代理商,有PIC16F1829T-I/SS 技术问题可以咨询我,微信:A-chip-Ti
887浏览 1评论
MPLAB X IDE V6.25版本怎么对bootloader和应用程序进行烧录
501浏览 0评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-12 03:53 , Processed in 1.326416 second(s), Total 80, Slave 73 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
2680