วันศุกร์ที่ 8 กุมภาพันธ์ พ.ศ. 2562
โครงงานที่20
Code
Code
int Read_VR(void);
main()
{
int i,time;
TRISB = 0x00;
CMCON = 0x07;
while(1)
{
for(i=1;i,<129;i=*2)
{
PORTB = i;
time = Read_VR ()*2;
Vdelay_ms(time);
}
}
}
int Read_VR(void)
{
int i;
i = 0;
TRISA = 0xf0;
PORTA.F0 = 1;
Delay_ms(10);
TRISA = 0xF1;
while(PORTA.F0== 1)
{
i++;
}
i = i/10;
return i ;
}
สมัครสมาชิก:
ส่งความคิดเห็น (Atom)
Internet of Things (IoT)
Internet of Things หรือ IoT Internet of Things (IoT) คือ การที่อุปกรณ์อิเล็กทรอนิกส์ต่างๆ สามารถเชื่อมโยงหรือส่งข้อมูลถึงกันได้ด้วยอิ...
-
Calculator with Pic 16f877 microcontroller is a comprehensive project. Comprehensive in the w...
-
Internet of Things หรือ IoT Internet of Things (IoT) คือ การที่อุปกรณ์อิเล็กทรอนิกส์ต่างๆ สามารถเชื่อมโยงหรือส่งข้อมูลถึงกันได้ด้วยอิ...
-
#include <LiquidCrystal_I2C.h> LiquidCrystal_I2C lcd(0x27,16,2); int PIRpin = 8; void setup() { lcd.begin(); pinMode(PIRpin,...

ไม่มีความคิดเห็น:
แสดงความคิดเห็น