/** \brief Main function
 *
 * This is the main entry point of the software.
 *
 * \returns 0
 *
 * \remarks This function never returns. Return value is only to avoid compiler
 *          warnings or errors.
 */
void InicializarDAC(void)
{
	Chip_SCU_DAC_Analog_Config();
	Chip_DAC_Init(LPC_DAC); // en external/drivers/cortexM4/lpc43xx/inc/chip_lpc43xx.h estan definidoa todas las variables que contienen
							//la direccion de bae de cada modulo del micro lpc43xx
	Chip_DAC_ConfigDAConverterControl(LPC_DAC,DAC_DMA_ENA);
}
void inicializar_DAC(void)
{
	Chip_SCU_DAC_Analog_Config();

	Chip_DAC_Init(LPC_DAC);
	Chip_DAC_ConfigDAConverterControl(LPC_DAC,DAC_DMA_ENA|DAC_CNT_ENA);
}
int main(void)
{
   /* perform the needed initialization here */
    InicializaPuertosTeclasYLeds();

	DatoDAC=0;
	Vmax=930;
	T=100;
	t=0;

	Chip_SCU_DAC_Analog_Config(); //select DAC function
	Chip_DAC_Init(LPC_DAC); //initialize DAC
	Chip_DAC_SetBias(LPC_DAC, DAC_MAX_UPDATE_RATE_400kHz);
	Chip_DAC_SetDMATimeOut(LPC_DAC, 0xffff);
	Chip_DAC_ConfigDAConverterControl(LPC_DAC, DAC_CNT_ENA | DAC_DMA_ENA);


	
    Chip_RIT_Init(LPC_RITIMER);
    Chip_RIT_SetTimerInterval(LPC_RITIMER,1);



    NVIC_EnableIRQ(RITIMER_IRQn);

       while(1) {

         }
         return 0;


}
Exemple #4
0
void DAC_Init() {
	Chip_SCU_DAC_Analog_Config();
	Chip_DAC_SetBias(LPC_DAC,0);
	Chip_DAC_Init(LPC_DAC);
	Chip_DAC_SetDMATimeOut(LPC_DAC, 0xFFFF);
	Chip_DAC_ConfigDAConverterControl(LPC_DAC, (DAC_CNT_ENA | DAC_DMA_ENA));
}
Exemple #5
0
void dacInit(){

	 Chip_SCU_DAC_Analog_Config();
	 Chip_DAC_Init(LPC_DAC);
	 Chip_DAC_ConfigDAConverterControl(LPC_DAC,DAC_DMA_ENA);

}
Exemple #6
0
void InicializarDAC(void)
{
   /* perform the needed initialization here */
	 Chip_SCU_DAC_Analog_Config();
	 Chip_DAC_Init(LPC_DAC);
	 Chip_DAC_ConfigDAConverterControl(LPC_DAC,DAC_DMA_ENA);

};
void initDac (void)
{
	Chip_SCU_DAC_Analog_Config();

	/* DAC Init */
	Chip_DAC_Init (LPC_DAC);
	Chip_DAC_SetDMATimeOut (LPC_DAC, 0xFFFF);
	Chip_DAC_ConfigDAConverterControl (LPC_DAC, (DAC_CNT_ENA | DAC_DMA_ENA));
	setDacValue (0);				 								/*	0 <=> 0V & 1024 <=> 3.3V	*/

}
Exemple #8
0
void Board_DAC_Init(void)
{
   Chip_SCU_DAC_Analog_Config();
   Chip_DAC_Init(LPC_DAC);
   Chip_DAC_SetBias(LPC_DAC, DAC_MAX_UPDATE_RATE_400kHz);
   Chip_DAC_ConfigDAConverterControl(LPC_DAC, DAC_CNT_ENA | DAC_DMA_ENA);

   // Enable DMA
   Chip_DAC_SetDMATimeOut(LPC_DAC, 0xffff);
   Chip_GPDMA_Init(LPC_GPDMA);
   NVIC_DisableIRQ(DMA_IRQn);
   NVIC_SetPriority(DMA_IRQn, ((0x01 << 3) | 0x01));
   NVIC_EnableIRQ(DMA_IRQn);

   dacInfo.flagCyclic=0;
   dacInfo.dmaChannelDAC=0xFF;
}
void InicializarDAC(void){
	Chip_SCU_DAC_Analog_Config();
	Chip_DAC_Init(LPC_DAC);
	Chip_DAC_UpdateValue(LPC_DAC, 0);
	Chip_DAC_ConfigDAConverterControl (LPC_DAC, DAC_DMA_ENA);
}
Exemple #10
0
/* Initialize DAC interface for the board */
void Board_DAC_Init(LPC_DAC_T *pDAC)
{
	Chip_SCU_DAC_Analog_Config();
}
void initDAC(){
	Chip_SCU_DAC_Analog_Config();
	Chip_DAC_Init(LPC_DAC);
	Chip_DAC_SetBias(LPC_DAC, DAC_MAX_UPDATE_RATE_400kHz);
	Chip_DAC_ConfigDAConverterControl(LPC_DAC,DAC_CNT_ENA|DAC_DMA_ENA);
}