⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 testio.c

📁 通过AT90S2313控制可控硅实现对机电系统的控制
💻 C
字号:
//ICC-AVR application builder : 02-8-3 11:31:04
     // Target : 2313
     // Crystal: 8.0000Mhz
     
     #include <io2313.h>
     #include <macros.h>
     
     void  port_init(void)
     {
	 DDRB =0xFF;//out
     DDRD =0x00;//in
     PORTD=0x00;
     /* PORTB = 0x00;//set as input
      DDRB  = 0x00; 
      PORTD = 0x7F;//set as output
      DDRD  = 0x7F;*/ 
     }
	 void circul(void)
	 {
	 
	 if ((PIND&0x01) ==1)
	 PORTB^=0x10;
	 }
	 void main(void)
	 {
	 port_init();
	 while(1)
	 circul();
	 
	 }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -