高級會員
Joined
: 2006/5/15 11:14 最後登入時間
: 2017/3/16 9:22
Group:
註冊會員
Level : 8 HP : 0 / 187 MP : 30 / 10106 EXP : 51
|
請問各位在使用C的語法下如何快速的進入中斷副程式? 因為我寫了一個程式如下 我使用震盪頻率為4MHZ,進入中斷副程式的時間大概需要63us 之前使用組合語言的寫法,進入中斷副程式的時間大概只要不到20us吧 請問要如何加速 #include <p18f452.h> #include "diff_manchester.h"
void isr_low(void);
#pragma code low_vector=0x0018 void isr_low_direct(void) {_asm goto isr_low _endasm
#pragma interrupt isr_low void isr_low(void) {diff_manchester();<-------執行到這裡大概就花63us } #pragma code
void main(void) { unsigned char binary[]={0xfe,0xff,0xff,0xff,0xff,0xff}; unsigned char country[]={0,0,0,0}; unsigned char id[]={0,0,0,0,0,0,0,0,0,0,0,0}; init_diff_manchester(); while(1); }
發表於: 2007/2/2 13:57
|