• slider image 514
  • slider image 516
  • slider image 517
  • slider image 518
  • slider image 519
:::


Browsing this Thread:   2 Anonymous Users






Re: 請問有關PIC24F問題
#4
版主
版主


查看用戶資訊
all<<=10; 就可以向左移10個位元。

程式執行完會跳離 main 函數,加個 while(1); 的迴圈控制

發表於: 2007/7/14 10:04
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 請問有關PIC24F問題
#3
資深會員
資深會員


查看用戶資訊
感謝版主回應!沒想到是我用錯啦!

不過我想請問,PIC24F系列有可一次左(右)移多的BIT的指令
若要在C語言上使用該如何使用呢?

還有我想請問,我編譯後出現的警告是什麼?


發表於: 2007/7/13 17:19
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 請問有關PIC24F問題
#2
版主
版主


查看用戶資訊
語法應為 : all <<=1;

發表於: 2007/7/13 15:23
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


請問有關PIC24F問題
#1
資深會員
資深會員


查看用戶資訊
我用C語言左移的問題
我只是想簡單測試左移的功能,但老是做不出來

#include "p24fj64ga002.h"
int main(void)
{
unsigned int a11;
unsigned int b11;

a11=0x4000;
b11=0x0000;
a11 << 1;
}

左移指令不是這樣寫嗎!之前在寫C18都可以
但用C30就有問題!
還有我編譯的時候會出現
test2.c: In function 'main':
test2.c:12: warning: statement with no effect
test2.c:13: warning: control reaches end of non-void function
test2.c:13:2: warning: no newline at end of file

這是什麼錯誤阿!有看不沒有懂

發表於: 2007/7/13 15:18
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部







You can view topic.
不可以 發起新主題
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.
You cannot use topic type.
You cannot use HTML syntax.
You cannot use signature.
You cannot create PDF files.
You cannot get print page.

[進階搜尋]


:::

Microchip連結

https://www.facebook.com/microchiptechnologytaiwan/
http://www.microchip.com.tw/modules/tad_uploader/index.php?of_cat_sn=13
https://mu.microchip.com/page/tmu
http://elearning.microchip.com.tw/modules/tad_link/index.php?cate_sn=1
https://page.microchip.com/APAC-PrefCenters-TW.html
http://www.microchip.com/
http://www.microchip.com/treelink
http://www.microchipdirect.com/
http://www.microchip.com.cn/newcommunity/index.php?m=Video&a=index&id=103
http://www.microchip.com.tw/modules/tad_uploader/index.php?of_cat_sn=2
http://www.microchip.com.tw/Data_CD/eLearning/index.html
http://www.microchip.com.tw/RTC/RTC_DVD/
https://www.microchip.com/development-tools/
https://www.youtube.com/user/MicrochipTechnology
[ more... ]

教育訓練中心

!開發工具購買
辦法說明 [業界客戶] [教育單位]
----------------------------------
!校園樣品申請
辦法說明 [教師資格] [學生資格]
----------------------------------