论坛风格切换切换到宽版
  • 44070阅读
  • 85回复

不用 50 RMB 也能作的 16F88 One Chip TNC 有關資料 [复制链接]

上一主题 下一主题
离线VR2VJJ
 
发帖
578
只看楼主 倒序阅读 0楼 发表于: 2005-04-02
那是 qex mar/apr 05 的有關資料, 以一個單片機, 可以:
1. 監聽本地的封包活動
2. 作為一個完整的 digipeater
3. 定時發出你自定的標站 (beacon) 訊息
4. 令你在 "converse" mode 以 round-table fashion 作通訊
  (allow you to communicate in a round-table fashion using "converse" mode)
5. 接上 gps 後, 作為一個 aprs tracker (等同一個 tinytrak!)

雖然一般有關設計也會使用 mx614 等 modem chip, 但會令用電量增有以及加重成本, 加上有時該類晶片難以獲得, 所以現以更快更平的單片機去取代了。而據作者 wb8wga bob ball 說 16f88 以 20mhz 操作, 是有足夠能力應付的。

firmware本身以像 tt3 一樣, 以 4個電阻組成的 resistor ladder 以 32 組不同參考電壓去產生正弦波。接收則以 n0qbh mike 的無modem設計為基礎. 而本 tnc 的操作介面, 是參考 tapr 的 tnc 的功能簡化而成, 它能夠:
* 以 terminal 的操作介面作設定, 儲入 ee ram 中
* 加入監視封包功能, 在連上 terminal 後, 可顯示所有/不作/只送給自己的封包
* 支援 digipeating (每封包達 255bytes/pkt)
* 化名 (alias) 功能令到本tnc能夠對應 relay 類別的 digipeater
* 支援自定內容的標站 (beacon) 功能
* 作 aprs tracker

作者更付上有作者備註的源碼, 使有心人能作改動, 改良及改善本 one chip tnc 的有關功能, 但請緊記 credit 各有關源碼的作者。
請在此下載: http://www.arrl.org/qexfiles/3x05ball.zip

朋友, 是時候加入 aprs 的行列了!

ps: 有人找到 16f88 嗎? 我在賽格找過, 可惜找不到, 只好看看 microchip 可否給我幾個樣本.
离线VR2VJJ
发帖
578
只看该作者 1楼 发表于: 2005-04-02
作者 bob ball 就我對這個 tnc 的建造, 給我的電郵: building tips from wb8wga directly:

on the modem chip performance....

i have had very good luck with the modemless design. i have set up tests
between 2 of the units passing a packet back and forth for many days and
had good success. i also have used it with very weak signals (less than
1 s unit) and it works well. i have some done some very imperical
comparisons with mx614p unit i built and couldn't see a lot of difference.

(意譯: 經多日反覆的與有 mx614p 的設計比較下, 看不出與那個tnc有什麼分別, 而且就算訊號強度少於 s1, 也能成功操作。)

i am however, patiently waiting to get others experience. as a result of
the article, there are a lot of these being built right now and i will
be very interested to get feedback on this. one user has already
suggested a 2 resistor addition to add some hysterisis to the comparitor
which should eliminate any high freq jitter and improve performance.

(意譯: 有人建議在 comparitor 加多兩個電阻, 以減少高頻音噪, 改善效能。)

some things i have noted that can cause bad performance..
1. ground loop problems. depending on how the radio, tnc, and terminal
program are powered you can get big 60 hz currents(or is it 50hz
there?) on the ground circuit. with these simple designs, there is no
isolation on the audio circuits. i had one unit that worked poorly that
i finally traced to a ground problem between the radio speaker output
and the mic input. wall wort power supplies also seem to sometimes cause
problems.
2. high freq oscillations in the comparitor. as i mentioned, i think
this can be corrected by adding some hysterisis in the comparitor circuit.
3. too slow of a pic clock speed. if noise is present in the signal, the
interupt routine must be fast enough to recognize the glitch, throw it
out and resync on the packet frame. this is especially critical when it
is detecting flag words. my 20 mhz pic16f88 units appear to work better
than the 628 units i was running at 10 mhz.

(意譯: 已知的會影響效能的事 -
1. 接地問題, 因為設計上沒有分隔電路, 有可能因為接地有做成訊號干擾, 如 switching power 的 gnd 或是 mic input/spk output 的 gnd 雜噪問題.

2. comparitor 的高頻振盪問題, 之前有所提及, 可加上些電阻解決.

3. 太慢的 pic 時速, 以 16f628 的 10mhz 比較, 16f88 20mhz 做的會更好)

i believe, that if the design is not optimum yet, it can and will be fixed.
it is amazing what can happen if you get a bunch of hams working
together on a problem like this! the digital filtering in the pic is
very crude at this point and could be strengthened. there may be cases
where aliasing is occuring. what is for sure though is the mx614 has to
go if we want to get something cost effective.

