原创 AVR-GCC知识

2010-10-19 14:29 1627 6 6 分类: MCU/ 嵌入式

1.中断相关

使用中断要包含头文件#include<avr/interrupt.h>

开全局中断:sei();

关全局中断:cli();

中断服务函数:ISR(xxxx_vect)

2.一位外国网友(AVRFREAKS)的FAQ:

FAQ#1:ISR/main shared variables MUST be defined 'voiatile'
FAQ#2:embeded programs must NEVER return from main()
FAQ#3:99.9% of UART errors are AVRs not being clocked right
FAQ#4:If using avr-gcc aviod -O0 optimisation setting at all costs
FAQ#5:If PORTC bit don't seem work JTAG probably needs disabling


PARTNER CONTENT

文章评论0条评论)

登录后参与讨论
我要评论
0
6
关闭 站长推荐上一条 /3 下一条