View Single Post
Old 04-04-2009, 05:39 PM   #11
quyenk9a
Nhập môn đệ tử
 
Tham gia ngày: Oct 2008
Bài gửi: 5
:
help me

code của em không chạy các bác ơi
Code:
#include<16f877a.h>
#fuses NOWDT,PUT,HS,NOPROTECT
#device PIC16f877a*=16 ADC=10
#use delay(clock=4000000)
#include <lcd.c>
#byte portb=0x06
#byte portd=0x08
#bit b0=portb.0
#bit b1=portb.1
#bit b2=portb.2
#bit b3=portb.3
#bit b4=portb.4
#bit b5=portb.5
#bit b6=portb.6
#bit b7=portb.7
#int_rb

void docphim()
{
if(b0&&b4)
lcd_putc("giang");
if(b1&&b4)
lcd_putc("hoang");
if(b2&&b4)
lcd_putc("k9a");
if(b3&&b4)
lcd_putc("  ");
if(b0&&b5)
lcd_putc("hoang");
if(b1&&b5)
lcd_putc("giang");
}//end int
void main(void)
{

set_tris_b(0xf0);
set_tris_d(0x00);
enable_interrupts(INT_RB);
enable_interrupts(GLOBAL);
ext_int_edge(H_to_L);

{
portb=1;
   portb=2;
   portb=4;
   portb=8;
   lcd_putc("hoang giang !!!");
   delay_ms(100);
   lcd_putc("\f");
   
   }
   while(true);}

thay đổi nội dung bởi: namqn, 04-04-2009 lúc 08:47 PM. Lý do: định dạng code
quyenk9a vẫn chưa có mặt trong diễn đàn   Trả Lời Với Trích Dẫn