news videos images websites wiki

Okay this is a chapter six and in this chapter you're going to look at the analog to digital converter module of the pic microcontroller and we look at some. Examples as well and how to actually use the how to program the A to D converter so analog. To digital converter so that current the microcontroller that we are. Using it has got if we can convert an analog signal into 10-feet binary representation so it needs to location to store 8-bit plus another two bits and the conversion results are normally stored in two registers furnace T and low low. Byte is stored in address L and the high byte is stored in a dressage and there are 14 analog input pins available you need to program them so that you can have 14 analog to digital. Converter connections can have they may be operating one at a time or you can select them so you can see a simple 82 block diagram I've drawn here and you've got that's a zero that's actually port a and P a node need to be program so. It's called and it's an A to. D converter to that point and up to en 30 and they are various pins they are not all up 40 and I'm sure in the next slide and then we have got a register by selecting the appropriate bits on the register you can select. The appropriate input to that to the ATD converter so if you select this one for example down if you select out anything you're connecting and signal we go through the air to be converted and for conversion and so there are 14 separate analog inputs the ADC voltage there are reference. Voltages one is the supply voltage VDD and the other one is. The ground voltage other one is reference so you can see in this case there are two position where they are connected and we have a positive reference voltage you can provide that through this through that through that line and then if you put. This bit to one that will be connected so that's the positive reference voltage go-to ATD converter if you want to have the negative voltage also you can connect them through this and through that and this has to be. One then will be connected that way if it is 0 it will be this will be coming to the ground so good you can choose so if you want. To measure voltage differences not just analog. Voltage in digital but you've got two lines coming in you have want to measure the voltage difference you will use this particular arrangement and we have examples to show you so the entity can generate interrupts so you can. Do many ways and you can actually program it one is it can generate interrupts and then you can go when there's an interrupt or the interrupt service routine and read the data from those register or you can polish until the conversion is complete so once you enable the ATD converter. That means enabling mean you put the switch this so software selectable sweetener switches when you selected them you need to give roughly 20 micro second delay for the. System to settle then set up before actually you started with the conversion so we're going to look at this ATD morning is a simplest module where once it's finished that conversion 10 bits will be available and this particular line will go. Low that means saying conversion is complete to start the ATD converter you first enable to connect this. Line and then you set this bit to one when it's finished conversion this godown bit we go low and that means it's converted and then you have you have two ways of reading the data which I come to the next line and the next picture is showing to you and the lower eight bits. Will be here and the remaining two bits will be here providing the ten bits that is called write justification if you go for left justification you will have the the first time is there and the next two bits there so you can have both ways so anyway if. This slide all we are saying that we can program. The ATD converter the way we wanted there are 14 channels available we can pick and choose the channel you want and also you can decide what sort of what this thing you want you can decide and whether you want. To measure just. A single voltage or differences between voltages now we just look at the the address h and address L so a DC output can be stored in two formats one is called left justified right justified so if you set this a DFM bit which I will explain in a minute is there any particular register there and in that. Register the seventh bit is a DFM bit and if you set that bit to one then the result that these two rows alsa right justified that means that lower eight bits will be there the next. Two bits will. Be there if you said this p2m zero if you said this this is left justified that means these are the most eight piece and these are the next two weeks so that's that's called less justify you can decide depends on how you want it and you can go right or left most of the cases we go for right. Justified and if you want to multiply this data by two you can just shift them by one bit in that direction and then it was multiplied by 2 so that's because you will find that there are empty space here so multiplication become easier and if you want to divide them then you should Poway and so you know that. After you take the data you want to multiply or divide so you decide that in advance and then you program it that way and these bits are automatically set to 0. They are not used but they are set 0 so you don't need to do. An end function to make it 0 they will be 0 when you do write justification these bits plus this will be 0 now there are two more bits on that particular register there you need to use this register to. Program after you have selected whether just right or left justified then you need to have you have two more bits to decide what sort of what is you only give so you can see that I've drawn here and this diagram if your reference positive voltage if you. Want that to be connected to to the external world that's here you said that's equal to 1 that means that pin will be connected and it set up a reference voltage for ATD converter if you decided that no that's what that's what you. That you don't want you want to set that to a supply voltage this can be set to supply so if you connect if you set this. Bit to 0 this pin is there that's just supply voltage so this life become ineffective you are not using that line at all and similarly in a n2 in this. One if you want to not want to use this slide at all then you set this VG 1 to 0 so that connected there so I will show you this with two examples how we connect them so basically if you do. This connection this this this condition if we take that that. Means your supply voltages to a maximum or dish and your ground is the lower voltage and you can use any of these pin as analog what is coming in and you select that one and this voltage. Range has to be between zero and five because this is zero in five if you want a different range then you have to give external voltage and this is fed to this one and when you enable them a Tony converter converts them so it's important that you need to know what application you are going to use what sort of. Voltage you're going to. Convert them whether the voltage difference you're going to convert or a single voltage then you select the bits appropriately I've got two examples later on to show how do you select this one so. These three bits are important I've explained that here I've already explained it verbally and it's there now you can you can have a look let's move on to the next slide now you could select. The channel remember I mentioned that there are 14 channels there are 14 inputs there. And you need to select the channel which channel did we select so these three bits contributes the channel selection so you can see a table here if you select if you put all of them. Zeros first channel selected which is called PA not for a node which is which become as an analog input now you need a program it has already come back to that if you select say if you put the values here say. 1 0 0 1. 1 so if you put 1 0 so 1. 0 1 on 1 so 1 0 1 1 is that channel which is level channel which is our B 4 that's 4 B fourth pin will become the court before pin will now become the input to the ATD converter so you can choose out of the 40 the channel that you want by. Programming these bits there are four bits there so that fits in the 14 if you put in all all of them ones then the reference voltage will become. Point 6 volts that's an option available to you on the other hand you've got two moments here which controls the clock and what is the clock frequency of. The ATD converter at what rate. You want it to convert the analog signal digital signal so if you set both of them zeros this is 0 this is 0 then the oscillator frequency which is 4 megahertz setting in our in our. System divided by 2 that is M 2 megahertz it will operate at two megahertz if you put 1 0 oscillator frequency divided by 32 so it's a lower rating and if you if you put 1 1 then the oscillator frequency is internally set up as 500 kilohertz so. They are the ideal the only options available for the ATD converter again we need to program this register and we will come back to this one when you want to. Start the ATD converters you have to enable it so this bit need to be set to 1 and then when you want to start to convert them this is enabling to convert them you need to set this to 1 and when you finish conversion this lotterman you go to 0 then you know. It just finished conversion and the people use all of them that's what it shows a TD conversion starts with determines current status when you have 1 min is progressing it's converting but you need to set one yourself you need through program and this one 0 when. It finishes automatically throws out 0 on that line then you know just finished so these are the two registers that you need to know the one. I showed you earlier registers a VCO and one register. And the second one is ad CO and zero in the step let's move to the next slide now we have reached the state we can actually write a program we can you can now write a program and for an A to D conversion such a simple to register something you have got a program okay the question is now how. Are we going to program this so what are the steps in more okay first step is configure the port you've got to configure the port what poor I need use soap or a would be I. Mean I've already shown you previously it's a 14 ports there they. Are not in all 14 analog inputs but they're between 4a 4b and for either where these bits can be programmed as an analog pin. So right at logic one into one of the first register and they support a or corby or. Ports for each one of those registers you can't forget the mask input. So when you put a logic what if you come in put right at logic one to that corresponding and sell register so every. One of them has got an answer but instead you know that you've done. That as soon as you put one there this input is no longer digital it become as an analog input so there the computer expects the microcontroller expects an analog input now you go back to your ADC or one register you configure. The voltage defenses first remember we said which rough which what is just you want you can begin then you go to a DC drop conversion you select the truck that you want what features you want to operate then you select the input channel out of the 14 which ones you want. To select which you already decided here then you say what format. You want the output to be well as it just right justified or left justified then you a neighbor the A to D converter so once you have done from the two registers the to reduce I expect you that and that need to be used for all of them this is. An optional one you want to enable and start the ATD conversion it can create an interim and it finishes the conversion one of the flag bill will go to zero or it can create. An interrupt you can have an interrupt service routine where you read the door for them so. If you want to use it as in the best option you can pull it or you can do interrupt if you want to do interruption you need to clear a DI F beat because that's the intro flag bit the aid is transferred. To digital converter Adi F bit is here he's in the PIR one register at the location or CH you need to access that particular and then you need to go enabled A to D converter for interrupt so that will be in the P ie one register ad ie that bit after that you have to do this. To interrupt a naval that we have learned before which are on intercom register we have learned. That global interrupts enable. And peripheral interrupted neighbor we have learned that before so you have to enable all of those and. Then you have tried the interrupt service routine as I said to you once you have in a Java story to be converted before you tell them to start the convert once you enable them you need to give a 20 millisecond delay 20 micro second delay for the system settle then no need to start to convert if. You try to if you don't give. The delay and it may not give you the full answer you may get some bits outside but bits into the registers they may not be the accurate one so you need to give that time you start conversion by setting board on week to one of the register. If the bit is set it it will start and into the conversion now starts falling is you wait in your program check this bit has it gone to zero you said it has one to start the conversion you have to now check it to see if it is 0 if it. Is 0 then that's what you say if you're the Sailor that mean conversion is finished oh you can wait for a a to be interrupt as well you can do this or that one option depends on how you select if you just polling method polling waiting for it or you do interrupt then you read the results and and. Then save them now make sure you have to clear the flag bits before you go back so I think now that's all the theory behind the ad. Converter and now I'm going to give you an example and I'm going to give you an example program a variable and. Of signal is applied to an end - that's PA 2. Into Z variable analog signal supply their white the source of. Conversion is shown in Port. B so after you have done conversion you normally have these two register 8 and 2 bits what we do is we take the least-significant a register listing register bit which is the 8 bits and send the output to a port with an LEDs are connected so the output is shown on LED for PS a-- Biderman a positive reference. Voltage is applied to a and 3 so we need to have a reference voltage applied this is a reference voltage so. With reference that only we are going to measure the voltage basically the difference between these two so how do we do that so me basically we need to make sure this as a reference pin this. One and that's where you apply your signal and the difference between this is what we are measuring difference between the voltage that is converted 10 bit binary number only 8 lower bits of the result conversions are shown because there are two more bits there this is if you say this is PB. 0 that's the PPU 7 then you got two more bits coming or to get the 10 bits but the only showing 8 bits that's what we've been given you're going to program it now ok let's go to the next page how do you program it so I've drawn both diagram for you this is true a reference voltage selection this. Is your actual dieter so the first one is I know I have to they're connected to port B or their digital output so select that B register clear all of them that means all ports are output now. Because we are connected LEDs then you move this pattern into W register by having and then send them to say when you do that this is P is 0 PA 1 PA - PA 3 this is PA - this is. Psi B on both of. Them have inputs so I made that by setting all of our other 0 these two what so I've made that massage input now I got to make it as analog input so I go to Bank sell and sell and put this pattern in there and move that to axial register once you. Remove that one you have said this to a. One that mean that to configure the pin as an analogue and appropriate bits are sent and they said - what so nice be set as analog and then you clear F and and sell high that means 4p is now digital so port B is. A digital here so you have done this enough so you don't need to go to them only thing they've done is here is this is we made. One so this become as analog so two pins are analog then ports are all digital so that's what we set up now let's start to look at ours so I remember first we need to go to ad Co and register. For A to D converter and you go there and set this bit to one if you want right justified that's what we're after right justification this is what we want so I can only set that eight bits so just so what I need to do is I need to set this bitch this is equal to one so I said. Bitch set in that register that bit so I've set that to one that's just a justified now I could have set these two wants remember one of the voltage that PA three is reference voltage so I have got to. Make it that as reference so PA three is here I want this to be connected through this through this to that that's what I want that means I have to. Make VCF zero to one so I go VCO geo has to be one BSF done then I need to get the next value which is this one this one is VCF G 1 so we CFG one this one into I don't want this to be connected at all I want. This one external voltage to go in there so I want to connect this one to here so I put VCS d1 this will be connected to ground so I've met VCF g11 so voltage VSS ground is. Used as reference and are a three pin is used as positive so I've done both of them and now I can use this as my input voltage that is this voltage RA - and I've made this as a reference. So any variation with respect to that will be picked up so that's the difference voltage and measuring I'm measuring the difference between these how I can do that making this as a reference which is what I did print as a reference and then I'm using the other one as an input now I go to this register what. Do I need to do in the register first I have to access the register then I have got to set the oscillator I want the oscillator to be zero zero so I need that bit zero that bit zero because then I have a maximum clock frequency I'm running if oscillation over two. So I know they have my pizza these two are 0 I made those to 0 then I have to select a channel the channel is RA - that's my RA - is my channel so our way to in order to select that in. My reference if you go back and relook at the previous page and I can I can show you if you want to go back to see the previous page it's some pages ago yeah. Ra - are they - is that RA - means I need to have 0 0 1 1 in those registers. That's the value I need to have so you come back again now so I need to have in order to so I. Go 0 0 1 0 ego that selects me all right so I have selected this for an you snap then I this. One I can't do anything at this stage because I'm not ready yet but then a do n Aton enabled with I'm going to enable my A to D converter. I have got to get ready it's not started yet to convert but I enable them so the whole circuit is ready now so I need to set. This to 1 so that's my one this bit is the conversion rate or conversion finished with time we are not touching that in a minute so I've done that one so I've set my reference voltages I've set my clock I have set my input and everything is enabled but it's. Not ready to convert so remember once enabled them you need to give them for the circuit to settle we need to give them about 20 micro second delay so I continue I go to the next page the program is not finished yet so I've done the initialization you go to the next page I call a delay routine activation delay. Of 20 microseconds right done that now I am ready to start my EDD conversion so I go to my ADC Oh n-no when you step and I set this bit more done bit to 1. 1 once I said that one the age of the conversion process stopped so that's what I've said bit so it's here BSF one start conversion once I started. To the conversion now I will check this shoe this will be going to zero when the conversion is free this is what I said. This will go to zero when the conversion is finished so I need to check this bit to see when it's become zero so I go in a loop so I. Said ok I just put. A no no instruction you can do without that is one I said VT FSC so I'm saying test if the pit is done is this bit zero that's what I'm saying yes if it is zero conversion is finished you jump no it's not zero so conversions are not finished so you pour and keep looping you keep. Going when is come on tap in your data that conversion 10-bit converter 10 bits available so you now go bank sell actress a cell that's. The lower one move the value into the W lower byte of conversion percent is copied in trouble you register I've done that then I backside for V and the W register is sent to port me so that means whatever the 8-bit a hat 10 bit I only can use the 8 bit I'm sending the port B mean this. LEDs will show the number the digital number of responding to the analog voltage once they're done I have to start a new conversion this bit was zero now I. Gotta send it again to one to start a new conversion so I said be yourself again and then I go back to loop here and wait there and if you do the second one I mean that's finished I send it to the port and you can just keep doing that. That's a 2d conversion and measuring two voltages difference between two. Voltages in this case and the program is very simple you only have to use two registers that's all you have to do rest on. The program that you're already done before so I have another example for you to demonstrate as well I haven't done this a typical person using interrupts at the. Moment which you I give you a question you can try them out later on but at the moment just to get the principle so let's look at the next example what is. This example says this example is another example example two it says an analog voltage source is connected to a node so just simply one voltage wearing where voltage of code a of a microcontroller which is set up to sample the. Analog signal and source the 10 bit digital output in the location that and that they want you to store the value just one back you can keep going and take the next variants to and so on or overwrite it but in this case just one value if you know how to write. One value to multiple afterwards and also they say you need to configure. The eight ADC for polling. That means you're checking the same as the previous example and VDD and VSS as references what does that mean. Their references mean you need to go that need to be selected to 0 so that is connected that need to be selected as 0 so that is connected that's what the reference mean and if you do that then you are a node that line is your analog line and then you select so and. They want you to select FRC drop that means that which is 1 1 if you. Look back and then. This s the end ok but right in assembly language program so first thing is that we select to location I mean these two locations you select randomly you can have any implications but we know previous example 20 and 21 are always empty. And we take both so first one is for high other one is slow now you go through the same procedure as we did before we say Bank self hey dcoa one register this register and we want. To make sure just a right justified right justified mean this bit has to be one so I go move LW that and if so only one bit then you can use bit set but instead of that I want other thing as. Well I want these two to. Be set as well but I we know to set that they should be 0 0 so these are 0 0 so I need to have a 1 0 0 0 0 0 0 so that's what I have so I. Have said this also in one go so move that too and I've set that one I said that one then I need to go to 14 because port a is my input PA. Node so I say Bank Center to say and I said the the first badali note I said the bit that means we him as an importer now I have to tell you some analogue so I said answer select answer set that bit the. First that corresponding bit and that become as analog so if Dallas analog input are a node is an analog input now once I have done that that main part is done now. I do and say okay let me go back to my this register this register now I could select the clock frequency focus FRC drop that means that 500 megahertz 1 FRC means. These two should be one that should be one that should be one you be fast if you go back and look at it and so these. Two should be one and it's the first port we are using as analog hours today is going to go. So zero zero zero zero we don't touch that for a moment right this one is enabling the ATD converter so that's we want so the value. That we need to. Put is 1 1 0 0 0 0 0. 1 so you. Go there move 1 1 0 0 0 1 and then you move that into there into this register so it's all enabled now what you need to do call a delay routine for the system settle before you can start that that. Motion call and delay rule 20 micro second once you have done that so to make a second now you go back and send this to one more line this goes to one now you have to set that bit 1 it starts the conversion so I said that vsf is one. Start conversion once you start conversion you need to. Sit there and look when this goes to 0 so you need to do the poll so you know and you. Say I put a knob here you don't need it but you can put it up and I'm shaking that particular bit that tough not the seal of the first bit if it's not done if it's not 0 it will go back and loop. If it is zero it commands from there and go to bang cell now i go to select e at cos hedge and move the address hedge value into the w register first and then I move the W register to the digital high location which is the h20 so that's where my two bits are. There then I select the bank cell and TRUS L and move move the actress and eight bits into W register and then move them back to digital low the soul is stored there and then if you want to continue running it writing or rewriting again and again if you want to do that or if you. Want to write in a different location you need to do indexing and the same. Location you just clear you need to go back and start the conversion again at the bottom and go back to loop again so you can repeat that if you want to do again and again normally. You don't do again again you do again again but you write in a different location the consecutive location so if you write in a H 2021 and then next to the next two locations you can write or you can write there two banks a memory one rice the. Low wonder is high and you can switch PT or you have hundreds of ways of doing it you store the data later on you take the data out for further processing so initially you do this hey TD conversion to store the data for whatever amount of data you want and then do to the processing afterwards because you want. To look at the guard and see whether what's the maximum value what's the minimum value what's the DC component in the data what variations are there Automation so they are the two example simple example for a Tunisian. Border now I've got a lab object you don't need to try this out if you have time after you submit your project you can try it out but very easy you can write the program without even trying it out basically I'm saying. That here is the analog voltage source voltage becomes 0 and 5 that means you need to select them accordingly sketch into our a node and I have the switch connected to our a1 every time I press the switch so. It's high it goes to low as soon as that a to D converter should convert this into. Analog voltage and that 8 bits should be displayed on the display now you press the button and release. It and then go again press again high to low every time you go a fight to low you should do a conversion so you gotta test that you. Need to clear these these ones or decide the operation you know what they mean and you need to create a 20 minute microsecond acquisition. Delay so it's a it's a simple example almost all the code all the initialization all the corner in the previous two examples you just put them and put this program together and see whether you are able to do it and it will it won't take. More than you know 20 minutes to write and test as well in the lab it's just to give you an idea of a 2d conversion then you move this voltage up and down change it around look at these bits as well and that have a. Feel for that's all that chapter is and again I have used these orphans and this orphans most of the time and also. The bhava she'd. In order I'd this lecture notes. Thank.


