Exploring the TMS320F28379D Board
Lecture: 1: This video gives brief introduction to TMS320F28379D Board and its architecture.
Estimated read time: 1:20
Summary
In this introductory lecture by DSP Coding, learners delve into the architecture and features of the TMS320F28379D board, a part of the Texas Instruments C2000 series. The microcontroller is praised for its versatility in diverse applications, ranging from electric vehicles to industrial motor controls. It offers robust real-time capabilities, dual-core support, and a suite of peripherals that enhance its utility. Attendees are guided through specific hardware components and configurations, necessary to fully harness this board's potential for various automatic applications.
Highlights
- The board is ubiquitous where microcontrollers need robust and flexible solutions, ideal for automotive applications, industrial drives, and more. 🚙
- It features a dual-core 32-bit processor with a 200 MHz clock frequency, crucial for handling complex tasks efficiently. 🎯
- GPIO pins can be flexibly assigned as input or output, enhancing the board's adaptability. 🖱️
- The microcontroller supports several communication and peripheral protocols, expanding its resourcefulness in applications. 📡
- Addressing common programming challenges, the lecture ensures learners understand both theoretical and practical aspects of using the board. 📘
Key Takeaways
- The TMS320F28379D microcontroller board is highly versatile, making it ideal for applications like electric vehicles and motor control! 🚗
- Its dual-core processor supports parallel operations, improving processing efficiency. 🤖
- Key peripherals such as epwm and equip modules provide extensive control over electronic functions. 🔧
- Understanding GPIO pins is crucial for utilizing the board's full potential. 🎛️
- This lecture stresses the importance of knowing how to configure and program the microcontroller for real-world applications. 🖥️
Overview
Dive into the world of Texas Instruments' TMS320F28379D board—a marvel in microcontroller technology. This engaging lecture introduces its powerful architecture and bountiful features that make it the go-to for automatic and electronic applications, from powering your electric vehicles to sophisticated industrial motor drives. The board, with its dual-core efficiency, seamlessly integrates into a myriad of systems, ensuring robust performance.
Learners are taken on a detailed journey through the board’s components, each serving a pivotal role in its operation. With a focus on real-time applications, the lecture highlights the dual-core capabilities and peripherals like epwm and equip modules that collectively enhance the board's functionality. The emphasis is on understanding these components to unleash the board’s full capacity in projects.
Pragmatism meets theory in this lecture as students learn about setting up the physical hardware, configuring GPIO pins, and programming efficiently with the board’s architecture. This foundation paves the way for tackling real-world challenges, offering insights into optimizing coding strategies and understanding the onboard workings for more effective application deployment.
Chapters
- 00:00 - 00:30: Introduction to TMS320F28379D Board This chapter introduces the TMS320F28379D board, a microcontroller from the C2000 series. Although the board has been ordered and is yet to arrive, the chapter gives an overview of its applications. The TMS320F28379D board is a versatile microcontroller used in various automatic applications, including electric vehicles and robotic systems, and is integral to technologies ranging from cars to batteries.
- 00:30 - 01:00: Overview and Applications of TMS320F28379D The chapter titled 'Overview and Applications of TMS320F28379D' highlights the widespread use and significance of the TMS320F28379D microcontroller across various modern devices, including vehicles, TVs, washing machines, and electric bikes. The microcontroller's appeal lies in its capability to have a separate core CPU, which efficiently manages different equipment, making it highly sought after for learning and application in numerous fields.
- 01:00 - 01:30: Clock Signal and Device Functionality The chapter titled 'Clock Signal and Device Functionality' discusses the fundamental concept that many things in the world operate based on clock pulses, which are signals that alternate between high and low states. This chapter explains how devices rely on these clock signals for operation, explicitly stating that a high clock signal activates the device, whereas a low clock signal deactivates it. Furthermore, the specific example of a device operating at a clock frequency of 200 megahertz is given to illustrate this principle.
- 01:30 - 02:00: Dual-core Processor and Data Transmission The chapter discusses the dual-core processor featured on a board, focusing on its oscillators and clock pulses. It explains the concept of a 32-bit processor by comparing it to a road with 32 lanes, implying the efficiency and parallel data processing capabilities inherent in such a system. The processor has two CPUs, each providing robust data handling capabilities.
- 02:00 - 02:30: Microcontroller Pins and Connectors The chapter "Microcontroller Pins and Connectors" explains the data transmission capabilities of a microcontroller. It describes how a microcontroller can handle integer data transmission from 0 up to 2^32 for unsigned integers and from -2^32 to 2^32 for signed integers. This transmission occurs in one clock cycle, highlighting the capacity of a 32-bit microcontroller. Furthermore, the chapter mentions the dual-core CPU, suggesting advanced processing capabilities.
- 02:30 - 03:00: Architecture and Power Supply The chapter discusses the flexibility in operating modes available in the architecture of a specific microcontroller. It highlights that CPU 1, CPU 2, or both can be used independently or concurrently, leveraging different components such as timers, programmers, databases, and registers. Additionally, the chapter introduces another processor within the microcontroller known as the control law accelerator, suggesting that it will further explore the utilization of these processors.
- 03:00 - 03:30: Peripherals and Coding Overview An introduction to the usage of microcontroller 'pins' and banana connectors. Emphasizes parallel usage and integration of wires with connectors. Mentions 20 sets of pins (J1, J2, J3, etc.), and hints that further exploration of these topics will occur if time permits.
- 03:30 - 04:00: General Purpose Input Output (GPIO) This chapter provides an explanation of General Purpose Input Output (GPIO) pins using a practical demonstration with connectors. It describes how to use male to female connectors to interact with GPIO pins labeled j1, j2, j3, and so on. The GPIO pins are emphasized as being versatile for both input and output purposes, serving a variety of functions in electronic projects.
- 04:00 - 04:30: GPIO Functionality and Multiplexing The chapter discusses the GPIO (General-Purpose Input/Output) functionality and how it can be configured as input or output. It emphasizes understanding the processor's architecture to determine the useful pins for specific needs. The chapter also touches upon the use of banana connectors, explaining the connections between male and female parts and how they can be linked to pointed pins for various configurations and uses.
- 04:30 - 05:00: GPIO Ports and Coding The chapter discusses the GPIO (General Purpose Input/Output) ports on a board and how they can be connected using different types of connectors. It explains that the board has corresponding pins on both the front and back, and pin numbers such as j1, j2, etc., are labeled on the side. There are eight sets of these pins, and the transcript highlights how these connections can be made using male connectors and oscilloscope tools for testing.
- 05:00 - 05:30: Programming Logic for Microcontroller The chapter titled 'Programming Logic for Microcontroller' introduces the basic layout and usage of a microcontroller board. It details the configuration of pins on each side of the board, explaining that each pin is numbered both on the front and back of the board for user convenience. The chapter also explains the purpose of these numbers and introduces the XTS 100 version 2, which is described as a JTAG emulation cable crucial for interfacing with the board. Overall, this chapter provides an overview of the board's functionalities and its user-friendly design.
- 05:30 - 06:00: Understanding Pin and Port Selection This chapter focuses on understanding the pin and port selection necessary for powering devices such as phones. It explains that processors operate independently of specific systems and emphasizes the importance of compatible power supplies, specifically highlighting the need for an external five-volt supply for powering up a board. The chapter hints at the independent operation of CPUs and the irrelevance of system dependencies in this context.
- 06:00 - 06:30: Conclusion and Q&A This chapter discusses the operational independence of certain microcontrollers, specifically the use of extension boards to supply power and eliminate the need for constant connection to a laptop. Once the code is programmed into the microcontroller's flash, it can operate autonomously across various applications, including electric vehicles. This ability showcases the versatility and utility of microcontrollers in diverse technological implementations.
Lecture: 1: This video gives brief introduction to TMS320F28379D Board and its architecture. Transcription
- 00:00 - 00:30 this is the board that we are going to learn about it is a c 2000 series board basically we have ordered some board and it is yet to come but when it will come we can have actual overlook of it so it's something looks like this so it is a tms 320 f283790 board so this c2000 microcontroller can be used for different purposes it is everywhere actually whenever there is microcontroller uh it can be used for any automatic application such as electric vehicle robotic application ranging from your cars to your batteries
- 00:30 - 01:00 from your vehicles to your tvs and from your automatic washing machines to like you know electric bikes and everything it is everywhere so why this microcontroller is so much in use and why we are you know so much eager to learn about this microcontroller is that one of the biggest advantage of this microcontroller is that it can have a separate core cpu which is used for handling of your different equipment
- 01:00 - 01:30 such as everything as you know in this world work on a clock pulse like if you have something to go on you must be aware about any pulse signal that we usually see it is a step signal high and low signal so everything that works on this world is basically depends on clock so whenever you give any high clock signal it will be on whenever it will be low clock signal it will be off so this is the same kind of device which works on a particular clock okay so the clock frequency of this particular board is 200 megahertz so the
- 01:30 - 02:00 front view of this board is somewhat look like this you can see these are the some this is one oscillator over here this is another oscillator over here so this oscillator is used for providing the clock pulses to your particular microcontroller ic so this is a dual core processor which is having cpu 1 and cpu 2 which are of actually 32 bit so it what 32 bit means you can imagine it as like a 32 lanes in a road where actually 32 vehicles can pass at a time so what
- 02:00 - 02:30 it it actually does is let's say you want to transmit for one clock cycle you want to transmit certain amount of data into a microcontroller so it can transmit from 0 to 2 to the power 32 for any unsigned integer bit and there is one thing called as sign so all these are signed signed for that means you can range it from negative 2 to the power 32 to positive 2 to the power 32 so this much of the integer data can pass in one clock cycle that is the meaning of one particular 32-bit microcontroller so this dual core cpu it
- 02:30 - 03:00 can actually operate using cpu one either cpu 1 or cpu 2 or both cpu 1 and cpu 2 you can use there are different uh actually all the timers programmers database and registers everything is different for both the course so you can independently use them or you can concurrently use them together as well there is one more processor which is known as control law accelerator in this particular microcontroller we will see the use of all these processors how we can actually
- 03:00 - 03:30 use them and what is how you can use them parallely as well with time permits we'll look into that as well okay so uh so this is a this is a basically microcontroller that we are going to learn about so you can see here key there are actually 20 20 set of pins like j1 j2 j3 for this pointed knock if you can see it is the same pins which are there on the back side as well and i have shown here some banana connectors these are used for integrating your uh this wires whatever
- 03:30 - 04:00 banana wires you are seeing from the back side these are male to female connectors i have given you so this female connectors you can insert into this particular black holes and then if you have a male connector on the other side you can connect it to the scope as well so what these pins are these pins are named as j1 j2 j3 j4 j5 j6 j7 and j8 so these are the certain connectors these connectors are what are what these pins are actually these are pins are gpio pins that is general purpose input output
- 04:00 - 04:30 you can set it this pin as an input output how we can set all these pins we look into it for now we just have to see how the architecture of this processor is and what are the useful pins for you know our use so this was the overall look of this and this banana connector this can be male to female if it is female to female what you can do is if it is female 2 what you can do is you can insert into this pointed pins are there in this pointed pins you can insert your female part of banana connector and this male part of banana connector you can connect it to the
- 04:30 - 05:00 oscilloscope now when you have this other portion black portion these are for connecting your pointed pins from male connectors and if you have male to male connectors you can connect it to the scope so whatever pins are there on this side of the board same pins are there on the back side of the board as well and you can see there are certain things written on the side of this board these are actually the pin numbers like j1 j2 j3 j4 so these are the eight sets like one two three four five six seven eight eight sets are there and you can
- 05:00 - 05:30 see 10 sides 10 pins on one side 10 pins on other side so every pin has certain number which is written on the back side of this board it is also written on the front side which pin number is there so that it is should it should be user friendly that was the main photo of this so this is the overall board overview that we have here okay and you can see over here this is there is one xts 100 version 2 something is written on this front of this board this is actually your jtag emulation cable which actually the range of this cable
- 05:30 - 06:00 what cable you are going to connect in order to power up this phone see basically every processor works independent of your uh your pc system okay it has its own cpu so it is not related to your system like what software will you know will support what kind of processor will support it should be 32-bit or 64-bit okay that that won't be dependent on all this kind of thing okay so this pi this board just need external five volt supply in order to power it up once this board is powered
- 06:00 - 06:30 up it can actually operate on its own so there are certain extension boards provided in order to give that five volt supply so that you don't need to connect it to the laptop every time then you can just if you burn your code into flash once you can actually use it later without you know without you know repeating the code on the same time or you don't need software in that cases so you just have to burn your code onto this particular microcontroller and it is good to go it is like that that's why it is used everywhere such as electric vehicles and everything whatever the applications as
- 06:30 - 07:00 i told before so this was the board overview now uh so this texas instrument has provided you know lots of materials on this particular board but everything is little bit ambiguous like little bit ambiguities were there when you're going to learn this book certain formulas will not work properly certain uh you know registers will not work properly so how to program them actually that is a big deal so we are going to learn everything in this course from you know top to the bottom what is exactly into this
- 07:00 - 07:30 particular board how we are going to code it okay so this particular board has provided with different set of peripherals okay different set of peripherals in the sense you can see it as epwm peripheral it has equipped peripheral it has eca peripheral so these are all provided for users helping in the way in the way you can say that let's say you want to generate some pulse so for that you can use epwm peripheral let's say you want to detect the position of the motor particle if motor is running certain encoder is bounded on the shaft of that rotor and
- 07:30 - 08:00 you want to see what is the position of that particular rotor so that you can perform your mathematical computation inside so that one is given through equip module enhanced quadrature encoder pulse module so if we get some time we'll also look into little bit of this peripherals how they are going to work what is exactly actually ti will provide you each and every algorithm for this but you should be able to know how that algorithm is working then only you can make changes into that algorithm otherwise it becomes very difficult and tedious to learn this
- 08:00 - 08:30 particular microcontroller like uh first of all uh into this course what we will see is little bit about c background as well like you need to know about functions little bit about pointers how functions work little bit about pointers generally when we are using this particular microcontroller for coding there are two types of coding available in this microcontroller one is driver library and another one is bit filled so we are going to use the approach of bit field since it is easy because every register you can you know program it bit wise and you can see what will happen if
- 08:30 - 09:00 you change into that particular bit okay so that was about the coding part that we'll see into the that will look into the later so first of all what we have to see is this is the board and there are different peripherals pins and all the pins are gpio pins you need to remember just one thing in all this uh all this board that whatever pin you are going to use it's a gpio gpio stands for general purpose input output okay so you can use that pin as an input as well and you can use that
- 09:00 - 09:30 pin as an output angle what actually that means that we will see in the later slides okay so i guess this is clear to everybody is it clear yes yeah so you can speak in between as well if you have any doubts you can add ask me concurrently because in that way you know if i also lag somewhere i can able to you know look into it and let you know so this is like that okay next this is the launch pad that we are going to see
- 09:30 - 10:00 so everything is written over here so you can see from here that uh there is a five volt connection there is a ground connection this is for overall board it is integrated into the every uh part of your microcontroller whatever five volt and ground connection is required then you have your usb connection this resimulation or uart from which you connect your board into your particular software or ide that whatever you say so xds 100 version 2 is a cable that you are going to use emulation cable after that you have a
- 10:00 - 10:30 connector so as i told you before it is j1 j3 j2 j4 j6 j8 g5 and j7 so you don't need to remember all these things okay it is there on the board itself give what kind of pin it is and how it is useful for you that we are going to see in the today's session that which board is uh used for what particular purpose and how you are going to configure that particular thing okay from this side you can see as i told you before this is the main ic
- 10:30 - 11:00 tms 328 328-3790 and this is oscillator which is used for providing clock pulses the maximum clock frequency that this board is going to work on is 200 megahertz okay so 200 megahertz clock frequency in the sense what what exactly that means so that means that 1 upon 200 omega that much of the time period will be there for that particular pulse so that small time period you can pass 2 to the power 32 um integer of data at a time so you can imagine how fast that particular
- 11:00 - 11:30 microcontroller is okay so that is the meaning of that particular thing then you have your j21 connector which is adc connector as you all know adc pins are basically just analog to digital converter what it does is it takes your analog signal and when you put it into the board you can sample it into different you know different samples and you can see if you want to perform certain other tasks on that particular data that you can do it is shown here differential input there is one single indeed input and differential input differential input means if your signal
- 11:30 - 12:00 is on high potential and low potential if two different potential are there and you have to insert that signal then you can use this particular connector otherwise what exactly is there is you just have a single ended input in which your signal will be at five volt plus and zero volt ground in that case what you can do is you can insert directly into the inbuilt module of this particular microcontroller okay next thing is this can bus can bus is there in order to provide your connection of two or three microcontrollers together
- 12:00 - 12:30 like if you want to say you let's say there is certain inverter such as multi-level inverter many switches so how we can operate those switches how we can provide pulses to those particular switches if there are 12 in the numbers so those many epwm's will not be sufficient in that way what we can do after that so to solve that particular issue we can connect three or four microcontrollers in parallel so we can use can so can also has a you know one high burst one low balls and then it has certain number of bits which will tell you how you can actually
- 12:30 - 13:00 connect your particular microcontroller to another microcontroller then how you can transfer the data and all those things so that is the use of the scan then you have your qep j14 and j450 so this qvp is a quadrature encoder pulse module as i told you before it is actually based on detecting the you know rising and falling edge of your signal and it will detect the position what actually happens is let's say if your motor is running now that motor is running so what is happening is your shaft is rotating now if you mount any
- 13:00 - 13:30 encoder on that particular shaft it has three outputs output a output b and certain other clock output so what it does is depend on that clock output it detects the rising edge of that particular clock and then it will keep an estimation of that rising edge with the next pulse and that way it will calculate its speed and position and all those things so this is for that particular thing so there are different modules in this particular launchpad so this is actually one more thing is there there is certain
- 13:30 - 14:00 reset button is provided s3 on this microcontroller this reset button let's say your microcontroller is hanged or something so it's just like a turn on to turn off switch of your tv you have you can press it on and off in order to make your algorithm you know but make your microcontroller into the reset mode so it will be in reset and it will start as a as in a refresh mode okay so this was the overall about this launch pad anybody has any doubt sir can is basically a communication
- 14:00 - 14:30 protocol right yeah yeah it's a kind of communication protocol and sir like previously i've worked with 8-bit microcontrollers so over there uh they usually have rxt experience so that can is basically a advanced communication yes absolutely yes yes yes yes so if anybody else has any doubt they can ask me one more thing i forgot to tell is about this gpio you can see here
- 14:30 - 15:00 there are three pins over d1 d9 and d10 so one is the power led green led gpio 34 is a red led and gpio 31 is a blue led so these two leds are given let's say you want to you know make a code for like like when you learn any new microcontroller what you do is you see first led blinking code so for that purpose if you want to use any particular gpio so this particular two gpios are actually uh you know inbuilt
- 15:00 - 15:30 for that particular purpose and it is integrated in order to have that particular approach so that if you want to toggle one led and you can just you can see what x exactly is happening in particular microcontroller so d9 and d10 is used for that particular thing and d1 is a power led which is a green led once you turn on your microcontroller this leds will start blinking so you can see keep as i told you before there is everything in this microcontroller is a gpio that is general purpose input output so this speed is also a gpio pin like it is
- 15:30 - 16:00 actually a output pin since it is an led so when you assign any pin as a output what it will do is it will give you a output like like it will start blinking in a red color it will start blinking in a blue color so what does that exactly means is on that particular pin you are setting it as an output using certain resistor and then that pin is blinking red or green or blue whatever that pin is you know assigned for okay so this is particular board over which you need to know in
- 16:00 - 16:30 order to program this particular microcontroller okay so this is little bit theory i'm sorry for the presentation i didn't want to waste much of the time on to this thing so what actually this microcontroller as i told you before it can be used in any real-time application industrial motor drives solar inverters digital power sensing and signal precision so everywhere you can use it and it is a 32-bit floating point processor okay it has advanced tmu okay so you can use it for certain complex mathematical
- 16:30 - 17:00 calculations as well then there are certain set of cohesive softwares that is provided by this ti such as you know software development kit motor control software development kit now they are integrating more into this like there is one thing called a clb which is a configuration configurable logical block peripheral what this peripheral actually do is you must have heard about there is one other microcontroller that advanced microcontrollers are used for certain purposes such as let's say you want to
- 17:00 - 17:30 generate a hand or signal so that also you can do in this particular microcontroller with the help of clb module so if time permits will look into that as well so this is all about this particular microcontroller so so as i told you before it works on the clock frequency of 200 megahertz and it has a tmu unit it has a vco unit and whenever you want to perform any complex
- 17:30 - 18:00 math operations you have certain uh other uh accessible uh things as well so we'll look into that one by one how we can actually do this the theory is just to you know have an overview to you see what actually you can do on this on to this particular microcontroller but whatever we're going to see we are going to see it with particular example how we are going to have that particular thing into this particular software that we are going to see okay so you don't have to worry about theory and all you just have to understand how you can program
- 18:00 - 18:30 this microcontroller okay and little bit meaning of this things what exactly this means so this is a dual core architecture as i told you before 200 megahertz unit you have a trigonometric math unit floating point you need generally these microcontrollers are floating point based in order to perform your complex maths so that you can convert fixed point algorithms into floating point floating prone processors a little bit less cost so it is used for that purposes then you have control lock cell accelerators which is which works
- 18:30 - 19:00 independently of this particular microcontroller then you have epwm as well so it has 24 pwm channel then you have hr pwm which are used for you know high resolution pulses generally what happens is when you start increasing your pwm frequency so if it is increase from certain hertz to let's say certain megahertz what exactly happens is key your clock signal or your pulse signal will become a little bit uh a little bit
- 19:00 - 19:30 overshoot will be there if you are trying to operate it on 200 megahertz frequency so in order to avoid that overshoot and make your signal little bit clearer you use this hr pwm it provides you 120 pico set pico seconds of step resolution what does that means in 120 pico second it will rise to that one particular high level it means that so this hr pwm will give you let's say you are working in power quality or something and you don't want glitches in your pulses and you are also working at a you know very high frequency so in
- 19:30 - 20:00 that case what you can do is you can use this hr pwm module then as you know in this epw module there are many things that you can use you know there is one deadband support like let's say you have two pwm signal for high and low switch so you know the use of that whenever there is certain you know let's say clapping of these two pulses what will happen is your microcontroller your particular dc bus will get shorted so in order to avoid that what we do is since turn off of igbt is longer so we provide
- 20:00 - 20:30 that particular you know deadband of time what happens in that particular time is you will have uh you will have certain time in order to turn the next switch on so it so to provide that dead band you can use this particular module as well then there are certain like pwm chopper is also there like if there is a high frequency pulse and there is a low frequency pulse one is 50 hertz and another one is one or two megahertz and let's say you want to chop your 50 hertz waveform into particular small switch setups on and
- 20:30 - 21:00 off waveform so what you can do is you can multiply these two with pwm chopper and you can chop your particular waveform so all these we are going to see one by one key what module is there how you are going to use this particular module and what exactly that means okay so then you have adc's as i told before then adc's are into two modes one is 16-bit mode another one is 12-bit mode so how much data you can pass in one clock cycle that is 1.1 mega samples per second 3.5 mega samples per second so
- 21:00 - 21:30 these are the sample unit you know you can sample this minimum let's say you have a 16 bit of a dc you have a 12 bit of adc what does that mean let's say you have a 10 volt of signal so what you can do is 2 to the power 12 will be 4096. so for any 12 bit adc then you can use this 10 volt into you know your 2 to the power 12 into 1 divided by 4 0 9 6. so those many of time stamps will be there in each particular sample when you are going for adc so that also will look into detail then you have sample and hold circuit for each adc like single separate so what is use of that that
- 21:30 - 22:00 also we are going to see then there is certain ppv block like post uh processing blocks after adc conversion let's say you want to store your adc data into certain registers so you can use this ppp as well there are certain algorithms which actually does this zero time detection like it say let's say you want to detect the zero crossing capture that is also possible in this microcontroller so it has provided with you a lot of features like in a less time you can perform any computation for your research if you want to develop any algorithm and if you have knowledge of
- 22:00 - 22:30 this particular microcontroller what you can do is you can just make your one algorithm and you know you can make your particular system into uh into existence whatever you are imagining to happen so whatever you imagine you can particularly think to implement onto this particular board then there are certain dacs are there dags are used for you know like whatever signal you are taking inside of your board if you want to output that signal you can use that so in that that you can see particularly what secular you are giving into the
- 22:30 - 23:00 boat is it the same signal that you are seeing outside the board so you can use that for that particular purpose okay so it is about the features of microcontroller that we are going to look into so uh this i'll tell you now what is exactly this means okay but before going into this okay so till now does anybody have any doubt in
- 23:00 - 23:30 understanding features of the microcontroller uh sir yeah uh sir as you mentioned that uh maximum clock frequency is 200 megahertz like the frequency that can be generated at the pwm that differs right from the cloud yes yes yes yes it differs it differs like you cannot generate a lit c for you cannot generate a particular pwm
- 23:30 - 24:00 of 200 megahertz there are certain limitations you can go up to certain frequency like 50 megahertz 60 megahertz but what will happen is let's say microcontroller architecture is basically consists of many peripherals right epwm is there ecap is there equip is there so this clock frequency at every stage is divided by a inbuilt clock divider okay let's say your particular epwm module is there which is used for generating pulses so this particular epw
- 24:00 - 24:30 module it is works on maximum 100 megahertz of clock frequency it means that you can use it up to 100 megahertz but not exactly you can produce a pulse of 100 megahertz because every ppwm module is at 100 megahertz but when you are going to generate the pulses there will be lots of noise in that particular pulses and it will be distorted so whenever you you're going to use it above 50 megahertz you will see those problem arising so so the basic we'll see what is the
- 24:30 - 25:00 limit when you will see exactly formula now how it is the formula for generating this equilm pulses at that time you will understand what is this clock divider and uh what is you know uh the there are actually certain sub modules also this into this epw that we are going to see as i told you dead band is there pwm chopper is there then there is one called time based sub module in that time based sub module certain counters are there so how that counters are going to perform so that time base counter also has its own clock so it is limited to 50 megahertz that's why your maximum
- 25:00 - 25:30 clock can go up to 50 megahertz or less than that so it is all like that so all sub modules work on certain clock dividers let's see there are certain plls phase lock loops which are used as a clock dividers see when you are using main microcontroller at 200 megahertz not all peripherals are able to work at that clock frequency because when you are processing any instruction you want to be process it at a very higher speed but let us say you want to generate some pulse in that way what will happen is there is not only one work of this
- 25:30 - 26:00 microcontroller to generate the pulse right it has to enable interrupt it has to disable interrupt it has to come in instruction wise to execute that particular instruction so what exactly happens is there are certain limitations of that particular sub modules like in this module for generating any triangular wave we use time based module so that time based sub module is limited to 50 megahertz clock so in that way you cannot generate a pulse of 200 megahertz is it clear okay sir
- 26:00 - 26:30 yeah any more doubts see you're welcome to ask any doubt okay because if i don't know about it you know i will look into it i will get more knowledge to you and then i can transfer that knowledge to you okay so whatever doubts you have you can ask me at any point of time okay
- 26:30 - 27:00 so okay so this is f283n790 board overview now we'll see what exactly your you know particular gpio is so your general purpose input output module so as you can see in this particular module there are two muxes gpe 1 gp max 2 so why we are using this muxes so let's understand it you know clearly what exactly this figure means what this qualification is
- 27:00 - 27:30 what this pull down register is what data register is okay and what these peripherals are okay so i will start with the peripherals this particular peripheral peripheral one peripheral two and peripheral three okay these are epwm equip or other peripherals as i told you every pin on this microcontroller is particularly a gpio pin general purpose input output okay so every pin can be connected to certain peripheral peripheral one you want to connect ppwm if you want to operate any pin as a
- 27:30 - 28:00 epwmpen you connect it to the peripheral body if you want to operate that pin as a equipment you connect to peripheral too if you want to operate that pin as a let's say adc pin you connect it to peripheral three so these are certain peripherals so it is not particularly of f283790 it is of certain other good but in order to simplify the diagram and to tell you exactly how this operation happens i have taken this screenshot so you can see here there is one data register it has three bits one is set
- 28:00 - 28:30 bit another one is clear bit and another one is toggle bit so set clear and toggle what does that mean is this gpio data register is one particular data register in this these particular three bits are over there like if you want to set one particular register if you want to put some value like one or zero you can use this set clear means if you there is certain data into this particular gpio pin and you don't want that data to be there you can use clear pin then there is one toggle pin like let's say you want to toggle that
- 28:30 - 29:00 particular pin one zero one zero like we saw toggling of any led so this registers actually provide you the direct access of that data register generally it is not preferred to use this because what we are going to program is to these two particular muxes gpi mux1 mux2 and by using direction resistor itself you can use that pin as a input pin and output but let's say you want to toggle any led directly so what you can do you cannot either it assign it as a input or output you want to toggle it so what you will do is you will use gpio toggle resistor so these
- 29:00 - 29:30 are two registers which you can program through so mux1 and mux2 qualification is basically in order to set your quality of your gpio signal let's see if any gpio signal is generating particular uh you know time stack for let's say let's in hr pwm we have 120 pico second of timestamp like in 120 picosecond that signal can rise from zero level to higher level so in order to mention maintain the clarity of that signal how much glitches should be there that is also adjustable to this qualifier
- 29:30 - 30:00 selection so you can use this qualifier selection for that particular but generally the qualifier selection are not advised to touch they are there and they are inbuilt on their best performance so you are not advised to do any modification into that then you have pull up and pull down registers let's say any gpio is at a high potential you want to pull it up at a low potential in order to you know enable it or disable it so particularly you can use pull up and pull down resistors let's say there is certain pin at a vcc but you don't want that particular pin to be high when it is not
- 30:00 - 30:30 in use so what you do is you use a pull down register in order to ground that particular input so that no other harm will be there so this high pull up pull up or pull down resistors is connected in between in order to limit your current to that particular microcontroller so that your particular microcontroller will not damage due to any short circuit if also it happens okay generally it is a very sensitive microcontroller it also like even if you touch with your bare hands as well to this particular pins there might be static discharge and that pin might not
- 30:30 - 31:00 also work so you are not advised to touch any of the peripheral on this microcontroller delay you are going to use it you have to hold it in such a way that it should not be touching your palm as well okay so it is like that so you can see here when you assign 0 0 into particular gpio it will work as a general purpose input output when you assign 0 1 it will work as a peripheral one when you assign 1 0 it will work as a peripheral do and when you assign 1 1 it will work as a peripheral so these are the multiplexer control bits so according to this
- 31:00 - 31:30 particular bits you can use it now what is actually divided like like like what multiplexer exactly we are going to access which pin okay that will see now so this will give you a clear view of gpio and peripheral maxi so is this picture clear to everybody hello is this picture clear to everybody okay
- 31:30 - 32:00 if you do not understand something you have to ask me okay so i'll explain first after that you can ask me so you can see here there are two boxes basically one is gmax and one is normal mux so this gmax and normal mux what exactly tells you that when your gmax is particularly zero zero bit okay it is assigned to zero zero bit and your normal mux is assigned to zero zero zero one one zero or one one it will have access to this particular feature you know let's say your particular gmax is
- 32:00 - 32:30 at zero zero and now you are using normal marks as zero zero so what it means is your pins are all gpio all gpa opens means you can use it as an led to output a pulse in you can you know you can use it as input in order to put into a data certain data into that particular or let's say let's say let's talk about this only equip what what we do in equip is we take outside signal pulse signal into the board so in that way in that one what we can do is we can use direction
- 32:30 - 33:00 resistor as zero and then we can use that particular pin as an input pin then what will happen is whatever your signal from outside that will go into that particular mode so you that will be a general purpose speed which is used as a input so we'll see how exactly that happens okay after that normal marks if you set at 0 1 then that particular pin will be working as a pwm 1a 1b 2a 2b 3a 3b 4a 4b and so on so there are
- 33:00 - 33:30 certain this pins are only allocated to use as a gpio pin whether it is it can be used as a epwmpel it can be used as an output crossbar what this crossbar is also that also will see okay so so you can use this particular mux you know in order to configure your pin as a pwm pin gpio pin and so on you can see here i'll show you the resistor as well so see this is a normal resistor a mux and this is a you can see the name of
- 33:30 - 34:00 this particular register it is gpa max1 and the other name resistor is gpa gmax1 so this a normal mux and gmax these are the two index that you select any pin as you can see in this configuration okay this data is available in the technical reference manual i'll share it with you so you can see this gmax so in this gmax if you put certain data it will work on that particular you know allocated peripherals if you put it as 0 1 it will work on that particular
- 34:00 - 34:30 peripheral so there are certain limitations also that we need to understand you can see here so i'll tell you how exactly you know which pin you can select and what exactly this means so see from this one you can see that your gpio module it controls your you know input output multiplexing sharing and as well all those kind of operation that we saw so you can see that gpio it is actually can be used with cpu one cpu one plus cla cpu to cpu
- 34:30 - 35:00 to plus cla cla is a controlled oscillator as i told you before it can work in parallel with your cpu as well let's say your cpu is performing any task then at the same time you can allocate certain tasks to cla as well but the coding of cla is an assembly language so it will little bit complex in order to understand but it has a direct direct access to those peripherals or register so it increases your speed so that is the main purpose of this cla if you
- 35:00 - 35:30 don't want any interrupt latency and you want to work at a very high frequency and you don't want any interrupt to come in between so you can use cla for that purpose okay so we'll see if time permits will see that as well how we can work with that so you can see there are six port port a port b port c port d4t and port f so this f ports are there and every port is divided into 31 pins it doesn't mean that this particular microcontroller has access to 168 pins no it is not like that there are only 80
- 35:30 - 36:00 set options from which there are certain pins which are allocated to certain peripherals which you can use as gpio epwm or anything if you want to use all the pins then you need to buy certain another you know extensive set of this microcontroller which actually uh called as an evaluation kit which actually allows you to use this particular all the pins so that these pins are not actually like you need all those pins it is not like that when you want to buy certain evaluation kit instead of that people preferring you know
- 36:00 - 36:30 concurrent and parallel operation of those microcontrollers so that you can have access to more number of pins okay so you can see here your port a will be consisting of 31 pins gpio 0 to gpio 31 now this port a will be itself divided into mux 1 and max 2 and max 1 will have 15 pins and mux 2 will have another 15 pins like let's say 0 to 15 will be for max 1 of 14 and 16 to 31 will be for max 2 of the same port like
- 36:30 - 37:00 40 then you have port v so 32 to next 15 will be for max 1 and after that 263 will be for mux2 so it is not like uh so every marks like gp a max and gpg max you can see from here it is divided into mux1 and it will be also there there will be certain another register which will be max2 as well so it belongs to port a so port a mux1 means what pins will be there gpio0 to gpio50
- 37:00 - 37:30 understood similarly for gmax you can see so this gpa a means it will be having access from 0 to 15 why 0 to 15 only because 1 is there so a will be having 0 to 31 but 1 will be having access to 0 to 50. so whenever there is combination of this a and mux 1 you will have access to gpio 0 to 50. so you can see here from this register if you particularly there are 31 bits so you can program into this particular bit if you put 0 0 you know this particular bit
- 37:30 - 38:00 will get activated so we'll see when we'll see any software running we'll see how you can actually you know model this gpio as an input model this gpi as particular output okay and now we can use it for toggling led as well that also we can see okay so this is about the gpio so from here you can see this is a gpio logic for single pin so what you can understand from this particular gpio is
- 38:00 - 38:30 see on the right most side there are certain peripherals which are connected it means that this particular gpio can be used for any other peripheral then you have input crossbar input crossbar means let's say you want to you know get your signal into the board from the board itself then you can use this input crossbar like only transferring of the signal inside the board then these cross bars are used then you have certain qualifier selection resistor you have a system clock to operate that particular
- 38:30 - 39:00 you know gpio pin then you have a data register in which you can directly access and you can directly put your data into that particular gpio pin however it is not advised to use your data register directly okay we'll see why it is like that okay then you have i told you before it can be used on cpu 1 cpu 2 cpu 2 plus cla cpu 1 plus cla set clear and toggle bits are over here then certain peripherals are also here which you can transmit your data directly to then you have a direction resistor over here what
- 39:00 - 39:30 width direction resistor you can do you can assign that pin as a input or output so that is only you need to understand to this particular microcontroller logic diagram okay so and now how we are going to select that particular thing okay so you can see here this board over here is provided with the g1 j3 pin j4 j2 d5 j7 j8 j6 so how this is related to this is actually given in order to access your pin on that particular board
- 39:30 - 40:00 let's say you want to access pin number one from j1 pin so if you assign your mux value as 0 it will be 3.3 volt now you want to access pin number 2 on j1 2. so j1 pin number 2 is your gpio 32 if you assign your marks value as 0 which marks value i'm talking about normal mux not the gmax gmax has to be at 0 0 because from here you can see if gmax is at 0 0 and normal mux is at 0 0 then only i can use it as a gpio otherwise if normal
- 40:00 - 40:30 gmax is 0 0 and normal mux is 0 1 then i can you would use it as a epw so this is the normal marks i'm talking about okay so gmax will be actually cited at the inner end value as zero if you want to change it you can change it as per your interest we'll see how to change it and how to access that particular thing as well how to use that pin as a epwmpe and see that as well so what i wanted to show from this is let's say you want to access pin number three of your j1 so it will be gpio19
- 40:30 - 41:00 so what gpi19 can do you can see from here okay gpio19 okay it is lower bit down over there we'll see another thing let's say let's talk about gpio zero let's say j4 pin number 40 is gpio zero or gpio one which can be used as a epwmp as well so on this particular microcontroller this is j2 and j4 so you want to access pin number four or five okay so here it
- 41:00 - 41:30 will be return pin number one pin number two pin number three pin number four so if you see pin number four okay so what that pin number four indicates on g4 one two three four pin number thirty seven it will in it indicate gpio three so what does that gpio three can do then you have to look it over here that gpa three can be used as a pwm it can be used as output crossbar it can be used as a clb or it can be used as other thing okay so it is like that so if you want to access any pin from your j5 j7
- 41:30 - 42:00 this speed number will be written on the board itself okay you don't have to worry about it 31 32 whatever pin number is there it is written so you can access that particular thing directly as i told you with banana connectors you can connect it is written on the back side as well okay so you can access that pin into particular thing and uh whenever you want to program it as gpio pin you can use it as zero when you want to program it as uwmp you can use it as one so like that you can have access to that particular pin is it clear from what i said
- 42:00 - 42:30 yes sir yes okay so everybody is cleared that how to access that particular pin see it is the integral part if you understand this you can understand coding as well okay so you need to understand how to use that pin if you are accessing that particular pin okay you can use it and you can uh you know code also you can do anything but you need to see into technical reference manually what that particular pin is
- 42:30 - 43:00 used for what purpose okay this is this workshop is not at all like other workshops where you will get theory knowledge and you will understand what no you will understand how to code it and you will have your own exposure of coding after certain you will be able to generate your own algorithms so for that purpose i want you to understand each and every bit of this microcontroller whatever i am going to tell you when you will whenever i will show you code now you will exactly understand what i was saying right now it will be little bit tricky
- 43:00 - 43:30 for you see what this gmax is what this a mux is and why we are using it but you just have to understand that every pin on this microcontroller is a gpio and we can access that pin with mux1 and max 2 understood yes i need any doubts are there how to select these pins how to use this pins is there any doubt okay i'll wait for five minutes you guys
- 43:30 - 44:00 quickly revise through okay so that you can have understanding what exactly this means okay so basically this is about uh pin selection and it's it's mode selection right yeah yeah yeah it is about that you can select any particular pin you can use it for particular purpose but it is necessary because every pin when you need to access you need to understand how to program that particular register okay okay yeah so any further doubts does anybody have
- 44:00 - 44:30 any further doubt everybody understood these ports are there these mini pins are there it is divided into two sections okay it can be used for one particular purpose then then there are certain fields such as adc how to access this pins as adc as well that also will see we have comparators you can use two signals for comparison you can use dac you can use anything whatever you want to use in this particular board you just need to
- 44:30 - 45:00 have have an understanding how you can use that particular pic that's it okay so i'll give one more example if it is not clear let's say you want to access let's say you want to access this j874 pin and it is named as gpio14 okay so you can look into this particular thing and you can see gpio 14 is somewhere over here okay then it can be used as epwm 8a okay but you can see in this one it is
- 45:00 - 45:30 not given as 8a okay so in that way why we are how we can use this is we can set box value as one you can operate that pin as epwm 80. okay it is not like only three pwm modules are there and only six signals you can generate it is not like that maximum up to 10 epw signals you can generate and that will depend on how many pwm models are there and it is given in this gpio and peripheral maxi okay
- 45:30 - 46:00 so that particular j8 pin number 74 would be somewhere here and you can access that particular pin directly with your you know piranha connectors so it is like that and this is one programming logic like see these are the e allow protected register in this microcontroller certain registers are elo protected like if you want to access that particular register you have to write this e allow and edis e allow means allowing
- 46:00 - 46:30 that particular register for accessing edis means disabling okay so you disable with this edis will understand what this particular instruction actually means okay so you can see here this dot you can see in between it is a pointer okay like you can see any pointer in a c language it can be used for accessing the address of that particular bit or that particular register so this dot is used as a pointer here so there is one register which is gpio control resistor in this
- 46:30 - 47:00 particular register there is one other bit which is gpb mux1 and this b mux1 as you can see here b1 b1 means what pin will be there you can see from here see this b code b will consist of pin number 32 to 63 but 1 max number 1 will have 32 plus another 15 that is pin number 47 so 32 to 47 pin number will be accessible by this b mux okay so you can see here pin
- 47:00 - 47:30 number 34. you can you are accessing which bit of this particular mux pin number 34 why only 34 because it has access from this 32 to 63 so whatever pin after 32 and before 47 that will be accessed by your gpb max1 okay like if you are using port c it will be after 63 okay and if you are using mux2 here then what will happen is b mux2 which bt will be have access to you can have access to 47 bit number 47
- 47:30 - 48:00 to boot bit number 63 so gpio 32 you can have access gpio 34 you can have access gpio 35 you can have access and what these panes are gpio 34 gpio 35 these are j4 pins j5 pins j8 pins j6 pins okay you want to access g1 gpio 32 so it means which gpi 32 is pin number two on this particular j1 okay so this j1 board has pin number two so you can use this
- 48:00 - 48:30 particular thing okay after that uh you have a direction resistor now why this direction resistor is given as i told you before i have put a gpio 34 direction resistor bit as one it means this particular gpio 34 it is used as a output if it is zero it is used as an input why it is like that because it is a direction resistor and what output means output means this led will be glowing now you will see output on this particular led okay so you can see from this one
- 48:30 - 49:00 okay gpio34 okay this is a red led okay so when you program this gpio34 it is no more a pin but it is a red led so what will happen is this red led will start glowing for that particular period of time when you are using that particular led as an input or output okay so this is about accessing the bits of particular microcontroller okay certain
- 49:00 - 49:30 registers are ello protected which is there in the data sheet itself in that data sheet which you can see which register is allow protected and which resistor is not so you when you type or when you code into cgs and when you type bit dot automatically all the gpios will be listed over there which is under the uh you know under the under this particular b mux1 category you can easily select one of them and you can code on your own so okay so you don't need to you know remember every time and go and see which gpio is in which marks
- 49:30 - 50:00 so when you are going to type gpb max1 dot bit dot automatically gpio 31 32 33 34 so 32 to 63 bits will come over there similarly in case of gpio direction resistor if you want to access particular bit of this register you can select which pin you want to access and you can use it value as zero or one okay so it can be you know binary as well and it can be you can also put it in decimal as well we'll see how you can actually use it actually this particular
- 50:00 - 50:30 microcontroller has given a location that you can use it decimal values as well in order to particularly program it or more accurately you can use it in binary as well if you put your particular value in binary format this particular register will get program if you put it in decimal format also it will get programmed so it is a ease of is for an user that one can have okay so it is about the using and accessing of this particular register and configuring okay so anybody has any doubt
- 50:30 - 51:00 sir can you go back to that code part yeah yeah sir in this case uh direction register is setting the direction of the pin yes max register should decide the value right so for the led to glow should the value be one or zero okay okay okay cc actually whatever mux you are using here now it is for the initialization okay it is not for setting any value it is for accessing that particular pin when you
- 51:00 - 51:30 are initializing particular b mux1 value means you are using that particular pin as you know as you can you have to access of that particular pin if i put your gpio 15 means i am accessing or i am initializing gpio 15 okay so i can use that gpio 15 as input or output with the use of direction resistor understood sir which of these statements will decide that led is glowing yeah the gpr gpb direction resistor equal to one this particular instruction
- 51:30 - 52:00 will decide that your led is glowing okay okay okay so the direction resistor if you set it as zero it will be input if you set it as one it will be output okay so your led will be glowing with the help of this particular bit for a particular instruction okay so this b max and all it is just for the initialization or accessing of that particular pin let's say if i'm using gpa max1 gpio32 or something i can you know access this gpio32 from here so gpio32 is what so i have to see it from
- 52:00 - 52:30 this chart board overview like what is gpio32 gpio32 is j1 pin number two then i can connect my you know uh particular banana connector to j1 in number 32 somewhere over here and then i can see what is happening on that particular pin understood okay