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

 找回密碼
 立即注冊

QQ登錄

只需一步,快速開始

搜索
查看: 2850|回復: 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 單片機教程網

快速回復 返回頂部 返回列表
主站蜘蛛池模板: 自拍视频网 | 天天人人精品 | 午夜激情在线 | 欧美日韩国产一区二区三区 | 黄色三级在线播放 | h在线| 欧美精品1区2区3区 免费黄篇 | 国产精品成人一区二区三区夜夜夜 | 在线午夜 | 狠狠入ady亚洲精品经典电影 | 日本高清中文字幕 | 韩国主播午夜大尺度福利 | 国产精品久久久一区二区三区 | 国产高清一区二区三区 | 色视频网站在线观看 | 99reav| 成年人网站免费视频 | 91麻豆精品国产91久久久久久久久 | a级片在线 | 日本不卡免费新一二三区 | 日韩精品视频在线 | 人妖av| 国产一区二区三区四区hd | 日韩手机在线看片 | 97国产精品 | 一区日韩 | 日韩一区在线播放 | 超碰最新在线 | 精品一区电影 | www.youjizz.com日韩 | 国产一级片在线观看视频 | 日韩手机在线视频 | 欧美亚洲综合久久 | 国产精品www | 日本一区二区三区四区 | 欧美日在线 | 亚洲一区二区在线 | 国产一区二区在线免费观看 | www.久草.com| 看羞羞视频免费 | 久久av网|