1
完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
嗨。我正在尝试为PIC16实现一个程序员。我正在开发的目标PIC是PIC12F1822(它与PIC16F1823具有相同的编程规范),我读了编程规范,我想我理解它,但是我不能得到目标PIC来响应。我也附上了。一个范围来查看在连接期间输出的皮卡3是什么,并且我复制了波形,但是PIC12没有回答。我没有敲击,我的“程序员”是一个具有可变长度SPI的PIC。硬件连接:VDD到VDD VSS到VSS GPIO,输出到目标MCLR SCK到PGC MOSI/M。ISO到PGDI将4K7电阻器作为PGC/PGDI AM上的拉低,知道“LSB第一”格式。程序流:-MCLR低发送镜像“MCHP”& gt;00001010 00010010×11000010 10110010(镜像是LSB第一)等待一位-发送CMD 0(负载CONF内存),一个6位传输-发送0x3FFF(实际上)0x7FFE),一个16位传输-发送CMD 6(增量地址)六次,现在地址指针为0x800 6(设备ID)-发送CMD 4(读取程序存储器)-禁用SDO,tiS位设置为1 -发送16时钟以获得设备ID,但我没有得到任何东西,目标PIC不输出任何东西。SPI设置:500千赫时钟,波形看起来很不错。在上升沿设置新的比特,目标应该在下降沿上获取。目标PIC具有LVP。重复,波形和序列与皮卡3相同,所以我不确定我做错了什么,硬件或软件。如果有人可以给出提示。
以上来自于百度翻译 以下为原文 Hi. I'm trying to implement a programmer for PIC16. The target PIC i'm using for development is a PIC12F1822 (which has the same programming specification as the PIC16F1823) I read the programming specification and i think i understood it, however i can't get the target PIC to respond. I also attached a scope to see what a PICKIT 3 was outputting during connection and i have replicated the waveform, but the PIC12 doesn't answer. I am not bit-banging, my "programmer" is a PIC that has variable lenght SPI. The hardware connection: VDD to VDD VSS to VSS GPIO as output to Target MCLR SCK to PGC MOSI/MISO to PGD I put 4k7 resistors as pull-downs on PGC/PGD I am aware of the "LSB First" format. The program flow: - MCLR LOW - send mirrored "MCHP" -> 00001010 00010010 11000010 10110010 (mirrored because it's LSB first) wait a bit - send CMD 0 (Load Conf Memory), a 6bit transfert - send 0x3FFF (actually 0x7FFE), a 16 bit transfert - send CMD 6 (Increment Address) six times, now address pointer is 0x8006 (device ID) - send CMD 4 (Read Program Memory) - disable SDO, TRIS bit set to 1 - send 16 clocks to get the device ID but i'm not getting anything, the target pic is not outputting anything. SPI setup: 500kHz clock, waveform looks very good. new bit set on rising edge, target should be acquiring on falling edge. The target PIC has LVP on. I repeat, the waveform and the sequence is the same as in the PICKIT 3 so i'm not sure what i'm doing wrong, hardware or software. If anyone can give a hint.. |
|
相关推荐
1个回答
|
|
啊,当然……进入LVP,你必须发送32位序列…第三十三个脉冲。它需要33个时钟。从描述上看,它并不清楚,但是第三十三个时钟脉冲在文件末尾的时序图中。还解释说,虚假时钟我看到在PK3扫描反正,知道这个窍门:)LVP模式进入,PIC正确识别。
以上来自于百度翻译 以下为原文 Ah, of course... to enter LVP you have to send the 32bit sequence... and a 33rd pulse. it needs 33clocks. it was not clear, AT ALL, from the description, but the 33rd clock pulse is there in the timing diagram at the end of the document. Also explains that spurious clock i was seeing in the PK3 scans Anyway, be aware of this gotcha :) LVP Mode entered, pic correctly identified.. |
|
|
|
只有小组成员才能发言,加入小组>>
5238 浏览 9 评论
2028 浏览 8 评论
1950 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3204 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2253 浏览 5 评论
777浏览 1评论
666浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
595浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
676浏览 0评论
576浏览 0评论
小黑屋| 手机版| Archiver| 德赢Vwin官网 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-23 01:20 , Processed in 1.229008 second(s), Total 78, Slave 60 queries .
Powered by 德赢Vwin官网 网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
德赢Vwin官网 观察
版权所有 © 湖南华秋数字科技有限公司
德赢Vwin官网 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号