| 
 
| 本帖最后由 山东电子小菜鸟 于 2017-9-17 06:32 编辑 
 1、如下图,用Rrpgisp软件 load FUSE,没有一点问题,但是对于烧写新的芯片,每次都要编写,确实麻烦。
 2、想把熔丝位的设置固化在代码中,看门狗、eerpm有相应的
 控制寄存器没有问题,但是像掉电检查、功耗选择等没有相应的寄存器,有没有人知道该如何把这些熔丝位的设置写在代码中呢?(像PIC那样,__CONFIG(---)就可以搞定)。
 3、AVR STUDIO头文件中也有相应的定义如下:应该是可以实现的 但是不知道该怎么操作?求相关人员指点。
 /* Fuses */
 #define FUSE_MEMORY_SIZE 3
 
 /* Low Fuse Byte */
 #define FUSE_CKSEL0 (unsigned char)~_BV(0)  /* Select Clock Source */
 #define FUSE_CKSEL1 (unsigned char)~_BV(1)  /* Select Clock Source */
 #define FUSE_CKSEL2 (unsigned char)~_BV(2)  /* Select Clock Source */
 #define FUSE_CKSEL3 (unsigned char)~_BV(3)  /* Select Clock Source */
 #define FUSE_SUT0   (unsigned char)~_BV(4)  /* Select start-up time */
 #define FUSE_SUT1   (unsigned char)~_BV(5)  /* Select start-up time */
 #define FUSE_CKOUT  (unsigned char)~_BV(6)  /* Clock output */
 #define FUSE_CKDIV8 (unsigned char)~_BV(7) /* Divide clock by 8 */
 #define LFUSE_DEFAULT (FUSE_CKSEL0 & FUSE_CKSEL2 & FUSE_CKSEL3 & FUSE_SUT0 & FUSE_CKDIV8)
 
 /* High Fuse Byte */
 #define FUSE_BODLEVEL0 (unsigned char)~_BV(0)  /* Brown-out Detector trigger level */
 #define FUSE_BODLEVEL1 (unsigned char)~_BV(1)  /* Brown-out Detector trigger level */
 #define FUSE_BODLEVEL2 (unsigned char)~_BV(2)  /* Brown-out Detector trigger level */
 #define FUSE_EESAVE    (unsigned char)~_BV(3)  /* EEPROM memory is preserved through chip erase */
 #define FUSE_WDTON     (unsigned char)~_BV(4)  /* Watchdog Timer Always On */
 #define FUSE_SPIEN     (unsigned char)~_BV(5)  /* Enable Serial programming and Data Downloading */
 #define FUSE_DWEN      (unsigned char)~_BV(6)  /* debugWIRE Enable */
 #define FUSE_RSTDISBL  (unsigned char)~_BV(7)  /* External reset disable */
 #define HFUSE_DEFAULT (FUSE_SPIEN)
 
 /* Extended Fuse Byte */
 #define FUSE_BOOTRST (unsigned char)~_BV(0)
 #define FUSE_BOOTSZ0 (unsigned char)~_BV(1)
 #define FUSE_BOOTSZ1 (unsigned char)~_BV(2)
 #define EFUSE_DEFAULT (FUSE_BOOTSZ0 & FUSE_BOOTSZ1)
 4、如下图、手册中的方法是跟操作FLASH一样,只是命令不同,但这个方法着实麻烦,既然官方库中有如3中的代码,
 应该可以有简单的方法实现吧??
 
 5、这么老的片子,应该被很多人 玩透了,求指点
 
 
 
 
 
 | 
 
×本帖子中包含更多资源您需要 登录 才可以下载或查看,没有账号?注册 
  |