网络科技

    今日:363| 主题:244964
收藏本版
互联网、科技极客的综合动态。

[其他] Tiva C GPIOs

[复制链接]
雨下╰っ拥吻 发表于 2016-10-15 02:57:43
431 37

立即注册CoLaBug.com会员,免费获得投稿人的专业资料,享用更多功能,玩转个人品牌!

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
GPIOs are the basic interfaces of any microcontroller. Without GPIOs we won’t have any other way to use a micro and it will be nothing more different than a chunk of well-fabricated silicon. Through them we can interface both transducers or sensors and actuators. We can also connect other devices like a display, external devices and so on. As with any ARM microcontroller, the GPIOs of TM4C12x Tiva C ARM microcontrollers are very elaborate, having many options that are usually unavailable in common 8-bit microcontrollers. The one we are interested in – the TM4C123GH6PMI – is a 64-pin micro with more than 40 usable GPIO pins. Here in this post we will explore the GPIOs of TIVA C micros.
   
Tiva C GPIOs-1 (interested,different,interface,nothing,explore)

  Overview

  Tiva C micros are low power ARM Cortex M4 MCUS and run typically at 3.3V and so you can guess the logic levels of GPIO pins. However, except a few GPIOs (PB0, PB1, PD4 and PD5) all GPIO pins are 5V tolerant. This 5V tolerant feature is a smart addition and most people will simply overlook it or won’t fully realize its potential use. At present microcontrollers are getting more and more energy efficient, and so their operating voltage levels are gradually decreasing. Most modern micros, especially the ARM family don’t operate at 5V and the use of 5V TTL logic level will eventually diminish in the future. The most common new voltage standard is that of a cell phone, i.e. 3.3V. Many microcontrollers like the ATMega16A and the PIC18F252 that usually operate at 5V have the ability to operate at 3.3V or even below. However, there are lots of other devices that can’t operate below 4V. These devices will operate erroneously or may even reset frequently due to brownout. Here the 5V tolerant feature of Tiva C MCUs come to aid, allowing us to use legacy external interfaces and devices like sensors, external modules, legacy microcontrollers, etc. without the need of additional logic level translator circuits or too much consideration about different voltage levels. It is as simple as plug-and-play. Thus, cost, space and size remain at a minimum.

Tiva C GPIOs-2 (interested,different,interface,nothing,explore)

  At this point we need to note a few things:
  
       
  • Never exceed input logic high voltage of any pin beyond VDD limit unless you are sure that the source will not exceed the 5V limit and you aren’t using the any of the exceptional pins (PB0, PB1, PD4 and PD5). It is better to leave these pins idle unless you have memorized these pin numbers. Fortunately, PD4 and PD5 are inaccessible in the Tiva C Launchpad board.   
  • Likewise, don’t use negative input voltages with any pin. Be sure of polarity.   
  • Some GPIO pins are not accessible in Launchpad board while others are physically non-existent, e.g. PF7 and so don’t try to program them. Leave them alone just like a don’t care bit of a register.   
  • When coding a new project, I recommend adding a delay of about 2 – 3 seconds at the start of the code to avoid part lockout.   
  • Don’t stress any GPIO pin beyond 10 – 15mA, although the max limit is 25mA. Use external switching devices like opto-isolators, FETs and BJTs to drive high power loads.   
  • Though most pins are 5V tolerant, it doesn’t necessarily mean that the logic level is based on 5V TTL logic level. The logic level voltage limits are still realized with respect to VDD, 3.3V.   
  • Similarly, when using TIVA C micro’s ADC, the ADC pins can withstand voltages beyond VDD voltage limit but can’t measure voltages beyond VDD or reference voltage level.   
  • GPIO pins have alternate functions and so use Pinmux software to find required GPIO pins. You can also checkout the alternate function pins in the help section of MikroC compiler under the GPIO library. In the compiler, if you type _GPIO and hit CTRL + Space, you’ll see all available options for GPIO.  

友荐云推荐




上一篇:YesBoss is back with the launch of B2B chatbot platform Kata.ai
下一篇:How to transfer your iCloud calendar to Android
酷辣虫提示酷辣虫禁止发表任何与中华人民共和国法律有抵触的内容!所有内容由用户发布,并不代表酷辣虫的观点,酷辣虫无法对用户发布内容真实性提供任何的保证,请自行验证并承担风险与后果。如您有版权、违规等问题,请通过"联系我们"或"违规举报"告知我们处理。

photoanke 发表于 2016-10-15 03:05:33
远看是美景,近看想报警。
回复 支持 反对

使用道具 举报

梅花音 发表于 2016-10-15 03:06:28
看了这么多帖子,第一次看看到这么有内涵的!
回复 支持 反对

使用道具 举报

liluo1991 发表于 2016-10-15 03:22:22
胆子不小啊,居然让我抢到了沙发!
回复 支持 反对

使用道具 举报

逃上岸的鱼 发表于 2016-10-15 03:28:34
帮不上什么忙,把帖子顶上去吧!
回复 支持 反对

使用道具 举报

惜海 发表于 2016-10-15 03:36:27
雨下╰っ拥吻加油,看好你哦!
回复 支持 反对

使用道具 举报

tmddl 发表于 2016-10-15 03:36:33
以后就跟雨下╰っ拥吻混了!
回复 支持 反对

使用道具 举报

邓妮 发表于 2016-10-15 03:36:34
是爷们的娘们的都帮顶!大力支持
回复 支持 反对

使用道具 举报

邓晓凡 发表于 2016-10-15 03:36:38
内练一口气,外练一口屁。  
回复 支持 反对

使用道具 举报

喷喷喷 发表于 2016-10-15 03:52:21
叮铃叮铃,楼主开门,我是送快递的!
回复 支持 反对

使用道具 举报

*滑动验证:
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

我要投稿

推荐阅读

扫码访问 @iTTTTT瑞翔 的微博
回页顶回复上一篇下一篇回列表手机版
手机版/CoLaBug.com ( 粤ICP备05003221号 | 文网文[2010]257号 )|网站地图 酷辣虫

© 2001-2016 Comsenz Inc. Design: Dean. DiscuzFans.

返回顶部 返回列表