Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
03/20/07 22:01
Read: times


 
#135453 - varibles
Responding to: ???'s previous message
Hi Erik,
I have used code architect before i had no problem with it either until now. here is what i get from code architect for the DAC.

/***********************************************************************
DESC: Initializes the ADC
RETURNS: Nothing
CAUTION: Set EA to 1 after calling to enable all interrupts
************************************************************************/
void adc_init(void)
{

// set dac1 pin to input only (disables digital output)
P2M1 |= 0x01;
P2M2 &= ~0x01;
// init dac1 value to zero
AD0DAT3 = 0x00;
// enable dac1 output
ADMODB |= 0x04;
// enable adc1 (also enables dac1)
ADCON0 |= 0x04;

}

/***********************************************************************
DESC: Sets the output voltage of DAC1
RETURNS: Nothing
************************************************************************/
void adc_setdac1output
(
unsigned char value // value in the range 0 (0V) - 255 (VDD)
)
{
// set dac1 value
AD0DAT3 = value;
}

As i said on my previous post, there is no P2M1,P2M2,ADCON0, or ADODAT3 in the LPC925. I look it up in the data sheets as well as in the user manual. This are the variables that i mention earlier.

Enrique

List of 10 messages in thread
TopicAuthorDate
help using DAC with LPC925            01/01/70 00:00      
   Show them            01/01/70 00:00      
      varibles            01/01/70 00:00      
         Configured Correctly?            01/01/70 00:00      
            I did that once            01/01/70 00:00      
               I did            01/01/70 00:00      
                  try again and ...            01/01/70 00:00      
                     will try!            01/01/70 00:00      
                     Hopefully Fixed            01/01/70 00:00      
                        Fixed            01/01/70 00:00      

Back to Subject List