Wednesday, October 13, 2010

CrazyEngineers Forum - Electrical & Electronics Engineering

CrazyEngineers Forum - Electrical & Electronics Engineering


Configuring adc of tms470r1b1m controller

Posted: 12 Oct 2010 10:14 PM PDT

im using tms470r1b1m controller for my project.i need an ADC for processing the analog input.
in iar workbench,i had configured the registers but the code is not working.
code is given below.plz give me a solution..........
Code:

#include <intrinsics.h>
#include "iotms470r1b1m.h"
#include "tms470r1b1m_bit_definitions.h"
#include <stdio.h>

void main(void)
{
  int result;
  PCR = CLKDIV_3;                        // ICLK = SYSCLK / 3
  GCR = ZPLL_CLK_DIV_PRE_1;              // SYSCLK = 8 x fOSC
  PCR = PENABLE;                        // Enable peripherals


  PLR = (PLOC3&0);                      //peripheral selects, The peripheral is internal
  PPROT = (PPROT3&0);            // peripheral selects,The peripheral is accessible in all modes
  CLKCNTL = 0x00000020;
 

  ADCR1 = PS_8;                          // ADCLK prescaler = 8
  ADCR1 = COS;
  ADCR2 |= G1_MODE;                      // Continuous Conversion
  ADSR =0x0000;                    // Clears flag
  ADEISR=0x0000;    // event disabled
  ADISR1 = 0x0020;  // Convert group 1 = channel 5
  ADISR2 = 0x0000;  //grp2 disabled
  ADCALR = 0x000;    //no Calibration
  ADSAMPEV = SEN;                        // ADCSAMP1 controls SW
  ADSAMP1 = 62;                          // SW = 62+2
  ADCR1 = ADC_EN;                        // Enable ADC
 
 
  for (;:wink:
  {
   
  while (!GP1_END);            // Wait for conversion to complete
  {
  }
    result = ADDR5;
    printf("RESULT is %d",result);
    ADSR =0x0000; 
 
  }
}

when this code is executed in iar workbench, the ADC is not activated nor does it sets GP1_END bit to indicate the completion signal.hence the code never exits from the while loop.here input is given to channel 5.i couldn't identify the problem..
plz give me a solution.............

induction generator

Posted: 12 Oct 2010 09:06 PM PDT

why we r connected capacitor bank in delta not in star. explain??

micro controller help

Posted: 12 Oct 2010 06:25 AM PDT

hey ppl, i need help for my final year project. basically, we are doing a open parking lot, powered by solar panel and batteries. we have IR transmitter and receiver at each parking lot. we only have 5, it is just a prototype. i still need to design a 7 display segment in order to show the number of available slot left, it will be much more useful. so this mean, the number shown on the display segment will always be 5 if there is no car, and if a car comes in and park, it will be 4. basically, just -1 from the base number. and +1 if a car leave the lot. what micro controller should i use? or if nt, is there any simpler way to achieve this? how should i go about doing it? i do nt have much time left to do, maybe abt 2 month. i need serious help, thanks alot.

initialisation of USRP

Posted: 12 Oct 2010 05:33 AM PDT

hello guys,
i am cyrrently working of software designed radio and i got stuck while installing my USRP. i had already installed the gnu radio 3.3 varsion and currently i am working on linux.
i am basically trying to run some examples from the location
Desktop/ucla_zigbee_phy/src/examples# ./cc1k_rxtest.py

and i am getting the following error...


Traceback (most recent call last):
File "./cc1k_rxtest.py", line 44, in <module>
from gnuradio import usrp
File "/usr/lib/python2.6/dist-packages/gnuradio/usrp/__init__.py", line 25, in <module>
from usrp_swig import *
File "/usr/lib/python2.6/dist-packages/gnuradio/usrp/usrp_swig.py", line 24, in <module>
_usrp_swig = swig_import_helper()
File "/usr/lib/python2.6/dist-packages/gnuradio/usrp/usrp_swig.py", line 20, in swig_import_helper
_mod = imp.load_module('_usrp_swig', fp, pathname, description)
ImportError: /usr/lib/libgnuradio-usrp.so.0: undefined symbol: _ZN7db_base4dbidEv


i searched on internet alot but didnt find anything that could help me out...
please suggest something...as soon as possible

No comments:

Post a Comment