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

論壇索引


Board index » All Posts (mechwu)




Re: 想請問大家PIC16F877的TCP/IP應用
#1
資深會員
資深會員


參照:

noahark 寫到:
...
因為目前我們必須在PIC16F877上implement
所以請問版主是否有PIC16 TCP/IP Stack的範例可以提供
感謝回答


必須用 16F877 ?? 價格考量 ??

16F877A = USD$ 3.71
18F4520 = USD$ 4.59
18F45J10 = USD$ 1.88 !!!

這些 PIC 的 pin 腳全相容,建議先用 18F4520 開發,然後換到 45J10,再等待 45K20

PIC16 的 RAM 太少!做 TCP/IP 是可以,但是功能與性能被限制太多,價錢又沒有比較便宜,不值得啦

p.s. Ryang 大大,K 系列幾時會出來啊?好奇中

發表於: 2007/4/10 18:12
頂部


Re: 詢問pic18f452 USART傳送問題
#2
資深會員
資深會員



你寫的
while(TXSTAbits.TRMT=0);

我寫的
while(TXSTAbits.TRMT==0);

有差嗎?

我的習慣是

putcUSART(0xA7);
while(TXSTAbits.TRMT==0);
putcUSART(0xA5);
while(TXSTAbits.TRMT==0);
putcUSART(0x5A);
while(TXSTAbits.TRMT==0);

發表於: 2007/3/21 14:41
頂部


Re: 請教一下,CCS與C18的問題
#3
資深會員
資深會員


基本上,用 CCS 編程並不需要用到 TMR1IF,因為 CCS 會幫您編中斷派遣程式,所以,你只需要編中斷處理程式,然後在主程式中啟動中斷,就完成啦。

#INT_TIMER1
{
}

void main()
{
....
disable_enterrupts(INT_TIMER1);
....
enable_interrupts(INT_TIMER1);
...
}
根本用不到TMR1IF 啊,呵呵

enjoy !

當然啦,如果您要自己編中斷派遣程式也行,請參考下列 HELP 資訊

#INT_GLOBAL


Syntax:
#int_global

Elements:
None

Purpose:
This directive causes the following function to replace the compiler interrupt dispatcher. The function is normally not required and should be used with great caution. When used, the compiler does not generate start-up code or clean-up code, and does not save the registers.

Examples:
#int_global

isr() { // Will be located at location 4

#asm

bsf isr_flag

retfie

#endasm

}

Example Files:
ex_glint.c

Also See:
#int_xxxx

發表於: 2007/3/18 11:26
頂部


Re: 有誰還有留著,沒有使用的DISCOUNT COUPON
#4
資深會員
資深會員


哇哩,哇哩

為什麼我沒有看到這些好康的折扣

哇哩,哇哩

上星期買 Explorer-16 ,刷完卡才看到折扣

哇哩,哇哩

我以後一定會乖乖的仔細的慢慢的找折扣啦

嗚嗚

不甘心喔,多喝水,多喝水

發表於: 2006/12/27 0:33
頂部


Re: 關於 CCS 製作LIBRARY
#5
資深會員
資深會員


1. CCS v4 才有 Linker, 才能做 Library

2. CCS v3 沒有 Linker, 不能做 Library

3. CCS v3.225 以後的版本有加密的功能, 可以滿足你的需求

例 要將 my_function.c 加密, 就編輯 my_function.c , 然後,
點擊 File -> Encrypt 就會產生 my_function.c.encrypted 這個新檔案, 然後 就把這加密後的檔案給客戶用就好啦

#include "my_function.c.encrypted"

my_function.c 裡面再加上 #nolist 則在 LST 檔案裡面就連編出來的組語也都看不到啦

發表於: 2006/12/16 13:34
頂部


Re: about printf and ccs-c
#6
資深會員
資深會員


參照:

albertyoun 寫到:

我的问题是,我怎么能看到printf输出----



PIC 的程式要先啟用 UART,才能使用 printf()

#use rs232( baud = 115200, xmit = PIN_C6, rcv = PIN_C7 )

然後,你必須要有一台終端機 ... 接線如下

