• slider image 442
  • slider image 483
  • slider image 484
  • slider image 485
  • slider image 486
  • slider image 487
  • slider image 488
  • slider image 491
:::

論壇索引


Board index » All Posts (chingjau)




ICD2 燒錄code長度問題
#1
新會員
新會員


正常在燒錄時會有下列訊息
Programming Program Memory (0x0 - 0x787F)

我才增加幾行程式,重新compiler後燒錄,長度約增加一倍,
結果燒錄時間和驗證時間加長
Programming Program Memory (0x0 - 0x1578F)

問題是我才增加幾行程式,為何長度約增加一倍?
有人知道原因嗎?

device :PIC24FJ128GA008
IDE ver 8.4

發表於: 2009/11/11 15:33
頂部


SPI範例問題
#2
新會員
新會員


unsigned char SPI_ByteWrite(unsigned char SPI_DATA )
{
int Dummy ;

SPI1BUF = SPI_DATA ;
while ( ! IFS0bits.SPI1IF ) ;
IFS0bits.SPI1IF = 0 ;

for ( WaitLoop = 0 ; WaitLoop < 50 ; WaitLoop ++ ) ;
return (unsigned char) SPI1BUF ;

}

如上之程式,長時間測試會遇到while ( ! IFS0bits.SPI1IF ) ;
一直等不到 IFS0bits.SPI1IF =1 的時後會造成程式當在此行,
請問如何處理較好?

發表於: 2009/10/12 9:50
頂部


RTCC一問
#3
新會員
新會員


請問在MCU只作RTCC功能時除了進入SLEEP mode以外,還有那些方法可讓MCU耗電流降低?因為在此模式希望MCU耗電流小又能顯示RTCC資料.

將振盪器切換成RC,且MCU速度放慢是否可行 ?還是還有更好的方法?

發表於: 2009/3/23 16:53
頂部


Re: 我用UART收GPS資料會停住,一個個敲字不會 ??
#4
新會員
新會員


在使用PIC 的UART 時須注意,最好在主迴圈定時去檢查UART的錯誤旗標,有發生就必須用軟體清除,否則在實驗室測試可能沒有問題,當量產到客戶端你可能會收到GPS時鐘不會動,定不到衛星訊號等等問題,而一直怪罪GPS,卻不知是自己的MCU UART已
crash......

發表於: 2009/3/20 18:44
頂部


Re: 24FJ64GA004 I2C errata
#5
新會員
新會員


我用24FJ128GA008在相同的I2C code 就無bus 碰撞問題,我不知24FJ64GA004 系列在I2C介面到底能用否?板子都洗下去了,

發表於: 2008/10/13 20:01
頂部


24FJ64GA004 I2C errata
#6
新會員
新會員


在 errata 中提到使用I2C1須軟硬體修正,我改了之後可正常working,但隔天軟件沒改硬件也沒動,但bus collision卻又一直發生了,有人跟我遇到相同問題嗎?要如何解決24FJ64GA004 I2C1的電容效應?

我RB9一開始已設成OutPut,且清為0
在SDA1也加一顆C 下地


In Master mode, this error may cause a bus collision
to occur instead of a Start bit transmission.
Transmissions after the SDA1 pin has been held
low will occur correctly.
Work around
Using an external device or another I/O pin from
the microcontroller, drive the SDA1 pin low.
If no external devices or additional I/O pins are
available, it is sometimes possible to perform the
work around internally, using the following steps:
• With the module in Master mode, configure the
RB9 pin as an output;
• Clear the LATB9 bit (for the default I2C1
assignment) or LATB5 (for the alternate I2C1
assignment) to drive the pin low;
• Enable I2C1 by setting the I2CEN bit
(I2C1CON<15>).
Note that this action could appear to be a Start bit
to an I2C slave device on the bus if the RB8/SCL1
pin is not driven low prior to driving RB9/SDA1 low.
It may be necessary to add additional capacitance
to the SDA1 bus in order to maintain the low logic
level long enough for the module to detect the low
logic level. Make sure that when adding capacitance,
that the application does not violate the I2C
timing specifications.

發表於: 2008/10/10 12:39

Edited by chingjau on 2008年10月10日 13:10:39
頂部


Re: C30 VARIABLE TO BE PLACED IN PROGRAM MEMORY
#7
新會員
新會員


sir:

針對data 放在ram 是這樣寫,但存在ROM 好像不是,user guide 有如下說明

The MPLAB C30 compiler does not directly support accessing variables in
program space. Variables so allocated must be explicitly accessed by the
programmer, usually using table-access inline assembly instructions, or
using the program space visibility window

但我不知如何coding

發表於: 2008/9/26 15:48
頂部


C30 VARIABLE TO BE PLACED IN PROGRAM MEMORY
#8
新會員
新會員


請問16bit MCU,若陣列資料存在program memory,如下

const __attribute__((space(auto_psv)))
char my_const_array[10] = "Help";

語法如何宣告將此my_const_array陣列指標傳至另一函數

及如何取出此陣列長度和陣列每個位置資料?

發表於: 2008/9/26 11:02
頂部


Re: 請問誰有用過PIC在real-time OS方面的應用??
#9
新會員
新會員


上網搜尋PICOS18網站 免費的real time OS

發表於: 2007/9/19 8:50
頂部


請問版主
#10
新會員
新會員


UART的 error flag (FERR and OERR)
是要在中斷服務程式清除 or 主迴圈main()去清除

發表於: 2007/6/14 17:07
頂部



(1) 2 »



:::

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... ]

教育訓練中心

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