ADC Telecommunications Company News

Sat, 04 May 2019 21:33:45 GMT
Addressing the need for more data in space missions - EDN.com
Addressing the need for more data in space missions EDN.com Satellite systems should be able to interface effectively and quickly with antenna arrays. It is therefore essential to consider different circuit...
Fri, 03 May 2019 05:24:12 GMT
Global CMTS-QAM Market : Industry Segment Outlook, Market Assessment, Competition Scenario, Trends and Forecast 2018–2023 - MajoReports
Global CMTS-QAM Market : Industry Segment Outlook, Market Assessment, Competition Scenario, Trends and Forecast 2018–2023 MajoReports The Research report on Global CMTS-QAM Market offers an in-depth analysis of market trends, drivers, restraints, opportunities, etc. Along with qualitative ...
Thu, 09 May 2019 13:07:15 GMT
Mobile and Wireless Backhaul Equipment Market 2018 Global Trends, Market Share, Industry Size, Growth, Industry Production, Gross Margin, Opportunities and Forecast to 2023 - The West Tribune
Mobile and Wireless Backhaul Equipment Market 2018 Global Trends, Market Share, Industry Size, Growth, Industry Production, Gross Margin, Opportunities and Forecast to 2023 The West Tribune The report offers detailed coverage of the Mobile and Wireless Backhaul Equipment industry and main market trends. Market research includes historical and ...
Tue, 30 Apr 2019 06:26:00 GMT
CMTS-QAM Market Research report 2019-2026 Growth Opportunities, share, size, Revenue, Gross Margin and its Competitors by 2026 - The Akis Express
CMTS-QAM Market Research report 2019-2026 Growth Opportunities, share, size, Revenue, Gross Margin and its Competitors by 2026 The Akis Express Global CMTS-QAM Market Research Report 2019 is a comprehensive business study on the current state of industry which analyses innovative strategies for ...
Mon, 10 Dec 2018 08:00:00 GMT
Engility CEO Lynn Dugle Receives Lifetime Achievement Award; SAIC CEO Tony Moraco Quoted - ExecutiveBiz
Engility CEO Lynn Dugle Receives Lifetime Achievement Award; SAIC CEO Tony Moraco Quoted ExecutiveBiz Engility CEO Lynn Dugle has accepted the 2018 Lifetime Achievement Award from the Washington Business Journal in recognition of her more than three ...
Wed, 10 Apr 2019 07:00:00 GMT
Optical Spectrum Analyzer Market Global Strategies and Insight driven transformation 2019-2023 - industryreports24.com
Optical Spectrum Analyzer Market Global Strategies and Insight driven transformation 2019-2023 industryreports24.com “The Optical Spectrum Analyzer Market Research Report 2018-2023”: Is a valuable source of insightful data for business strategists. It provides the industry ...
Wed, 17 Apr 2019 07:00:00 GMT
CMTS-QAM market Analysis by Trends | Types | Applications | manufactures | Regions | market size and Forecast up to 2026 - Current News Magazine
CMTS-QAM market Analysis by Trends | Types | Applications | manufactures | Regions | market size and Forecast up to 2026 Current News Magazine Report Name: – “Global CMTS-QAM Market Report 2019, Competitive Landscape, Trends and Opportunities”. According to the new market research report on ...
Mon, 22 Apr 2019 07:00:00 GMT
Form DEF 14A INSIGNIA SYSTEMS INC/MN For: Jun 06 - StreetInsider.com
Tue, 07 May 2019 05:58:00 GMT
Copper Stranded Wire Market 2019-2024 | Industry Analysis By Key Manufacturers Prysmian Group, Nexans, General Cable, Sumitomo Electric, Southwire, Skb Group, Fese - openPR
Copper Stranded Wire Market 2019-2024 | Industry Analysis By Key Manufacturers Prysmian Group, Nexans, General Cable, Sumitomo Electric, Southwire, Skb Group, Fese openPR Copper Wire Is Extensively Used For Electrical Wiring In Homes, Commercial Areas, Buildings, And Industries. Stranded Copper Wire, Used Extensively In The ...
Sat, 04 May 2019 11:34:25 GMT
Rnc Capital Management Has Raised Position in Verizon Communications (VZ) by $1.42 Million as Share Price Declined; Heitman Real Estate Securities Has Boosted Its Regency Ctrs (REG) Holding by $3.05 Million - CryptoCoinsTribune
Rnc Capital Management Has Raised Position in Verizon Communications (VZ) by $1.42 Million as Share Price Declined; Heitman Real Estate Securities Has Boosted Its Regency Ctrs (REG) Holding by $3.05 Million CryptoCoinsTribune Rnc Capital Management Llc increased its stake in Verizon Communications (VZ) by 2.36% based on its latest 2018Q4 regulatory filing with the SEC.