找回密码
 注册
搜索
查看: 542|回复: 4

[讨论] SPI to UART converter

[复制链接]
发表于 2009-9-17 11:34:49 | 显示全部楼层 |阅读模式
A micro controller only has one UART port. Therefore, we decide to use microcontroller SPI port as another UART2.

We need a SPI to UART converter (such as MAXIM3100 or NXP  - 161S752), however, this IC only supports SPI slave mode only. When we use it with this configuration:

a) Micro controller’s SPI (master) ------ “SPI (slave) to UART”-- PC’s UART
•        The communication is allowed.

b) PC’s UART ----- “UART to SPI(slave)” -- Micro controller’s SPI (master)
•        The communication is not allowed as slave is unable to initiate talk with master.

May I know any SPI to UART converter IC can support Master SPI? Or do you all have other solution, thank you!
发表于 2009-9-17 16:43:49 | 显示全部楼层
1、“b) PC’s UART ----- “UART to SPI(slave)” -- Micro controller’s SPI (master)
• The communication is not allowed as slave is unable to initiate talk with master.”
I think, that is interrut with the SPI to UART converter when PC's UART send data to it.You can detect the interrupt bit and use SPI to read the SPI to UART converter.Therefore,you can connect the SPI to UART converter's interrupt Pin with the Micro controller's external interrupt Pin.You can detect the SPI to UART converter's interrupt in real time through the external interrupt.
2、 Use the micro controller such as C8051F340,which has 2 UARTs.
点评回复

使用道具 举报

 楼主| 发表于 2009-9-18 11:23:55 | 显示全部楼层
Yeah, scholler. I think that is the point. Thank you.

However, which party will generate the interrupt signal?
Can I say that the interrupt signal is generated from the RTS or CTS signal?



For your information, we cannot change microcontroller due to inventory available.

Thank you,
点评回复

使用道具 举报

发表于 2009-9-18 13:04:47 | 显示全部楼层
Dear Elfrec:

    I read the datasheet of MAX3100, and find that the MAX3100 has the interrupt Pin /IRQ.See page 6 of the MAX3100's datasheet, when the TM(TRANSMIT-DONE),RM(DATA-RECEIVED),PM and RAM happened,the interrupt Pin /IRQ set to be 0. Use the SPI bus to read the TM,RM,PM and RAM mask bit /TM,/RM,PM/ and /RAM,see the page 8 Table 2. if the /RM 's value has been changed,you can use the SPI bus to read the data such as page 8 Table 4.See the Interrupt Sources and Masks at page 11.

scholler
点评回复

使用道具 举报

 楼主| 发表于 2009-9-18 16:03:04 | 显示全部楼层
高手,高手~想不到这个论坛素质那么高,我以为没人会鸟我的英文。 我比较擅长RF的东西,下次有什么问题可以PM我,谢谢!

Powerful! It is unexpected that the quality of this forum can be that high. I thought everyone will ignore me due to my english writing. I am more familiar with the RF knowledge, please PM me next time if you have any problem. Thank you!
点评回复

使用道具 举报

高级模式
B Color Image Link Quote Code Smilies

本版积分规则

Archiver|手机版|小黑屋|52RD我爱研发网 ( 沪ICP备2022007804号-2 )

GMT+8, 2024-11-27 08:28 , Processed in 0.045859 second(s), 16 queries , Gzip On.

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表