(意譯: 設計再有改良空間, 而為了減輕成本, 不用mx614是勢在必行, 但也是加強pic 對數碼 filter 的處理)
离线BD5HMC
发帖
1102
只看该作者 2楼 发表于: 2005-04-02
啊~~~这个好啊,成功的话大家都能玩tnc了,支持!单片机是个问题..........
离线bd4rs
发帖
5111
只看该作者 3楼 发表于: 2005-04-02
好东西.谢谢vr2vjj,总是能带来一些新东西,很有收益.我会抓紧学习学习.
今天与其他一些ham在南京市实际实验aprs,使用了tt3和自己做的tt1.6很有收获,我会另贴介绍. 对你介绍的这个很感兴趣.
离线VR2VJJ
发帖
578
只看该作者 4楼 发表于: 2005-04-05
bob ball wb8wga 又有新的建設建議:

tnc builders:

i have gotten some more feedback on the tnc article so want to pass it on to everyone to expedite your building efforts. please pardon me if some of this is redundant with earlier emails:

1. the text on page 24 describes the monitor command. in the software implementation, it is actually mon (ie mon off/all/me). thanks to k1irk.

2. if you plan to reassemble the software and use mplab 7.01 or later you will see 3 undefined symbols due to microchip’s unexpected change in name.

as pointed out by leo coleman, this can easily be fixed by making the following changes in the provided tnc .asm file:

change toie to tmr0ie
change toif to tmr0if
change _wrt_enable_off to _wrt_protect_off

3. i have added a reference i inadvertantly missed in the to k5atm’s open source interrupt service routine. it is now in the source code at the league and i have also asked that my oversight be included in the letters to the editor in the next issue.

4. phil, k1irk and rod kreuter have experienced some high freq oscillation in the receive circuitry causing the receive led to oscillate. phil recommends a more robust design would include a slight amount of negative feedback to insure this doesn’t happen. they suggest the following:

a. lift ground from pin 1 of 16f88 (leave ground on pin 18). insert a 470 ohm resistor from pin 1 to ground.

b. insert a 100k resistor from pin 1 to pin 2 on the 16f88.

this will provide a small of hysteresis and stabilize against oscillations.

c. they also recommend putting a .001 ufd cap from pin 17 to ground to remove any potential 20 mhz clock to the comparitor.

i haven’t experienced this oscillation on any of the 5 units i have built that might have been dumb luck! i think that phil and rod have a good idea and plan on modifying one of my units and trying it. thank you phil and rod

5. phil also has the following suggestion on the transmit circuitry...

....i have looked at the output on a scope using the calibration function and it looks ok. i thought it might be a good idea to put a cap across the pot to smooth out the steps on the sine wave approximation rather than letting the radio do that.

lastly, wanted to include a photo k1irk send of his constructed unit. his layout is far superior to mine and shows how the unit footprint can be squeezed down.

6. rod kreuter, wa3enk sent some email about a terminal setup problem he experienced with the tnc . the tnc expects a line feed character at the end of a command sequence from the terminal . if it just sees a carriage return for the line end, it echos the individual characters but then times out after about 7 seconds since it thinks the operator went to get a drink in the middle of the command! i use hyperterminal under xp which has the option set to send line feeds (file->properties->settings->ascii setup->“send line end with lf”. rod experienced the problem with procomm under dos. if your experiencing this problem and can’t set your particular terminal program to work please let me know.

thanks to rod for digging into the source code and figuring this one out.
nice piece of detective work.

de wb8wga
离线VR2VJJ
发帖
578
只看该作者 5楼 发表于: 2005-04-05
因為在國內似乎很難找到 16f88, vr2wwl 將有關的 asm 改了一些資料, 將程式放入 16f876a 中, 在breadboard的測試, 似乎能夠操作。

上次到賽格, 876a 那個也只不過是 rmb 20 左右的東東, 所以嘛.... 似乎有興趣的朋友可不需要等待了 (我卻要等待 microchip 的樣版呢.. :) )

這個用 876a, 與原版的插腳有分別:
rb<7:4> : 話音輸出 - 連上電阻階梯 audio output for the resister ladder
rb3 : ptt output
rb2: rx led
rb1: gps/command jumper input
ra3: audio signal input
ra0: audio signal ground
rc7,rc6 : tx/rx for serial io.
mclr -> +ve
wdt disabled.

有興趣不妨試做一下吧, 附上 asm 及 hex file
附件: 16f876A TNC.zip (0 K) 下载次数:810
离线2cm
发帖
3486
只看该作者 6楼 发表于: 2005-04-05
老朋友好贴子啊.帮顶.

