PIC16F1824有什么C编译器能用?

2020-02-06 09:56发布

本帖最后由 1125526801 于 2013-6-15 09:24 编辑

PIC16F1824有什么C编译器能用?之前学习板上的单片机不一样是18F4520,用的MCC18。PIC16F1824是用PICC吗?



360截图20130615092316974.jpg (177.04 KB, 下载次数: 0) 下载附件 2013-6-15 09:23 上传

友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
该问题目前已经被作者或者管理员关闭, 无法添加新回复
63条回答
1125526801
1楼-- · 2020-02-13 00:35
yoyobbs 发表于 2013-6-14 22:46

XC8.png (17.37 KB, 下载次数: 0)

下载附件

Microchip MPLAB XC8 C Compiler V1.12

2013-6-26 16:50 上传

1125526801
2楼-- · 2020-02-13 05:40
 精彩回答 2  元偷偷看……
1125526801
3楼-- · 2020-02-13 06:56
本帖最后由 1125526801 于 2013-6-26 20:04 编辑
1125526801 发表于 2013-6-26 18:44

EEP写.jpg (121.11 KB, 下载次数: 0)

下载附件

2013-6-26 19:52 上传


  1. void EEPROM_write(uchar add,uchar dat)//add为0x00~0xff
  2. {

  3.         EEADRL = add;        //地址写入EEADRL 寄存器
  4.         EEDATL = dat;        //将数据写入EEDATL 寄存器
  5.        
  6.         CFGS = 0;//EECON1
  7.         EEPGD = 0;
  8.         WREN = 1;
  9.         GIE = 0;
  10. //对写操作进行解锁
  11.         EECON2 = 0x55;  //先将 55h 写入 EECON2,
  12.         EECON2 = 0xaa;  //随后将 AAh 写入 EECON2
  13.         WR = 1;
  14.         GIE = 1;
  15.         WREN = 0;
  16.         while(WR);//Wait for write to complete
  17. }
复制代码
millwood0
4楼-- · 2020-02-13 11:27
The unlock sequence is outlined in the datasheet. Other peripherals (like RTCC) have similiar mechanism to prevent accidental write to them. You should implement that in assembly (as there are fairly strict timing requirements for those sequences that your compiler may not be able to meet), and repeat the sequence until a write is successful.
millwood0
5楼-- · 2020-02-13 13:01
This is an example of why reading the datasheet is invaluable.

You cannot be a good embedded programmer if you cannot read and more importantly understand the datasheet.
1125526801
6楼-- · 2020-02-13 13:35
本帖最后由 1125526801 于 2013-6-27 09:00 编辑
millwood0 发表于 2013-6-26 20:20
This is an example of why reading the datasheet is invaluable.

You cannot be a good embedded progra ...


I  read it, but I  don't understand because thar text description for sequence is not very clear. and I cannot read assembly language,it is a big drawback for me.

In the PIC datasheet, all the examples are written in assembly language.

一周热门 更多>