2008年11月7日 星期五

Back to simple test done before - Test01-simple_serout.spin

2008-11-07  

第一個測試例子是用 spin 語言透過 RS232 (8N1, 19200),送出 16 個 「A」的字元。 
abcedef <<>


Back to simple tests done before - Terminal program

2008-11-06

ViewPort is kind of difficult to understand for novices or someone who leaves Propeller for a long time.
 
Back to my simple test done before. The tests connect to RS232 with 9600, 8N1. No doubt, Hyperterm is horrible to use. Parallax's PropTerminal_0.4 default is not at the normal mode, the baudrate is fixed at 115200.



Set to the "Normal-Terminal Mode", then the Baudrate is not fixed. For the following tests, set the baudrate to 19200.



ProTerm is kind of better than Hyperterm. But the Termal.exe by Br@y++ (download from http://www.smileymicros.com/download/term20040714.zip?&MMN_position=42:42) is a simple and useful terminal program.



ViewPort 4.00 Test

2008-11-5

1. Install ViewPort 4.00
    執行 E:\Propeller\Tools\ViewPort\ViewPort setup400.exe. Install 到目錄 E:\Propeller\ViewPort400。Installer 在桌面建立捷徑。
    
 
2. 提供 6V 電源到 proto board,然後將 switch 切到 "1" 的位置。Switch 旁的 LED 會亮。
 
3. Click ViewPort shortcut to start ViewPort。選擇預先設定 tutorials 下的 01_Four Bit Counter, 然後按 "Load"。如下
 
    
 
  4. ViewPort 會 Compile 01_Four Bit Counter.spin  , 並 upload 到 Propeller 的 RAM 中,並連接上 Propeller 中執行 的 ViewPort object,出現下圖
    
 
    其中,
    (a) 為 cntr[0] 的 waveform,感覺不是 50% 的 square wave ?
    (b) 為 timescale,預設為 1ms。設定 timescale,是否會影響取樣速度及取樣數?
    (c) 為 ViewPort monitoring 的變數,io 和 freq
    (d) 可設定 變數 freq。但 freq 的意義及如何影響 counter?

測試 Propeller Proto Board


2008-11-4

1. 先 check 所需電源,電源線路及電源 jumper 設定
    根據文件 ,所需電源為 6V~9V DC, 1.5A。其中 power 相關的線路為 
因為 LDO LM1086-5.0 須有 voltage drop,所以 Vin 建議是 6-9VDC 的 adapter 輸入。但 Vin 如何連到 VinSW? 文件中相關線路如下
     
 
    但實際用電錶檢查線路,可能由於 layout 時遇到 pin swap 的特性,Switch上的 pin 有 swap 而成
    
 
    
 
     另外,文字面對 Jumper 的標示有誤,應該是 VinSW 而不是 Vin
    
 
    所以,Table for Swith
    
 
    SW Position    VinSw    Vservo
            0                NC        NC
            1                Vin        NC
            2                Vin        Vin or 5V (by the jumper position)
 
    Jumper Position    Vservo
           +5V                +5V
        VinSw                VinSw = Vin
 
    用 Parallax 的 6VDC adapter (實際為6.17V),這時但 5V 和 3.3V 電壓分別是5.00V 和 3.3.0V。
 
    那,如果是 5VDC 的 adapter 怎麼辦? 試著直接將 5VDC (實際為5.08V) 插入,並將 switch 撥到 "1" 的位置。結果 switch 旁邊的 LED (線路圖及 component placement 沒有 LED) 雖然有亮,但 5V 和 3.3V 電壓並不準確,分別是4.15V 和 3.18V。
 
    
 
    那會有兩個注意事項,
    (1) 輸入為 5V 時,最好 switch 的 position 在 "0"。若切到 "1"或"2",5V 會同時灌到 LM1086-5.0 的 input 和 output,雖然應該 OK,但避免盡量避免。
    (2) 如果誤輸入6V(或更高電壓),可能會對一些 5V peripherals (如 VGA, Keyboard, Mouse)造成傷害。必須小心。
 
2. 測試 Proto Board
 
    使用  6V adapter 輸入。
 
    Follow Propeller Expo-Step by Step Tutorial for ProtoBoard New Users,Part 1 to Part 3。(Part 4 沒做因為不想焊 LED)。其中新版的 Propeller Tools V1.2 install  時會自動安裝 FTDI USB-Serial Driver。   
 
This blog is mainly for personal use. If you feel offended by the contents, please drop me a message. 這個 blog 主要為個人使用,若你覺得內容有問題,請來信通知。 paul@paul-kang.com