2010年1月29日 星期五

[pic18net] TCPIP_DEMO_APP for PIC18F67J60

The 'Hardwarprofile.H', between PIC18F67J60 and PIC18F97J60 , has different by default.

By default, PIC18F67J60 is based on [Ethernet RADIO], no EEPROM involved, for [TCPIP DEMO APP] project.

And By default, PIC18F97J60 is based on [PICDEMnet2], with EEPROM involved, for [TCPIP DEMO APP] project.

To be mentioned, some of Hardware-configuration are supposed to be modified for EEPROM and diverse PIC18 micon pin-definition.

If no modification for [TCPIP DEMO APP] project in "PIC18F67J60" based, then there will be Linking-Error while building the [TCPIP DEMO APP] project.

[Microchip PIC] diverse versions for C-Compilers

From this [MPLAB C Compilers] link, we can find out the diverse-versions introduction:
MPLAB C Compilers - Installing and Upgrading

Time-Limited Standard Evaluation Edition.
時效過後, 就不再能夠作"最佳化"..
and~
Lite Edition.
Lite版本, 不能夠作"最佳化"..

2010年1月20日 星期三

Telnet tutorial

使用Telnet指令來測試SMTP是否正常運作?
依下列步驟確認主機和 IMC 之間的通訊是否正常進行(附註:每行指令輸入完成後,請按下 鍵):
使用下列指令啟動 TELNET 工作階段:
Telnet 125.125.0.4 25 (置換上述 IP 位址)

如果正常運作,即可看到下列來自 IMC 的回覆:
220 site.company.com Microsoft ESMTP Internet Mail Service ,Version:5.0.xxxx.xxxx ready.

鍵入以下指令並開始進行通訊:
HELO test.company.com

您會看到下列回應:
250 OK

鍵入以下指令來通知 SMTP郵件訊息源自何處:
MAIL FROM:

您會得到下列回應:
250 OK - MAIL FROM

鍵入下列指令來通知 SMTP郵件訊息的目的地位址(使用有效的收件者 SMTP 位址)。
RCPT TO:

您會看到下列回應:
250 OK - Recipient

鍵入下列指令以通知SMTP已準備好傳送資料:
DATA

您會看到下列回應:
354 Send data. End with CRLF.CRLF

鍵入下列指令以加入主題:
Subject: test message

然後連按兩次 Enter 鍵。

該指令沒有任何回應。

附註:兩個 Enter 指令符合 RFC 822 規則,即表示 822 指令必須在一列空白後。
鍵入下列指令以加入郵件本文:
This is a test message

您無法看到本指令的回應。
在下一空白列輸入英文句點,然後按下 ENTER 鍵。

您會看到下列回應:
250 OK

鍵入下列指令以切斷連結:
QUIT

您會看到下列回應:
221 closing connection

在執行上述任一指令後,若收到「500 Command not recognized」錯誤訊息,則表示由於語法錯誤或指令無效,導致 SMTP 無法識別您鍵入的內容。
登入您在上述步驟 4 中,郵件收件者的用戶端信箱。如果信箱內有您的測試郵件訊息,則表示傳入SMTP 通訊運作正常。

2010年1月18日 星期一

ipv6 reference

Just surfing in the web, found that good article for IPv6..

ipv6資料整理.

[digested some of prefix..]
本來認為不會這麼快用到ipv6的功能,但在windows 7的homegroup及ipv6使用心得,以及建立方法這篇文章中,發現可以透過ipv6解決windows 7 的電腦之間,ipv4不同網段的資料共用問題,然後有網友問到可否同樣在windows xp與windows 7中,利用ipv6來解決ipv4不同網段的檔案分享問題。在windows 7很簡單,啟用ipv6就可以分享檔案了,完全不必多做設定,但在windows xp與windows 7之間,經過我努力的查找資料,相關的資料實在很貧乏,很可惜沒有找到建立共用檔案的方法。

不過雖然失敗,卻也吸收了不少ipv6的相關知識,在此記錄下來,ipv4的ip快耗盡了,以後總是會用到ipv6,先整理一些ipv6的基本知識。...

2010年1月7日 星期四

[pic18net] UART processing

============================================================
(2010/01/07 updated)


1. befor receiving in by UART (ex, ReadUART() function call)..
MUST do the below process:
while(!DataRdyUART());


(Receiving UART-msg by one-byte, "c")

//Receive a byte
while(!DataRdyUART());
c = ReadUART();



2. befor sending out by UART (ex, WriteUART() function call)..
MUST do the below process:
while(BusyUART());


(Send-out UART-msg by one-byte, "c")

//Transmit a byte
while(BusyUSART());
putcUART(*data);




By following up the above 2 must-procedures, that's the complete RECEIVE-In/Send-Out by UART procedure.

============================================================
(2010/01/22 updated)

in [TCPIP Demo APP] project for PIC18xxx series, the UART initialization is located in the below section (Line0491 ~ Line0509) of "InitializeBoard()" function.


============================================================
(2010/01/27 updated)
For the intro by 2010/01/07, that's NOT good way to receiving and/or sending UART messages, while multi tcpip stack tasks running simultaneously.

The better way comes from (UART <-> TCP Bridge Example), [UART2TCPBridge.C].
The ISR function (UART2TCPBridgeISR( )) for UART receiving and/or sending message is the CLASSIC example.