Alireza Bolourchian

CodeWarrior - Processor expert - Bean ADC

Discussion created by Alireza Bolourchian on Jun 25, 2009
Latest reply on Aug 1, 2010 by Chamira Sooriyakumara

Hello every one

 I'm a beginner in CodeWarrior. I’m trying to work with Processor Expert to read a

Analog input . I used  ADC bean but something here is wrong. I have got 15 errors from

below program. Is any body knows some resources or training stuffs to help me to understand processor expert in ADC or serial port programming or some sample example to understand better the problem. 

 

Thanks.

 

----------------------------------------------------------------------------------------------------------------

----------------------------------------------------------------------------------------------------------------

 

void main(void)
{
  /* Write your local variable definition here */


unsigned int t;
long tlong1;

    Pot_Enable();
    Pot_MeasureWait();
    Pot_Measure();
    Pot_GetValue16();


  /*** Processor Expert internal initialization. DON'T REMOVE THIS CODE!!! ***/
  PE_low_level_init();
  /*** End of Processor Expert internal initialization.                    ***/

  /* Write your code here */
  do {
 
  
   Pot_Start();


//  tlong1 = (long)t * 5000;
//  tlong1 = tlong1 / 1024;
 // if (tlong1 >= 2500 & tlong1 <=4450 )   {
                                            
    if (t >= 50 )   {
     
      Indicator_SetVal();
                       
  } else {
 
 
                Indicator_ClrVal();

        
          }
 
   } while(1);          /* endless loop */

Outcomes