作者: 魚蛋Strike 時間: 2014-10-30 23:01 標題: 有無MCU之類出到rs232 command呢?
如trigger MCU 個input, 用bin or hex 值
咁output會係rs232的command code
例如TV之類有D有rs232在背可控
作者: 亞基拉 時間: 2014-10-30 23:10
好多mcu都有build in UART, 不過係TTL, 要加232 transceiver
作者: bubibubi 時間: 2014-10-31 10:17
回覆 2# 亞基拉
built-in UART 用 TTL 抄錄是否超慢,以小時計?
作者: 亞基拉 時間: 2014-10-31 11:19
回覆 3# bubibubi
sorry, 我啲老餅仍然用TTL依個term, 應該係logic level先啱
serial 快慢取決於buad rate, 最慢既mcu行百零K應該都冇問題, 快既可以行到幾Mb
作者: bubibubi 時間: 2014-10-31 12:08
回覆 4# 亞基拉
因小弟最近見舊貼有師兄話 flash 8仔 stb 幾mb野用咗3個鐘,不知真假?好奇一問,baud rate 好似喺 9600
作者: bubibubi 時間: 2014-10-31 12:11
本帖最後由 bubibubi 於 2014-10-31 12:20 編輯
8MB 以 9600 計又好似真喺接近兩個鐘喎!
8MB x 1024^2 ÷ (9600 ÷ 8) ÷ 3600s ~= 1.94hr <--- 唔知有無搞錯
作者: 亞基拉 時間: 2014-10-31 12:25
回覆 6# bubibubi
9600大約1KB/sec, 1MB 大約要17分鐘, 依個係ideal case. 可能隻8仔慢, 同埋可能吾夠ram, 一收夠一個page就要寫落flash
作者: 亞基拉 時間: 2014-10-31 12:37
回覆 6# bubibubi
serial要計埋start bit & stop bit, 好似係1+1.5bit. 我好懶, 我當1 byte = 10 bit計 :P
作者: lunandii 時間: 2014-11-1 18:37
我諗樓主係想,唔知邊度黎嘅 hex 入去mcu, 轉成uart 出,mcu只係做converter
作者: winglim7 時間: 2014-11-2 18:10
brother means
if Pin1 is high, output ABC123
if Pin2 is high, output XYZ456 ?
if yes, any MCU that have UART, even 8051 can help
作者: 亞基拉 時間: 2014-11-2 18:50
brother means
if Pin1 is high, output ABC123
if Pin2 is high, output XYZ456 ?
of course it can, u just need to write a program to do that
I am not familiar with 8051 (I am PIC fans) but there should be lots of them with build-in hardware UART. also there should be lots of software routine that it just take 1 or 2 pin to output RS232 signal by software if there is no hardware UART.
作者: winglim7 時間: 2014-11-2 21:04
of course it can, u just need to write a program to do that
I am not familiar with 8051 (I am P ...
亞基拉 發表於 2014-11-2 18:50
haha...
actually i am making some direction to魚蛋Strike 's question.
this is not hard for both 8051/PIC / AVR.
the issue is how u design the product
e.g. hw to trigger the high signal (by remote / wifi ...)
this is much more important that the 232
作者: 魚蛋Strike 時間: 2014-11-15 19:48
其實想按個制( short cct 個input咁),
就出rs232 code, 去開電視呀轉定個台呀咁..或其它device 食rs232 command
D蠢蠢所為智能家居
可能4,5個input,
如果chip得1,2個input 或要 10010 之類為input signal, 咁又要諗由按制加轉 bin code 野

作者: 魚蛋Strike 時間: 2014-11-15 19:51
都係, 如果直 short cct or logic high 就出 hex/dec code 都好
作者: 亞基拉 時間: 2014-11-15 20:01
回覆 13# 魚蛋Strike
通常有UART既MCU都會有8個或以上input, 我最近用嗰粒有60幾個input, 2個UART
作者: 魚蛋Strike 時間: 2014-11-15 20:20
回覆 15# 亞基拉
齋U 定連板玩?
作者: 亞基拉 時間: 2014-11-15 20:28
回覆 16# 魚蛋Strike
我買/攞sample淨U自己做pcb, 你吾熟最好用arduino
作者: 魚蛋Strike 時間: 2014-11-15 20:49
回覆 17# 亞基拉
arduino 都出到 asci command code?
找唔到相關料... 成日D sample 都係voltage 著LED
作者: 亞基拉 時間: 2014-11-15 20:58
回覆 18# 魚蛋Strike
http://arduino.cc/en/reference/serial
作者: 魚蛋Strike 時間: 2014-11-15 21:52
回覆 19# 亞基拉
唔該C兄, mega 同due多3個serial添
但出事... 佢個ascii table由33開始...不是由0.....

作者: 魚蛋Strike 時間: 2014-11-15 22:29
回覆 20# 魚蛋Strike
有無C兄玩過msp430g2?
作者: 亞基拉 時間: 2014-11-15 23:03
回覆 20# 魚蛋Strike
你send 個/一串byte出去serial,關ascii table 咩事?? ascii 32係space, 0~31 係control character
你好似programming 都吾係好識, 好難搞woo.........
作者: 魚蛋Strike 時間: 2014-11-16 00:20
回覆 22# 亞基拉
我見佢list 個 ascii table 出來...
不是限左可見chara only咩? 唔係就OK ar
作者: 亞基拉 時間: 2014-11-16 00:32
回覆 23# 魚蛋Strike
arduino 我未用過, 不過我吾信有咁既限制, 如果吾係有好多野都做吾到,同埋冇理由咁低能
作者: lunandii 時間: 2014-11-16 01:25
我開始懷疑魚蛋唔熟ascii, uart, rs232, hex 係d咩
作者: lowcostlife 時間: 2014-11-16 06:30
ASCII code table
http://www.asciitable.com/index/asciifull.gif
作者: FPDman 時間: 2014-11-16 08:32
兩年前買過 MSP430G2 的 LaunchPad 板,依家睇番 d code,好多嘢都唔記得哂
https://h2.hkepc.com/forum/attachment.php?aid=1735914&k=a00927212a44b823ba780c839594d068&t=1781963333&sid=lCceHr1vB6

https://h2.hkepc.com/forum/attachment.php?aid=1735915&k=88a29e168e17d7ba6b813ddeab038f5c&t=1781963333&sid=lCceHr1vB6

作者: 魚蛋Strike 時間: 2014-11-16 10:24
本帖最後由 魚蛋Strike 於 2014-11-16 10:29 編輯
http://arduino.cc/en/Tutorial/ASCIITable
佢一開頭就 dec 33了... 尾才.........
作者: 魚蛋Strike 時間: 2014-11-16 10:27
回覆 27# FPDman
woow display,
MSP430G2出 serial ascii code ? display 食ascii自已再轉?
作者: 魚蛋Strike 時間: 2014-11-16 10:53
有無link教學?
作者: 魚蛋Strike 時間: 2014-11-16 12:34
MSP430G2.... 得1 rx/tx serial, 有無module 變多幾個出來?? XD 定找D 20PIN chip 有多D rx/tx的呢?
凸然奇想, 可唔可以用來copy/burn cmos, router rom ?? XDD
作者: FPDman 時間: 2014-11-16 15:43
睇番 TI 官網或者去 43oh 睇睇
http://43oh.com/2010/08/10-beginner-msp430-tutorials-and-counting/
作者: lowcostlife 時間: 2014-11-17 01:27
MSP430G2.... 得1 rx/tx serial, 有無module 變多幾個出來?? XD 定找D 20PIN chip 有多D rx/tx的呢? ...
魚蛋Strike 發表於 2014-11-16 12:34
咩情況會需要幾個 serial port ?
作者: IanW 時間: 2014-11-17 11:29
樓主你搞到自己亂晒大龍.
你要用 RS232 去 control 個電視. 根本唔駛理 ASCII, 你只要知你電視個 RS232 口食乜野 Code, 行乜野 baud rate, start/stop bit, parity.
哩個係前題, 首先你知唔知個電視的 code? 係唔係有工業標準?
你問問下, 居然去左 ASCII, 估計你係唔知.
如果哩個你都未知的話, 其他一砌都係枉然... 比 10 個 UART port 你都係同個電視對牛彈琴.