这个东东真的不错,不知用16f876代替16f88,程序是不是要改?
源程序是公开的吗?
离线bv2ac
发帖
14169
只看该作者 7楼 发表于: 2005-04-05
16f877 能用 16f876 的碼嗎? 這些案子已經搞了許多 16f84, 16c73, 16f877.... 每種都最少要order 10 個, 粉傷荷包的.... :(
离线VR2VJJ
发帖
578
只看该作者 8楼 发表于: 2005-04-05
16f88 的源碼是公開的, 有興趣的可以試作.

而 16f876a 與 16f877a 除了 877 大一點以及多兩個 port 外, 是完全能通用的. 但是在 16f88 的源碼轉去 16f876a 上 (貼 #6 附上的), wb8wga 說不太清楚 f88 與 f876 的 comparitor 是否相同, 如果是的話就可以了.

vr2wwl 在初步測試後, 發覺是能夠在 agwterminal -> 16f876a tnc -> agwterminal 作 digipeater 及 receive 的.

wb8wga 說他那幾天有點工作, 但回來後會看看 由 vr2wwl 操刀的 "硬改 876a" tnc 的源碼了.
离线2cm
发帖
3486
只看该作者 9楼 发表于: 2005-04-06
好啊。
等你们的好消息。。。。。

'
16f88 的源碼是公開的, 有興趣的可以試作.
而 16f876a 與 16f877a 除了 877 大一點以及多兩個 port 外, 是完全能通用的. 但是在 16f88 的源碼轉去 16f876a 上 (貼 #6 附上的), wb8wga 說不太清楚 f88 與 f876 的 comparitor 是否相同, 如果是的話就可以了.
vr2wwl 在初步測試後, 發覺是能夠在 agwterminal -> 16f876a tnc -> agwterminal 作 digipeater 及 receive 的.
wb8wga 說他那幾天有點工作, 但回來後會看看 由 vr2wwl 操刀的 "硬改 876a" tnc 的源碼了.
'
离线bd8te
发帖
4258
只看该作者 10楼 发表于: 2005-05-04
vr2vjj你好:
能提供16F876TNC的图纸吗?
离线BD3RJ
发帖
18844
只看该作者 11楼 发表于: 2005-05-04
'
vr2vjj你好:
能提供16F876TNC的图纸吗?
'
16f88原文扫描版我有,12mb需要请qq联系.
离线BD7PA
发帖
2268
只看该作者 12楼 发表于: 2005-07-03
早早:

  我猜想,能不能夠通過16f87或者16f84替代呢?甚至是 pic16f628,
它們的腳位定義都是相同的,只是工作的頻率不同,我想如果不成功,
極有可能由於程式對應工作頻率的改變引起,也許讓改動原程式便可以
解決吧。

  願更多的朋友用上aprs。
离线BD4VNF
发帖
1208
只看该作者 13楼 发表于: 2005-07-04
'
16f877 能用 16f876 的碼嗎? 這些案子已經搞了許多 16f84, 16c73, 16f877.... 每種都最少要order 10 個, 粉傷荷包的.... :(
'
为何不用avr的单片机,到处都是啊.还绝不伤腰包
离线VR2VJJ
发帖
578
只看该作者 14楼 发表于: 2005-07-05
'
早早:
  我猜想,能不能夠通過16f87或者16f84替代呢?甚至是 pic16f628,
它們的腳位定義都是相同的,只是工作的頻率不同,我想如果不成功,
極有可能由於程式對應工作頻率的改變引起,也許讓改動原程式便可以
解決吧。
  願更多的朋友用上aprs。
'
其實可唔可以用 80486 做一個 p4 3.2ghz 的系統呢?
如果有留心看過有關資料, 應會知道 f88 是與 876/877 同樣速度等級的。
所以如果用 f84, f628...你應該可以做得到, 但可靠性就值得相確了。

當然, vnf 所講是對的, 用avr未嘗不可, 但是...誰來做?

我已經開始只做不多講了, 有成果就話再發放呢. 但願有更多的高手能作 pic 的 aprs programming 呢!
离线BD4VNF
发帖
1208
只看该作者 15楼 发表于: 2005-07-05
我不懂pic,要做只能是avr的,昨天将程序翻译了一下,发现用avr可以解决的
离线BD4VNF
发帖
1208
只看该作者 16楼 发表于: 2005-07-05
请教VR2VJJ
这个电路怎样实现DIGIPEATER?是不是要两套收发对接,才能组成?
离线BD7PA
发帖
2268
只看该作者 17楼 发表于: 2005-07-05
早早:

    vjj的意思, 我的理解是: 雖然同為處理器,但由於不同的處理能力級別,有可能導致工作是否被適當處理吧.

    在資料中發現,成品tt3 使用16f628,便是工作於10mhz osc 的晶體及主頻,因此我想穩定性應該還是有保證的,而比較後,電路架構基本近似,均為同一類産品,我想是程式編寫的差異吧。

  digipeater 是識別標識/添加標識/去除標識/列隊處理的工作,更高級別的設備,我想包含網路接入的數碼交換或是遠端搖控的功能吧。
离线BD4OS
发帖
6198
只看该作者 18楼 发表于: 2005-07-05
'
我不懂pic,要做只能是avr的,昨天将程序翻译了一下,发现用avr可以解决的
'

兄弟,如果你能把它移植到avr的平台真是功德无量啊!
离线BD4VNF
发帖
1208
只看该作者 19楼 发表于: 2005-07-06
尽力而为吧.ax.25协议现在还不懂