PIC 的 UART 的 TX / RX 線 (通常是 RC6 與 RC7) 接到 RS232 準位轉換器 (通常用 MAX232 這顆 IC) ,將 PIC 的 0V / 5V 的 TTL/CMOS 信號轉換為 +/- 9V 的 RS232 信號,然後,將 MAX232 的線接到 PC 的 COM port (或 USB / RS232 轉換器),然後, 啟動 PC 的終端機程式 (通常是 Hyperterminal, hypertrm.exe,或是 CCS 提供的 C:\Program Files\PICC\siow.exe) 然後,設定好 com port, baud rate 等參數,然後,就可以在 PC 的螢幕上看到輸出啦

先看看你的實驗板上有沒有 MAX232 這顆 IC 吧

發表於: 2006/10/30 12:37
頂部


Re: about printf and ccs-c
#7
資深會員
資深會員


CCS 最令人感動的就是這些 功能強大,高彈性的 fprintf, sprintf 啦,

printf (), printf (cstring, values...)
printf (fname, cstring, values...)
fprintf (stream, cstring, values...)
sprintf(string, cstring, values...);

PIC12, PIC16, PIC18 都可以用,呵呵

還可以自行創造些 printf( lcd_putc, ... ) 之類的好東西,只要有 lcd_putc ( char c ) 就可以直接送去 LCD,把函數 lcd_putc 當成檔案來用!呵呵

-----------------

Syntax:
sprintf(string, cstring, values...);


Syntax:
printf (string)
or
printf (cstring, values...)
or
printf (fname, cstring, values...)
fprintf (stream, cstring, values...)

Syntax:
sprintf(string, cstring, values...);

Parameters:
string is an array of characters.

cstring is a constant string or an array of characters null terminated. Values are a list of variables separated by commas.


發表於: 2006/10/27 2:13
頂部


Re: CCS problem
#8
資深會員
資深會員


參照:

goodwin 寫到:
我用ccs 4.0.12 在ccs中compile 一個很簡單的c-code. 設定io-port.

set_tris_a(0x38) 在.lst中可以發現被轉成
0037: MOVLW 38
0038: MOVWF 05

真的很怪,
有沒有人可以教一下如何把c-code轉成asm code. 再看一次由asm 去port可能會比較安全一點.


1. 請先說明你用的 CPU, 是 16F 的嗎?

若是 16F, 則 MOVWF 05 應寫入 0x85 (PORTA) 而非 0x05

0007: BSF 03.5 <= 注意這行
0008: BSF 1F.0
0009: BSF 1F.1
000A: BSF 1F.2
000B: BCF 1F.3
.................... set_tris_a(0x38);
000C: MOVLW 38
000D: MOVWF 05

設定 option => file format => symbolic 則 LST 檔出現

0007: BSF STATUS.5 <= 注意這行
0008: BSF ADCON1.0
0009: BSF ADCON1.1
000A: BSF ADCON1.2
000B: BCF ADCON1.3
.................... set_tris_a(0x38);
000C: MOVLW 38
000D: MOVWF TRISA


2. CCS 4.012 尚未穩定,若你是要開發產品,則建議退回 3.249 版,若僅是學習或玩耍,也建議與 3.249 比較一下

詳見 CCS 討論區 http://www.ccsinfo.com/forum

http://www.ccsinfo.com/forum/viewtopi ... c7d483d4af1a6935f6eecdbe3

發表於: 2006/10/25 12:33
頂部


Re: Filter
#9
資深會員
資深會員


參照:

signal*( b/(s+a) ) = signal * b /(s+a)


這 s 是 Laplace operator 喔,也稱為微分算子,s = d/dt,在程式裡 s 和 a 是不能加的啦!

要轉成程式嘛,呼呼,先看你的取樣頻率,然後 ... 說來話長 ...

過完中秋再說吧

中秋愉快

發表於: 2006/10/6 0:00
頂部


Re: 10F202用CCS寫software UART
#10
資深會員
資深會員


GPS 的 UART 是 TTL 準位還是 RS232 準位?
是 5V TTL 還是 3.3 V TTL ?
有加 MAX232 做準位轉換嗎?
CCS 的 #use rs232 用於 software UART 時可以選用 INVERT

INVERT
Invert the polarity of the serial pins (normally not needed when level converter, such as the MAX232). May not be used with the internal UART.

先確認準位吧

發表於: 2006/10/5 23:51
頂部



(1) 2 3 4 ... 16 »



:::

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

教育訓練中心

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