![]() |
![]() |
#11 |
Nhập môn đệ tử
Tham gia ngày: Mar 2007
Bài gửi: 7
: |
![]() Code:
#include <16f877a.h> #use delay(oscillator=8M) int8 const LED7[10]={0xC0,0xF9,0xA4,0xB0,0x99,0x92,0x82,0xF8,0x80,0x90} int8 const time=15; int8 i,j,L1,L2,L3,L4; void main() { set_tris_B(0);set_tris_C(0); while(1) { for(i=0;i<=59;i=i+1) for(j=0;j<=59;j=j+1) { L1=(i/ 1)%10; L2=(i/10)%10; L3=(i/ 1)%10; L4=(i/10)%10; output_B(LED7[L1]); output_C(0); delay_ms(time); output_C(7); output_B(LED7[L2]); output_C(1); delay_ms(time); output_C(7); output_B(LED7[L3]); output_C(2); delay_ms(time); output_C(7); output_B(LED7[L4]); output_C(3); delay_ms(time); output_C(7); // bài này em dịch sai vài lỗi, các tiền bối giúp em với, em không hiểu sai ở đâu. thay đổi nội dung bởi: namqn, 28-11-2007 lúc 05:58 PM. |
![]() |
![]() |
|
|
![]() |
||||
Ðề tài | Người gửi | Chuyên mục | Trả lời | Bài mới |
Hướng dẫn ORCAD cơ bản (Update 16/11/2005) | falleaf | Thực hành | 167 | 23-10-2013 04:30 PM |