PDA

View Full Version : mình mới tìm thấy bài luận văn này hay lắm


111985
28-11-2006, 08:23 AM
các bạn xem thử nhé

hoanf
28-11-2006, 10:28 PM
bộ chuyển đổi 232-485 bạn có thể tìm ở bất cứ ở đâu trên mạng. Chú ý khi lặp mạch này bạn phải phối hợp trở kháng cho tốt nếu không thì số thiết bị kết nối không cao. Nếu bạn cần có thể mình sẽ gửi cho bạn sơ đồ này.
Bạn có thể gửi sơ đồ lên được kô. Mà phối hợp trở kháng như thế nào cho tốt mình nghĩ bạn đã tốt khi gửi tài liệu lên thì nên nói rõ luôn.
Cám ơn
Cheers!
hoanf

minh khương
20-04-2007, 01:21 PM
các bác đã làm đồ án roi ơi?em đang làm đồ án mạch đèn giao thông,mà không có tài liệu,các bác có lai liệu thì giúp em với,thành thật cảm ơn các bác nhá

VinhVT
22-09-2007, 11:31 PM
bác 111985 làm về lập trình API thì có 1 số tài liệu nào kô, nếu có post lên mọi người cũng xem với

pictd03
28-04-2008, 02:47 AM
dùng PIC làm mạng giao thông hay chi lam đèn giao thông vậy bồ

hai dang
02-11-2008, 12:51 PM
mình mới viết được chương trình dùng VDk Pic6f877a. Ở đây mình sử dụng bàn phím để chọn các kiểu sáng của đèn led đơn. Nhằm cho các bạn dễ hiểu. Bài sau mình sẽ post hẳn bài về giao tiếp bàn phím với LCD. Port d bàn phím, Port b điều khiển led.
#include <16F877A.h>
#device *16adc=8
#fuses xt,nowdt,nolvp,noprotect
#use delay(clock=4000000)
#use fast_io(b)
void main()
{
output_b(0b11111111);
set_tris_b(0);
output_d(0b11111111);
delay_ms(10);
while(true)
{
output_d(0b11111110);
delay_ms(10);
if(input(pin_d4)==0)//nhấn phim1
{
while(true)
{ ////////////// kieu1
output_b(0x7f);
delay_ms(150);
output_b(0xBf);
delay_ms(150);
output_b(0xef);
delay_ms(150);
output_b(0xf7);
delay_ms(150);
output_b(0xfb);
delay_ms(150);
output_b(0xfd);
delay_ms(150);
output_b(0xfe);
delay_ms(150);
//////////////
output_b(0xfe);
delay_ms(150);
output_b(0xfd);
delay_ms(150);
output_b(0xfb);
delay_ms(150);
output_b(0xf7);
delay_ms(150);
output_b(0xef);
delay_ms(150);
output_b(0xbf);
delay_ms(150);
output_b(0x7f);
delay_ms(150);
if(input(pin_d5)==0||input(pin_d6)==0||input(pin_d 7)==0)
break;
}
}
if(input(pin_d5)==0)//nhấn phím 2
{
while(true)
{ /////////// kieu 2
output_b(0x00);
delay_ms(150);
output_b(0xff);
delay_ms(150);
if(input(pin_d4)==0||input(pin_d6)==0||input(pin_d 7)==0)
break;
}
}
if(input(pin_d6)==0)//nhấn phím 3
{
while(true)
{ //////////////kieu 3
output_b(0x55);
delay_ms(150);
output_b(0xaa);
delay_ms(150);
if(input(pin_d4)==0||input(pin_d5)==0||input(pin_d 7)==0)
break;
}
}
if(input(pin_d7)==0)//nhấn phím 4
{
while(true)
{ /////////////kieu 4
output_b(0x7e);
delay_ms(150);
output_b(0xbd);
delay_ms(150);
output_b(0xdb);
delay_ms(150);
output_b(0xE7);
delay_ms(150);
output_b(0xdb);
delay_ms(150);
output_b(0xbd);
delay_ms(150);
output_b(0x7e);
delay_ms(150);
if(input(pin_d6)==0||input(pin_d4)==0||input(pin_d 5)==0)
break;
}
}
}
}
Bạn nào có thắc mắc liên hệ mình theo địa chỉ này nha:
ngochai_dt06b@yahoo.com.vn
chuc các bạn thành công với VDK PIC nha.

Mr.Bi
08-11-2008, 11:08 AM
mình mới viết được chương trình dùng VDk Pic6f877a. Ở đây mình sử dụng bàn phím để chọn các kiểu sáng của đèn led đơn. Nhằm cho các bạn dễ hiểu. Bài sau mình sẽ post hẳn bài về giao tiếp bàn phím với LCD. Port d bàn phím, Port b điều khiển led.
#include <16F877A.h>
#device *16adc=8
#fuses xt,nowdt,nolvp,noprotect
#use delay(clock=4000000)
#use fast_io(b)
void main()
{
output_b(0b11111111);
set_tris_b(0);
output_d(0b11111111);
delay_ms(10);
while(true)
{
output_d(0b11111110);
delay_ms(10);
if(input(pin_d4)==0)//nhấn phim1
{
while(true)
{ ////////////// kieu1
output_b(0x7f);
delay_ms(150);
output_b(0xBf);
delay_ms(150);
output_b(0xef);
delay_ms(150);
output_b(0xf7);
delay_ms(150);
output_b(0xfb);
delay_ms(150);
output_b(0xfd);
delay_ms(150);
output_b(0xfe);
delay_ms(150);
//////////////
output_b(0xfe);
delay_ms(150);
output_b(0xfd);
delay_ms(150);
output_b(0xfb);
delay_ms(150);
output_b(0xf7);
delay_ms(150);
output_b(0xef);
delay_ms(150);
output_b(0xbf);
delay_ms(150);
output_b(0x7f);
delay_ms(150);
if(input(pin_d5)==0||input(pin_d6)==0||input(pin_d 7)==0)
break;
}
}
if(input(pin_d5)==0)//nhấn phím 2
{
while(true)
{ /////////// kieu 2
output_b(0x00);
delay_ms(150);
output_b(0xff);
delay_ms(150);
if(input(pin_d4)==0||input(pin_d6)==0||input(pin_d 7)==0)
break;
}
}
if(input(pin_d6)==0)//nhấn phím 3
{
while(true)
{ //////////////kieu 3
output_b(0x55);
delay_ms(150);
output_b(0xaa);
delay_ms(150);
if(input(pin_d4)==0||input(pin_d5)==0||input(pin_d 7)==0)
break;
}
}
if(input(pin_d7)==0)//nhấn phím 4
{
while(true)
{ /////////////kieu 4
output_b(0x7e);
delay_ms(150);
output_b(0xbd);
delay_ms(150);
output_b(0xdb);
delay_ms(150);
output_b(0xE7);
delay_ms(150);
output_b(0xdb);
delay_ms(150);
output_b(0xbd);
delay_ms(150);
output_b(0x7e);
delay_ms(150);
if(input(pin_d6)==0||input(pin_d4)==0||input(pin_d 5)==0)
break;
}
}
}
}
Bạn nào có thắc mắc liên hệ mình theo địa chỉ này nha:
ngochai_dt06b@yahoo.com.vn
chuc các bạn thành công với VDK PIC nha.

hic , mới quét có 4 phím mà code dài 1 đống , quét ma trận chắc chết mất !