2010年3月28日 星期日

[pic18net] data-type and keyword

(1) keyword: "static"

MPLAB C18 supports parameters and local variables allocated either on the software stack or directly from global memory. The static keyword places a local variable or a function parameter in global memory instead of on the software stack.[3] In general, stack-based local variables and function parameters require more code to access than static local variables and function parameters (see static Function Arguments). Functions that use stack-based variables are more flexible in that they can be re-entrant and/or recursive.

[3] static parameters are valid only when the compiler is operating in Non-Extended mode.
(see Selecting the Mode).


(2) data-type, BOOL for pic18
allocated 1-byte space


(3) data-type, WORD for pic18
allocated 2-type space

2010年3月25日 星期四

[pic18net] add file in MPLAB-IDE


In case of portable concerned for the whole project, supposed to choose the below setting while one additional file added into the MPLAB-IDE project.

2010年3月14日 星期日

[pic18net] software-reset with RAM not initialized

如果呼叫 function, pic18net的 Reset(), 預設此 function為 software-reset機制。
pic18 的 software-reset 預設機制, 是不清除 RAM內的宣告變數 (ex, array/variable/pointer..)。

如果所宣告的變數已在上次有先前的處理資料/數值.. 有可能因為沒被清除而導致程式邏輯誤判而百思不得其解, 到底錯誤在何處..

2010年3月13日 星期六

[pic18net] how to debug, instead of "UART" way

(1)
By original sample, the AJAX sample can refresh the corresponding variable and state by the interval 500 m-seconds.

New added one debugging-MSG with the HTTP web-server for SSI output in the AJAX sample.

(2)
slower down the debug-MSG output by time-interval skill

2010年3月8日 星期一

[pic18net] http2 keeping, but no smtp-client

想保留 web-server, 但不需用到 smtp-client..
(tcpipconfig.H)
have the following defined disabled:
//#define STACK_USE_HTTP_EMAIL_DEMO

(That's it!!)

[pic18net] Definition of PIE1bits and PIR1bits

After the whole project of pic18 searching, not found the definition, "PIE1bits" and "PIR1bits"..

In the "[root-DIR]\mcc18\h" path, both of the 2 defiitions can be found by each dedicated IC-header description.