久久久久久久999_99精品久久精品一区二区爱城_成人欧美一区二区三区在线播放_国产精品日本一区二区不卡视频_国产午夜视频_欧美精品在线观看免费

 找回密碼
 立即注冊

QQ登錄

只需一步,快速開始

搜索
查看: 2837|回復: 0
打印 上一主題 下一主題
收起左側

Using USART1 on the STM32F4Discovery

[復制鏈接]
跳轉到指定樓層
樓主
ID:104126 發表于 2016-1-23 02:48 | 只看該作者 回帖獎勵 |倒序瀏覽 |閱讀模式
While it was very good of ST to make the fantastically inexpensiveand versatile STM32F4Discovery board, they have made things alittle difficult in the choice of peripherals in places.

I use the board as a test bed for my micromouse code. All themicromouse peripherals are wired up to some perfboard that alsoholds the STM32F4Discovery. The drivers for everything on the mousecan easily be tested and I can experiment with different userinterfaces, motor PWM schemes and sensor combinations. All withoutputting my mouse board at risk.

Generally, this works fine but, for compatibility with my STM32F103code, I chose to use USART1 as the main serial terminal on themouse. The STM32f4Discovery schematic shows that the default pinfor serial TX on this USART is PA9. That is connected to an LED anda 4.7uF capacitor (C49). The pin is used for the VBUS line on theUSB OTG port. The capacitor means that the pin is essentiallyincapable fo doing any useful serial speed at all.

Since I have no interest in using the USB OTG functions, I simplydesoldered the capacitor. Actually, I stood it up on one end sothat I could put it back if ever I had a change of heart.

A further look at the schematic shows that pin PC0 is used toenable the STMPS2141 power switch. This will place 5V on the PA9serial line whenever PC0 is set low. A zero Ohm resistor connectsPC0 to the enable line of this switch so I stood that on end aswell.

Finally, the LED (LD7) is lit when PA9 is high. However, the baseof the driver transistor is not held low so the LED does not turnoff reliably. There are pads available on the board to fit asuitable resistor as R57. I chose a 22k resistor so that 3V on PA9would be enough to turn on the LED but anything less than about 2Vwould not.

Now I get good serial data out of USART1 and I don’t have to worryabout 5V appearing on the line when PC0 is changed. As a bonus, Iget the LED (LD7 at the bottom of the board) telling me when thereis activity on the PA9 line. The TX line will idle high so the LEDis on most of the time.


分享到:  QQ好友和群QQ好友和群 QQ空間QQ空間 騰訊微博騰訊微博 騰訊朋友騰訊朋友
收藏收藏 分享淘帖 頂 踩
回復

使用道具 舉報

您需要登錄后才可以回帖 登錄 | 立即注冊

本版積分規則

手機版|小黑屋|51黑電子論壇 |51黑電子論壇6群 QQ 管理員QQ:125739409;技術交流QQ群281945664

Powered by 單片機教程網

快速回復 返回頂部 返回列表
主站蜘蛛池模板: 成人在线黄色 | 久一精品| 成人不卡 | 国产精品一区二区av | 亚洲精品91 | 日韩在线小视频 | 亚洲国产乱码 | 精品乱子伦一区二区三区 | 久久艹免费视频 | 欧美日韩在线成人 | 97在线观看 | 午夜看片网站 | 99精品电影| 久久久这里都是精品 | 99久久婷婷国产亚洲终合精品 | 免费国产一区 | 久久久久国产一区二区三区 | 亚洲 自拍 另类 欧美 丝袜 | 成人深夜福利 | 久久一级大片 | a在线免费观看 | 红桃视频一区二区三区免费 | 亚洲色图综合 | 天天爽天天干 | 欧美日韩综合一区 | 亚洲成人www | 国产精品视频网 | 在线观看国产视频 | 欧美日韩不卡 | 国产黄色网址在线观看 | 婷婷99 | 精品99在线| 成人在线观看免费视频 | 国产精品久久久久久久久免费樱桃 | 天天碰日日操 | 久久成人精品 | 成人综合在线视频 | 国产人成精品一区二区三 | 99热国产精品 | 亚洲精品综合 | 亚洲码欧美码一区二区三区 |