Hican你在端口B寄存器中右转?IE RRF PORTBI试图在端口B上使用4位到7位的中断,并希望在RB0到RB3i上输出RB4-RB7上的任何数据,也需要保持RB0到RB3作为输入,直到数据在那里,以避免与另一个PICIF旋转不允许的总线争用,指令真的是真的。像是MOVFF,但不能在16FCAN上这样做:-MOVLW 0xF0;设置RB0到RB3作为输出MOVWF TrISB;端口B设置RRF PORTB,0;向右旋转4次,留下结果WRRF PORTB,0 RRF PORTB,0 RRF PORTB,0;W应该包含RB4-7作为比特0到3 BCF PORTA,0;这是用来在PIC18F2550软中断上拉低R3,以改变从O/P到I/P的四个端口,当您在可用端口上运行时,在16F628 A MOVWF端口上杂乱地读取RB0 RB3上的地址:(我是新手,所以没有火焰。 以上来自于百度翻译 以下为原文 Hican you rotate right in the PORT B register ?ieRRF PORTB I'm attempting to use the interrupt on bits 4 to 7 on Port B and would like to output what ever is on RB4-RB7 on RB0 to RB3I also need to keep RB0 to RB3 as inputs until the data is there, to avoid bus contention with another PICIf rotate right not allowed , the instruction I'd really like isMOVFF, but that not available on a 16Fcan I do something like this:-movlw 0xF0; set RB0 to RB3 as outputs movwf TRISB; port B set up rrfPORTB,0 ; rotate right 4 times, leave result in WrrfPORTB,0 rrfPORTB,0 rrfPORTB,0 ; W should contain RB4-7 as bits 0 to 3 bcf PORTA,0; this is used to pull RE3 low on a PIC18F2550 soft interrupt to change four ports from o/p to i/p to read whats on RB0-RB3 on the 16F628A movwfPORTB very messy when you run out of usable ports :(I'm a novice , so no flames pleasethanksRichard
2019-03-12 13:04
请问车载嵌入式软件如何声明符合MISRA语言规范?ISO26262对于软件开发的要求是什么?
2021-12-27 07:07
我已经下载了最新的EZBL(V1.01B),我得到了各种各样的问题:清理成功(总时间:62MS)EZBL:编辑MaMicro-DeFult.MK,以便与PIC24和DSPIC33的“简单引导程序”链接:“C:\程序文件(x86)\ Microchip \ MPLABX \ V3.61 \ sys \ javejRe1.80y1212/bin(java-jar)EZBLItItEng/EZBLYTooSoels:Fuff= Nbjtudio/MaMeFiel-DeFult.MK子项目= .BuffNB/Madi-Fiel-DeFult.MK DIST/Deult/Exx/BooTuxUART .HEX“C:\程序文件(x86)\ Microchip \xC16\V1.3\bin \xC16Gcc.exe“Meal.C o o构建/默认/产品”MNPU=24EP512GU810-MMD -MF“构建/默认/生产/主。O.D”-MG-OMF=ELF-DXPRJIOUTAL =默认(没有遗留的LBC函数功能段-FDATA段-MLADE代码-MLASH数据-MCONST数据- O1-MSMARIO=1 -墙-MSFR警告=OFF”C:\程序文件(x86)\Microchip \xC16\V1。31 \ bin \xC16GE512MU810YExpRele16.C-O构建/默认/生产/硬件初始化器/DSPIC33 EP58MU810AB浏览器,16.O-C-MCPU=24EP512GU810-MMD“构建/默认/生产/硬件初始化器/DSPIC33 EP58MU810YExpRele16.O.D”-MNO EDS警告-G-OMF= ELF-DMicro-Max代码- MaCODE数据-MCONST在数据-O1-MSMARIO=1 - WORK-\程序文件(x86)\Microchip \xC16\V1.3\bin \xC16Gcc.exe“现在.C-O构建/默认/生产/现在.O-C-MCPU=24EP512GU810-MMD -MF”Buff/DuauLt/MeNO-EDS警告-G-OMF= ELF-DXPRJIOUTAL =默认:没有传统的LBCC-FUNTUCTION段-MaLead代码-MCALD数据-MCONST数据- O1-MSMARIO=1 -墙-MSFR警告= OFF“C:\程序文件(x86)\ Microchip \xC16\V1.3\bin \xC16Gcc.exe“uARTHARFIFO.C/O构建/默认/ PRO”DePux/UARTFIXFIFO-24EP512GU810-MMF“构建/默认/生产/ UARTHIFFIFO.O.D”-MG-OMF=ELF-DXPRJIOUTY =默认-没有传统的LBCC-FFUNCTONE部分-FDATA部分-MCALD代码-MLAST数据-MCONST数据- O1-MSMARIO=1墙-MsfReave= OF/UR/BI/SH:C:程序FIMicrochip \xC16\v1.33\bin xx16-gcc.EX:命令不是BuffnBase/MaFaCH默认文件.MK:127:目标“构建/默认/生产/硬件初始化器/DSPIC33 EP58MU810YExpReleRy16.O”失败/UR/BI/SH:C:\程序文件(x86)\Microchip \xC16\V1.3\bin \xC16-GC.EXE:未找到命令的配方Ur/bin:/\程序文件(x86)\Microchip \xC16\v1.33\bin xC16-gcc.EX:Microchip不为BubnBuff/MaFaFILE默认命令。MK:134:目标“构建/默认/生产/ main”的配方。O'FrimeDebug(2):*[构建/默认/生产/硬件初始化器/DSPIC33 EP58MU810YExpRele16.O]错误127nbPix/mAKEFILE默认值。MK:148:目标“构建/默认/生产/现在”。O'FaultDeNbPosi/MaFaMeCurrase.MK: 141:目标“构建/默认/生产/ UARTHIFFIFO”的配方。O'FrimeDebug(2):***等待未完成的作业……使[2 ]:**[构建/默认/生产/主/O.]错误127NbPosi/MaFe文件DE故障。MK:90:配方“失败”/ UR/BI/SH:C:\程序文件(x86)\Microchip \xC16\V1.3\bin xC16-GC.EXE:命令不是NbjpB/MaCuffic.IMP.MK:39:目标''.BufficIMP''FultEdv[[ 2 ] ]:***[构建/默认/生产/现在.O]错误127使[2 ]:*Buff/Buff/PROD错误127使[1 ]:**[Buffic CONF]错误2::**[构建IMPL]错误2Bug失败(退出值2,总时间:708MS)。我正在运行Wi7Pro,64位MPPLABX V3.61和XC16 V1.31 以上来自于百度翻译 以下为原文 I've downloaded the latest EZBL (v1.01b) and I get all kinds of problems: CLEAN SUCCESSFUL (total time: 62ms)EZBL: Editing MakeFile-default.mk to enable linking with the Easy Bootloader for PIC24 and dsPIC33"C:\Program Files (x86)\Microchip\MPLABX\v3.61\sys\java\jre1.8.0_121/bin/"java -jar "ezbl_integration/ezbl_tools.jar" --make_editor -conf=defaultmake -f nbproject/Makefile-default.mk SUBPROJECTS= .build-confmake -f nbproject/Makefile-default.mk dist/default/production/ex_boot_uart.production.hex"C:\Program Files (x86)\Microchip\xc16\v1.31\bin\xc16-gcc.exe" main.c -o build/default/production/main.o -c -mcpu=24EP512GU810 -MMD -MF "build/default/production/main.o.d" -mno-eds-warn -g -omf=elf -DXPRJ_default=default -no-legacy-libc -ffunction-sections -fdata-sections -mlarge-code -mlarge-data -mconst-in-data -O1 -msmart-io=1 -Wall -msfr-warn=off "C:\Program Files (x86)\Microchip\xc16\v1.31\bin\xc16-gcc.exe" hardware_initializers/dspic33ep512mu810_explorer_16.c -o build/default/production/hardware_initializers/dspic33ep512mu810_explorer_16.o -c -mcpu=24EP512GU810 -MMD -MF "build/default/production/hardware_initializers/dspic33ep512mu810_explorer_16.o.d" -mno-eds-warn -g -omf=elf -DXPRJ_default=default -no-legacy-libc -ffunction-sections -fdata-sections -mlarge-code -mlarge-data -mconst-in-data -O1 -msmart-io=1 -Wall -msfr-warn=off "C:\Program Files (x86)\Microchip\xc16\v1.31\bin\xc16-gcc.exe" now.c -o build/default/production/now.o -c -mcpu=24EP512GU810 -MMD -MF "build/default/production/now.o.d" -mno-eds-warn -g -omf=elf -DXPRJ_default=default -no-legacy-libc -ffunction-sections -fdata-sections -mlarge-code -mlarge-data -mconst-in-data -O1 -msmart-io=1 -Wall -msfr-warn=off "C:\Program Files (x86)\Microchip\xc16\v1.31\bin\xc16-gcc.exe" uart_fifo.c -o build/default/production/uart_fifo.o -c -mcpu=24EP512GU810 -MMD -MF "build/default/production/uart_fifo.o.d" -mno-eds-warn -g -omf=elf -DXPRJ_default=default -no-legacy-libc -ffunction-sections -fdata-sections -mlarge-code -mlarge-data -mconst-in-data -O1 -msmart-io=1 -Wall -msfr-warn=off /usr/bin/sh: C:\Program Files (x86)\Microchip\xc16\v1.31\bin\xc16-gcc.exe: command not foundnbproject/Makefile-default.mk:127: recipe for target 'build/default/production/hardware_initializers/dspic33ep512mu810_explorer_16.o' failed/usr/bin/sh: C:\Program Files (x86)\Microchip\xc16\v1.31\bin\xc16-gcc.exe: command not found/usr/bin/sh: C:\Program Files (x86)\Microchip\xc16\v1.31\bin\xc16-gcc.exe: command not foundnbproject/Makefile-default.mk:134: recipe for target 'build/default/production/main.o' failedmake[2]: *** [build/default/production/hardware_initializers/dspic33ep512mu810_explorer_16.o] Error 127nbproject/Makefile-default.mk:148: recipe for target 'build/default/production/now.o' failednbproject/Makefile-default.mk:141: recipe for target 'build/default/production/uart_fifo.o' failedmake[2]: *** Waiting for unfinished jobs....make[2]: *** [build/default/production/main.o] Error 127nbproject/Makefile-default.mk:90: recipe for target '.build-conf' failed/usr/bin/sh: C:\Program Files (x86)\Microchip\xc16\v1.31\bin\xc16-gcc.exe: command not foundnbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failedmake[2]: *** [build/default/production/now.o] Error 127make[2]: *** [build/default/production/uart_fifo.o] Error 127make[1]: *** [.build-conf] Error 2make: *** [.build-impl] Error 2BUILD FAILED (exit value 2, total time: 708ms) How do you fix this to work with the recent tools?I'm running Win7 Pro, 64 bitMPLABX v3.61 and XC16 v1.31
2019-03-22 06:19
请帮帮我,我做的事情很愚蠢,我似乎找不到我做错了什么!我想建立一个现场嵌入式HV(12V PROG模式)在电路编程的PIC18F42。为了发展,我已经把我的编程电路和我插入18F45的下降到我的程序员ZIF SOCKEY程序员似乎是在工作,它似乎验证编程代码匹配英特尔16 HEX文件,但MCU编程不工作,甚至只是交换。相邻小块位置的源代码会造成不同的混沌操作。我知道我的源代码是工作的,适合于18F562从16F87工作的源代码。我知道我的编译器是OK(MaPLAB XC8)免费模式,因为我还生成了一个英特尔HEX文件编译使用一个旧的9.80版本的高科技,并得到完全相同的混乱结果,当我试图编程18F45 2。我没有任何其他编程设备,如皮卡2目前,一个皮卡来自中国的T II克隆将在40-50天内到达。我已经下载并仔细研究了18FXX2/XX8芯片(DS9566B)的Flash编程文档中所示的步骤,但是很明显,我可能做了一些非常非常错误的事情。我的问题是:(1)生成的HEX文件显示了字节T。o以小的Endiad格式书写。为了澄清这里的解释,我已经把第二行和第三行的16位单词结合起来,以便更容易查看。(当然,我的程序员使用未编辑的18F42..HEX文件):(实际代码来自.HEX文件):04000000 7FEF 0F09E(奇偶字节被丢弃):10001800 FFFDFC40F0 E8CF 41F0 E0CF 42F0 F2A4 A4:1000 228 0 01D0 01D0 04D0 FE0E D76E 310E D66 E F2A4 E8:1000 38 000 01D01D058D0000 0F1BF24BF24BB54 B6C:1000、86B62B090EFB6501D01D04CD0FB6BFA2B07这是我如何使用HEX数据:上面的第3行说字节起始地址是0x28,在这行上有16个数据字节。编程序列需要在使用单P写入之前用8字节填充缓冲器。我的编程策略:我创建一个16位字,每个十六进制文字数字的每一个小字节,并把每个字放进一个数组中,数组的元素号是MCU程序存储器的字地址,例如:01D0(如上面的第3行所示)将被存储为一个16位字。在长整数数组元素中:PGM〔20〕=0xD01;PGM〔21〕=0xD00;PGM〔22〕=0xD00;PGM〔23〕=0x0EFE;//这些数组元素内容已被验证,现在我有8个字节(=4个16位字)来填充单字节模式写入的8位写入缓冲器。 以上来自于百度翻译 以下为原文 Please help, I am doing something very stupid and I can't seem to find out what I am doing wrong! I would like to build an onsite embedded HV(12V-prog mode) in-circuit programmer for the PIC18F452. For development, I have breadboarded my programming circuit and I am plugging the 18F452 DIPs into my programmer ZIF socket My programmer seems to be working in that it seems to verify the programming code to match the Intel 16 Hex File, but the MCU programmed doesn't work, and even by just swapping positions of small adjacent pieces of the source code will cause different chaotic operation. I know my source code was working, was adapted to 18F452 from 16F887 working source code. I know my compiler is ok (MAPLAB XC8) free mode because I've also generated an Intelhex file compiled using an old 9.80 version of Hi-Tech and get exactly the same chaotic results when I attempt to program the 18F452. I don't have another programming device such as a PICkit 2 at the moment,a PICKit II clone from China is due to arrive within 40-50 days. I've download and studied carefully followed the steps shown in the Flash Programming doc for 18Fxx2/xx8 chips (DS39576B), but obviously, I am probably doing something very, very wrong. My Questions:(1) The Hex file generated shows the bytes to be written in little-endian format. To clarify my explanation here, I've parsed the 16-bit words together of the 2nd and 3rd line to make it easier to view. (Of course, my programmer works with the un-edited 18F452 .Hex file) Example:(actual code from .hex file):04000000 7FEF 00F0 9E(parity bytes discarded):10001800 FFFF D8CF 40F0 E8CF 41F0 E0CF 42F0 F2A4 A4:10002800 01D0 01D0 04D0 FE0E D76E 310E D66E F2A4 E8:1000380001D001D058D00001FB2BF24BF32BB54B6C:10004800B62B090EFB6501D001D04CD0FB6BFA2B07Here's how I work with the hex data:Line 3 above says the byte-wisestarting address is 0x28 and there are 16 data bytes on this line.The programming sequence requires a buffer to be filled with 8-bytes prior to writing using Single Panel Mode mode. My programming strategy:I create a 16-bit word with each little-endian quad of hex literal digits and place each word into an array whose element number is the word address of MCU program memory to write to.For instance: 01D0 (as shown above line 3) would be stored as a 16-bit word in a long integer array element:Pgm[20]=0xD001;Pgm[21]=0xD001;Pgm[22]=0xD004;Pgm[23]=0x0EFE;//These array element contents have been verifiedNow I have the 8-bytes (=4 16-bit words) to fill the 8-byte write buffer for a Single Panel Mode write. Am I correct so far?
2018-10-17 16:36