Sign in

username:

password:



Not a member?

Search lpc2000



Search tips

Subscribe to lpc2000



lpc2000 by Keywords

2106 | ADC | ARM7 | Atmel | Bootloader | CAN | CrossStudio | CrossWorks | DDS | ECos | Ethernet | ETM | FIFO | FLASH | FPGA | GCC | GDB | GNU | GNUARM | GPIO | I2C | IAP | IAR | JTAG | Kickstart | LCD | Linux | LPC | LPC-E2294 | LPC2000 | LPC2100 | LPC2104 | Lpc2106 | Lpc210x | LPC2114 | LPC2119 | LPC2124 | LPC2129 | Lpc2138 | LPC213x | LPC21xx | LPC2210 | LPC2212 | LPC2214 | LPC2292 | LPC2294 | LPC2xxx | LPC3128 | MCB2100 | Olimex | Philips | PWM | Rowley | RTC | RTOS | SPI | SSP | UART | UART0 | UART1 | ULINK | USB | Watchdog | Wiggler

Ads

Discussion Groups

See Also

DSPFPGAElectronics

Discussion Groups | LPC2000 | Help needed getting Aout working on LPC2468

Discussion group dedicated to the Philips LPC2000 family of ARM MCUs

Help needed getting Aout working on LPC2468 - Martijn Broens - Jan 5 6:39:42 2009

Hi All,

I've got this routine to setup and controll the dac output on the lpc2568
(bga version)

This code runs fine on the EA LPC2478 OEM board. And produces in conjuction
with the dds code from the files section a sinewave.

When I run the same code on my own hardware (but this holds an lpc2568 BGA)
the code doesn't produce the output, nor can I cnagne the dac value. i.e.
when measuring on the output its value remains low.

I've teste my hw by setting the io ans fast io and than toggling the bit,
this workes. Than when I set the pinsel bits I can no longer toggle the
output so that's seems ok. But still no change in dac output. If I do the
same on the ea board. All test pass.

Does anyone have any suggestions??

Here's the code:

#define BIT_Set(reg,bit) ((reg) |= (bit))

#define _BV(bit) (1 << (bit))

#define bit_set(sfr, bit) ((sfr) |= _BV(bit))

#define A0OUT 0x04000000 //P0.26

void dac_init (void)

{

unsigned int i;

#if 0

while(1){

//this wokes

BIT_Set(FIO0SET, A0OUT);

delay(2550);

BIT_Set(FIO0CLR, A0OUT);

delay(2550);

}

#endif

bit_set(PINSEL1, 21);

bit_clear(PINSEL1, 20);

DACR = 0;

}

unsigned int dacSet (unsigned int newValue)

{

unsigned int dacCR;

unsigned int dacCurrentValue;

// DEBUGDAC("Writing DAC value:[%d]\n",newValue);

DEBUGDAC("\n* DACval=%d ",newValue);

dacCR = DACR;

dacCurrentValue = (dacCR & DACR_VALUE_MASK) >> DACR_VALUE_BIT;

DACR = newValue;

return dacCurrentValue;

}

thanks martijn

[Non-text portions of this message have been removed]
------------------------------------



(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )


RE: Help needed getting Aout working on LPC2468 - Bruce Paterson - Jan 5 18:02:45 2009

Check the reference voltage perhaps ?

Cheers,
Bruce
-----Original Message-----
From: l...@yahoogroups.com [mailto:l...@yahoogroups.com] On Behalf
Of Martijn Broens
Sent: Monday, 5 January 2009 10:39 PM
To: l...@yahoogroups.com
Subject: [lpc2000] Help needed getting Aout working on LPC2468

Hi All,

I've got this routine to setup and controll the dac output on the
lpc2568
(bga version)

This code runs fine on the EA LPC2478 OEM board. And produces in
conjuction
with the dds code from the files section a sinewave.

When I run the same code on my own hardware (but this holds an lpc2568
BGA)
the code doesn't produce the output, nor can I cnagne the dac value.
i.e.
when measuring on the output its value remains low.

I've teste my hw by setting the io ans fast io and than toggling the
bit,
this workes. Than when I set the pinsel bits I can no longer toggle the
output so that's seems ok. But still no change in dac output. If I do
the
same on the ea board. All test pass.

Does anyone have any suggestions??

Here's the code:

#define BIT_Set(reg,bit) ((reg) |= (bit))

#define _BV(bit) (1 << (bit))

#define bit_set(sfr, bit) ((sfr) |= _BV(bit))

#define A0OUT 0x04000000 //P0.26

void dac_init (void)

{

unsigned int i;

#if 0

while(1){

//this wokes

BIT_Set(FIO0SET, A0OUT);

delay(2550);

BIT_Set(FIO0CLR, A0OUT);

delay(2550);

}

#endif

bit_set(PINSEL1, 21);

bit_clear(PINSEL1, 20);

DACR = 0;

}

unsigned int dacSet (unsigned int newValue)

{

unsigned int dacCR;

unsigned int dacCurrentValue;

// DEBUGDAC("Writing DAC value:[%d]\n",newValue);

DEBUGDAC("\n* DACval=%d ",newValue);

dacCR = DACR;

dacCurrentValue = (dacCR & DACR_VALUE_MASK) >> DACR_VALUE_BIT;

DACR = newValue;

return dacCurrentValue;

}

thanks martijn

[Non-text portions of this message have been removed]
------------------------------------



(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )

Re: Help needed getting Aout working on LPC2468 - gabdubatti - Sep 1 10:56:52 2009

--- In l...@yahoogroups.com, "Martijn Broens" wrote:
> Hi All,
> I've got this routine to setup and controll the dac output on the lpc2568
> (bga version)
> This code runs fine on the EA LPC2478 OEM board. And produces in conjuction
> with the dds code from the files section a sinewave.
> When I run the same code on my own hardware (but this holds an lpc2568 BGA)
> the code doesn't produce the output, nor can I cnagne the dac value. i.e.
> when measuring on the output its value remains low.
> I've teste my hw by setting the io ans fast io and than toggling the bit,
> this workes. Than when I set the pinsel bits I can no longer toggle the
> output so that's seems ok. But still no change in dac output. If I do the
> same on the ea board. All test pass.
> Does anyone have any suggestions??
>....
> thanks martijn
>

Hi Martijn,

Have you solved this issue?

I'm having exactly the same problem as you had.

P0.26 (AOUT) works fine as a PORT but not as a DAC on my own hardware:
uP= LPC2468 FBD208 (rev.B) with VREF = VDDA = 3.3V / VSSA=VSS /
a 10K resistor between P0.26 and VSSA.
(I have mounted two boards and both have the same problem).

Software runs OK on my E.A. board but when I try this simple code on my own hardware I got "AOUT = 0V":

//force P0.26 mode to "10"
PINSEL1= (PINSEL1 & ~(3 << 20)) | (2 << 20);
//set AOUT= 3.3V/4
DACR= 0x4000;
Any help will be appreciated.

Best Regards,
Gabriel.
------------------------------------



(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )

RE: Re: Help needed getting Aout working on LPC2468 - Michael J Scott - Sep 1 11:07:42 2009

Did you turn on the clock and enable the hardware?

_____

From: gabdubatti [mailto:g...@gmail.com]
Sent: Tuesday, September 01, 2009 10:55 AM
To: l...@yahoogroups.com
Subject: [lpc2000] Re: Help needed getting Aout working on LPC2468

--- In lpc2000@yahoogroups .com, "Martijn
Broens" wrote:
> Hi All,
> I've got this routine to setup and controll the dac output on the lpc2568
> (bga version)
> This code runs fine on the EA LPC2478 OEM board. And produces in
conjuction
> with the dds code from the files section a sinewave.
> When I run the same code on my own hardware (but this holds an lpc2568
BGA)
> the code doesn't produce the output, nor can I cnagne the dac value. i.e.
> when measuring on the output its value remains low.
> I've teste my hw by setting the io ans fast io and than toggling the bit,
> this workes. Than when I set the pinsel bits I can no longer toggle the
> output so that's seems ok. But still no change in dac output. If I do the
> same on the ea board. All test pass.
> Does anyone have any suggestions??
>....
> thanks martijn
>

Hi Martijn,

Have you solved this issue?

I'm having exactly the same problem as you had.

P0.26 (AOUT) works fine as a PORT but not as a DAC on my own hardware:
uP= LPC2468 FBD208 (rev.B) with VREF = VDDA = 3.3V / VSSA=VSS /
a 10K resistor between P0.26 and VSSA.
(I have mounted two boards and both have the same problem).

Software runs OK on my E.A. board but when I try this simple code on my own
hardware I got "AOUT = 0V":

//force P0.26 mode to "10"
PINSEL1= (PINSEL1 & ~(3 << 20)) | (2 << 20);
//set AOUT= 3.3V/4
DACR= 0x4000;

Any help will be appreciated.

Best Regards,
Gabriel.

[Non-text portions of this message have been removed]

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

______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.


(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )

Re: Help needed getting Aout working on LPC2468 - gabdubatti - Sep 1 11:16:21 2009

--- In l...@yahoogroups.com, "Michael J Scott" wrote:
>
> Did you turn on the clock and enable the hardware?
>
>
>
> _____
>
> From: gabdubatti [mailto:gdubatti@...]
> Sent: Tuesday, September 01, 2009 10:55 AM
> To: l...@yahoogroups.com
> Subject: [lpc2000] Re: Help needed getting Aout working on LPC2468
>
>
>
>
>
> --- In lpc2000@yahoogroups .com, "Martijn
> Broens" wrote:
> > Hi All,
> > I've got this routine to setup and controll the dac output on the lpc2568
> > (bga version)
> > This code runs fine on the EA LPC2478 OEM board. And produces in
> conjuction
> > with the dds code from the files section a sinewave.
> > When I run the same code on my own hardware (but this holds an lpc2568
> BGA)
> > the code doesn't produce the output, nor can I cnagne the dac value. i.e.
> > when measuring on the output its value remains low.
> > I've teste my hw by setting the io ans fast io and than toggling the bit,
> > this workes. Than when I set the pinsel bits I can no longer toggle the
> > output so that's seems ok. But still no change in dac output. If I do the
> > same on the ea board. All test pass.
> > Does anyone have any suggestions??
> >....
> > thanks martijn
> > Hi Martijn,
>
> Have you solved this issue?
>
> I'm having exactly the same problem as you had.
>
> P0.26 (AOUT) works fine as a PORT but not as a DAC on my own hardware:
> uP= LPC2468 FBD208 (rev.B) with VREF = VDDA = 3.3V / VSSA=VSS /
> a 10K resistor between P0.26 and VSSA.
> (I have mounted two boards and both have the same problem).
>
> Software runs OK on my E.A. board but when I try this simple code on my own
> hardware I got "AOUT = 0V":
>
> //force P0.26 mode to "10"
> PINSEL1= (PINSEL1 & ~(3 << 20)) | (2 << 20);
> //set AOUT= 3.3V/4
> DACR= 0x4000;
>
> Any help will be appreciated.
>
> Best Regards,
> Gabriel.
>

Hi,
Thanks for answering.

The DAC module is allways enabled.
PCLKSEL0.PCLK_DAC = 00 (reset value) = CCLK/4.
I haven't seen other registers to configure the DAC behaviour.

Best Regards,
Gabriel.

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

______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.


(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )

RE: Re: Help needed getting Aout working on LPC2468 - Michael J Scott - Sep 1 11:18:18 2009

Take a look at RCC_APB1ENR Bit 29

_____

From: gabdubatti [mailto:g...@gmail.com]
Sent: Tuesday, September 01, 2009 11:15 AM
To: l...@yahoogroups.com
Subject: [lpc2000] Re: Help needed getting Aout working on LPC2468

--- In lpc2000@yahoogroups .com, "Michael
J Scott" wrote:
>
> Did you turn on the clock and enable the hardware?
>
> _____
>
> From: gabdubatti [mailto:gdubatti@...]
> Sent: Tuesday, September 01, 2009 10:55 AM
> To: lpc2000@yahoogroups .com
> Subject: [lpc2000] Re: Help needed getting Aout working on LPC2468
>
> --- In lpc2000@yahoogroups .com,
"Martijn
> Broens" wrote:
> > Hi All,
> > I've got this routine to setup and controll the dac output on the
lpc2568
> > (bga version)
> > This code runs fine on the EA LPC2478 OEM board. And produces in
> conjuction
> > with the dds code from the files section a sinewave.
> > When I run the same code on my own hardware (but this holds an lpc2568
> BGA)
> > the code doesn't produce the output, nor can I cnagne the dac value.
i.e.
> > when measuring on the output its value remains low.
> > I've teste my hw by setting the io ans fast io and than toggling the
bit,
> > this workes. Than when I set the pinsel bits I can no longer toggle the
> > output so that's seems ok. But still no change in dac output. If I do
the
> > same on the ea board. All test pass.
> > Does anyone have any suggestions??
> >....
> > thanks martijn
> > Hi Martijn,
>
> Have you solved this issue?
>
> I'm having exactly the same problem as you had.
>
> P0.26 (AOUT) works fine as a PORT but not as a DAC on my own hardware:
> uP= LPC2468 FBD208 (rev.B) with VREF = VDDA = 3.3V / VSSA=VSS /
> a 10K resistor between P0.26 and VSSA.
> (I have mounted two boards and both have the same problem).
>
> Software runs OK on my E.A. board but when I try this simple code on my
own
> hardware I got "AOUT = 0V":
>
> //force P0.26 mode to "10"
> PINSEL1= (PINSEL1 & ~(3 << 20)) | (2 << 20);
> //set AOUT= 3.3V/4
> DACR= 0x4000;
>
> Any help will be appreciated.
>
> Best Regards,
> Gabriel.
>

Hi,
Thanks for answering.

The DAC module is allways enabled.
PCLKSEL0.PCLK_DAC = 00 (reset value) = CCLK/4.
I haven't seen other registers to configure the DAC behaviour.

Best Regards,
Gabriel.

[Non-text portions of this message have been removed]

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



(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )

Re: Help needed getting Aout working on LPC2468 - gabdubatti - Sep 1 11:30:53 2009

--- In l...@yahoogroups.com, "Michael J Scott" wrote:
>
> Take a look at RCC_APB1ENR Bit 29
>=20
>=20=20
>=20
> _____=20=20
>=20
> From: gabdubatti [mailto:gdubatti@...]=20
> Sent: Tuesday, September 01, 2009 11:15 AM
> To: l...@yahoogroups.com
> Subject: [lpc2000] Re: Help needed getting Aout working on LPC2468
>=20
>=20=20
>=20
>=20=20=20
>=20
> --- In lpc2000@yahoogroups .com, "Mich=
ael
> J Scott" wrote:
> >
> > Did you turn on the clock and enable the hardware?
> >=20
> >=20
> >=20
> > _____=20
> >=20
> > From: gabdubatti [mailto:gdubatti@]=20
> > Sent: Tuesday, September 01, 2009 10:55 AM
> > To: lpc2000@yahoogroups .com
> > Subject: [lpc2000] Re: Help needed getting Aout working on LPC2468
> >=20
> >=20
> >=20
> >=20
> >=20
> > --- In lpc2000@yahoogroups .com,
> "Martijn
> > Broens" wrote:
> > > Hi All,
> > > I've got this routine to setup and controll the dac output on the
> lpc2568
> > > (bga version)
> > > This code runs fine on the EA LPC2478 OEM board. And produces in
> > conjuction
> > > with the dds code from the files section a sinewave.
> > > When I run the same code on my own hardware (but this holds an lpc256=
8
> > BGA)
> > > the code doesn't produce the output, nor can I cnagne the dac value.
> i.e.
> > > when measuring on the output its value remains low.
> > > I've teste my hw by setting the io ans fast io and than toggling the
> bit,
> > > this workes. Than when I set the pinsel bits I can no longer toggle t=
he
> > > output so that's seems ok. But still no change in dac output. If I do
> the
> > > same on the ea board. All test pass.
> > > Does anyone have any suggestions??
> > >....
> > > thanks martijn
> > >=20
> >=20
> > Hi Martijn,
> >=20
> > Have you solved this issue?
> >=20
> > I'm having exactly the same problem as you had.
> >=20
> > P0.26 (AOUT) works fine as a PORT but not as a DAC on my own hardware:
> > uP=3D LPC2468 FBD208 (rev.B) with VREF =3D VDDA =3D 3.3V / VSSA=3DVSS /
> > a 10K resistor between P0.26 and VSSA.
> > (I have mounted two boards and both have the same problem).
> >=20
> > Software runs OK on my E.A. board but when I try this simple code on my
> own
> > hardware I got "AOUT =3D 0V":
> >=20
> > //force P0.26 mode to "10"
> > PINSEL1=3D (PINSEL1 & ~(3 << 20)) | (2 << 20);
> > //set AOUT=3D 3.3V/4
> > DACR=3D 0x4000;
> >=20
> > Any help will be appreciated.
> >=20
> > Best Regards,
> > Gabriel.
> >=20
>=20
> Hi,
> Thanks for answering.
>=20
> The DAC module is allways enabled.
> PCLKSEL0.PCLK_DAC =3D 00 (reset value) =3D CCLK/4.
> I haven't seen other registers to configure the DAC behaviour.
>=20
> Best Regards,
> Gabriel.
>=20
>=20
>=20
>=20
>=20
> [Non-text portions of this message have been removed]
>

Hi,

My CPU is: NXP LPC2468 FBD208 (rev.B)
It hasn,t the register you said (like STM32 family).

This is taken from NXP user manual:
-----
Bits 21:20 of the PINSEL1 register (Section 9=966.2 "Pin Function Select Re=
gister 1 (PINSEL1 - 0xE002 C004)" on page 124) control whether the DAC is e=
nabled and controlling the state of pin P0.26/AD0.3/AOUT/RXD3.=20
When these bits are 10, the DAC is powered on and active.
-----

Best Regards,
Gabriel.

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



(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )

RE: Re: Help needed getting Aout working on LPC2468 - Michael J Scott - Sep 1 11:51:23 2009

Sorry, you are right I'm designing two boards on the same project right now;
one with an LPC2478 and the other with an STM32. Got them confused, sorry.

_____

From: gabdubatti [mailto:g...@gmail.com]
Sent: Tuesday, September 01, 2009 11:30 AM
To: l...@yahoogroups.com
Subject: [lpc2000] Re: Help needed getting Aout working on LPC2468

--- In lpc2000@yahoogroups .com, "Michael
J Scott" wrote:
>
> Take a look at RCC_APB1ENR Bit 29
>
> _____
>
> From: gabdubatti [mailto:gdubatti@...]
> Sent: Tuesday, September 01, 2009 11:15 AM
> To: lpc2000@yahoogroups .com
> Subject: [lpc2000] Re: Help needed getting Aout working on LPC2468
>
> --- In lpc2000@yahoogroups .com,
"Michael
> J Scott" wrote:
> >
> > Did you turn on the clock and enable the hardware?
> >
> >
> >
> > _____
> >
> > From: gabdubatti [mailto:gdubatti@]
> > Sent: Tuesday, September 01, 2009 10:55 AM
> > To: lpc2000@yahoogroups .com
> > Subject: [lpc2000] Re: Help needed getting Aout working on LPC2468
> >
> >
> >
> >
> >
> > --- In lpc2000@yahoogroups .com,
> "Martijn
> > Broens" wrote:
> > > Hi All,
> > > I've got this routine to setup and controll the dac output on the
> lpc2568
> > > (bga version)
> > > This code runs fine on the EA LPC2478 OEM board. And produces in
> > conjuction
> > > with the dds code from the files section a sinewave.
> > > When I run the same code on my own hardware (but this holds an lpc2568
> > BGA)
> > > the code doesn't produce the output, nor can I cnagne the dac value.
> i.e.
> > > when measuring on the output its value remains low.
> > > I've teste my hw by setting the io ans fast io and than toggling the
> bit,
> > > this workes. Than when I set the pinsel bits I can no longer toggle
the
> > > output so that's seems ok. But still no change in dac output. If I do
> the
> > > same on the ea board. All test pass.
> > > Does anyone have any suggestions??
> > >....
> > > thanks martijn
> > >
> >
> > Hi Martijn,
> >
> > Have you solved this issue?
> >
> > I'm having exactly the same problem as you had.
> >
> > P0.26 (AOUT) works fine as a PORT but not as a DAC on my own hardware:
> > uP= LPC2468 FBD208 (rev.B) with VREF = VDDA = 3.3V / VSSA=VSS /
> > a 10K resistor between P0.26 and VSSA.
> > (I have mounted two boards and both have the same problem).
> >
> > Software runs OK on my E.A. board but when I try this simple code on my
> own
> > hardware I got "AOUT = 0V":
> >
> > //force P0.26 mode to "10"
> > PINSEL1= (PINSEL1 & ~(3 << 20)) | (2 << 20);
> > //set AOUT= 3.3V/4
> > DACR= 0x4000;
> >
> > Any help will be appreciated.
> >
> > Best Regards,
> > Gabriel.
> > Hi,
> Thanks for answering.
>
> The DAC module is allways enabled.
> PCLKSEL0.PCLK_DAC = 00 (reset value) = CCLK/4.
> I haven't seen other registers to configure the DAC behaviour.
>
> Best Regards,
> Gabriel.
>
> [Non-text portions of this message have been removed]
>

Hi,

My CPU is: NXP LPC2468 FBD208 (rev.B)
It hasn,t the register you said (like STM32 family).

This is taken from NXP user manual:
-----
Bits 21:20 of the PINSEL1 register (Section 9-6.2 "Pin Function Select
Register 1 (PINSEL1 - 0xE002 C004)" on page 124) control whether the DAC is
enabled and controlling the state of pin P0.26/AD0.3/AOUT/RXD3.
When these bits are 10, the DAC is powered on and active.
-----

Best Regards,
Gabriel.

[Non-text portions of this message have been removed]

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



(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )

Re: Help needed getting Aout working on LPC2468 - gabdubatti - Sep 1 13:04:06 2009

--- In l...@yahoogroups.com, "Michael J Scott" wrote:
>
> Sorry, you are right I'm designing two boards on the same project right now;
> one with an LPC2478 and the other with an STM32. Got them confused, sorry.
>
>
>
> _____
>
> From: gabdubatti [mailto:gdubatti@...]
> Sent: Tuesday, September 01, 2009 11:30 AM
> To: l...@yahoogroups.com
> Subject: [lpc2000] Re: Help needed getting Aout working on LPC2468
>
>
>
>
>
> --- In lpc2000@yahoogroups .com, "Michael
> J Scott" wrote:
> >
> > Take a look at RCC_APB1ENR Bit 29
> >
> >
> >
> > _____
> >
> > From: gabdubatti [mailto:gdubatti@]
> > Sent: Tuesday, September 01, 2009 11:15 AM
> > To: lpc2000@yahoogroups .com
> > Subject: [lpc2000] Re: Help needed getting Aout working on LPC2468
> >
> >
> >
> >
> >
> > --- In lpc2000@yahoogroups .com,
> "Michael
> > J Scott" wrote:
> > >
> > > Did you turn on the clock and enable the hardware?
> > >
> > >
> > >
> > > _____
> > >
> > > From: gabdubatti [mailto:gdubatti@]
> > > Sent: Tuesday, September 01, 2009 10:55 AM
> > > To: lpc2000@yahoogroups .com
> > > Subject: [lpc2000] Re: Help needed getting Aout working on LPC2468
> > >
> > >
> > >
> > >
> > >
> > > --- In lpc2000@yahoogroups .com,
> > "Martijn
> > > Broens" wrote:
> > > > Hi All,
> > > > I've got this routine to setup and controll the dac output on the
> > lpc2568
> > > > (bga version)
> > > > This code runs fine on the EA LPC2478 OEM board. And produces in
> > > conjuction
> > > > with the dds code from the files section a sinewave.
> > > > When I run the same code on my own hardware (but this holds an lpc2568
> > > BGA)
> > > > the code doesn't produce the output, nor can I cnagne the dac value.
> > i.e.
> > > > when measuring on the output its value remains low.
> > > > I've teste my hw by setting the io ans fast io and than toggling the
> > bit,
> > > > this workes. Than when I set the pinsel bits I can no longer toggle
> the
> > > > output so that's seems ok. But still no change in dac output. If I do
> > the
> > > > same on the ea board. All test pass.
> > > > Does anyone have any suggestions??
> > > >....
> > > > thanks martijn
> > > >
> > >
> > > Hi Martijn,
> > >
> > > Have you solved this issue?
> > >
> > > I'm having exactly the same problem as you had.
> > >
> > > P0.26 (AOUT) works fine as a PORT but not as a DAC on my own hardware:
> > > uP= LPC2468 FBD208 (rev.B) with VREF = VDDA = 3.3V / VSSA=VSS /
> > > a 10K resistor between P0.26 and VSSA.
> > > (I have mounted two boards and both have the same problem).
> > >
> > > Software runs OK on my E.A. board but when I try this simple code on my
> > own
> > > hardware I got "AOUT = 0V":
> > >
> > > //force P0.26 mode to "10"
> > > PINSEL1= (PINSEL1 & ~(3 << 20)) | (2 << 20);
> > > //set AOUT= 3.3V/4
> > > DACR= 0x4000;
> > >
> > > Any help will be appreciated.
> > >
> > > Best Regards,
> > > Gabriel.
> > >
> >
> > Hi,
> > Thanks for answering.
> >
> > The DAC module is allways enabled.
> > PCLKSEL0.PCLK_DAC = 00 (reset value) = CCLK/4.
> > I haven't seen other registers to configure the DAC behaviour.
> >
> > Best Regards,
> > Gabriel.
> >
> >
> >
> >
> >
> > [Non-text portions of this message have been removed]
> > Hi,
>
> My CPU is: NXP LPC2468 FBD208 (rev.B)
> It hasn,t the register you said (like STM32 family).
>
> This is taken from NXP user manual:
> -----
> Bits 21:20 of the PINSEL1 register (Section 9-6.2 "Pin Function Select
> Register 1 (PINSEL1 - 0xE002 C004)" on page 124) control whether the DAC is
> enabled and controlling the state of pin P0.26/AD0.3/AOUT/RXD3.
> When these bits are 10, the DAC is powered on and active.
> -----
>
> Best Regards,
> Gabriel.
>
> [Non-text portions of this message have been removed]
>

Thanks anyway.

Now I'm testing the A/D, just to check VREF/VDDA/VSSA.

Best wishes,
Gabriel.
------------------------------------

______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.


(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )

Help needed getting Aout working on LPC2468 - part 2 - gabdubatti - Sep 7 11:06:49 2009

--- In l...@yahoogroups.com, "gabdubatti" wrote:
>
> --- In l...@yahoogroups.com, "Martijn Broens" wrote:
> > Hi All,
> > I've got this routine to setup and controll the dac output on the lpc2568
> > (bga version)
> > This code runs fine on the EA LPC2478 OEM board. And produces in conjuction
> > with the dds code from the files section a sinewave.
> > When I run the same code on my own hardware (but this holds an lpc2568 BGA)
> > the code doesn't produce the output, nor can I cnagne the dac value. i.e.
> > when measuring on the output its value remains low.
> > I've teste my hw by setting the io ans fast io and than toggling the bit,
> > this workes. Than when I set the pinsel bits I can no longer toggle the
> > output so that's seems ok. But still no change in dac output. If I do the
> > same on the ea board. All test pass.
> > Does anyone have any suggestions??
> >....
> > thanks martijn
> > Hi Martijn,
>
> Have you solved this issue?
>
> I'm having exactly the same problem as you had.
>
> P0.26 (AOUT) works fine as a PORT but not as a DAC on my own hardware:
> uP= LPC2468 FBD208 (rev.B) with VREF = VDDA = 3.3V / VSSA=VSS /
> a 10K resistor between P0.26 and VSSA.
> (I have mounted two boards and both have the same problem).
>
> Software runs OK on my E.A. board but when I try this simple code on my own hardware I got "AOUT = 0V":
>
> //force P0.26 mode to "10"
> PINSEL1= (PINSEL1 & ~(3 << 20)) | (2 << 20);
> //set AOUT= 3.3V/4
> DACR= 0x4000;
> Any help will be appreciated.
>
> Best Regards,
> Gabriel.
>

Hi,

I still have problems with DAC and ADC modules on my board.
I have tested 3 CPUs and I allways get the same results.

I have checked my design and all seems to be OK
(Ethernet and external memory access is working fine).
As far as I know, for ADC/DAC operation only 3 other pins are related:
VDDA (pin 20), VSSA (pin 22) and VREF (pin 24).

I removed the noise filters from VSSA/VDDA (just in case).
My uP is an LPC2468 FBD208 (rev.B) with VREF = VDDA = 3.3V / VSSA=VSS / a 10K resistor between P0.26 and VSSA.
P0.23=AD0[0]= 3.3V/2
P0.24=AD0[1]= 3.3V/2
This is my test code:
---------------------
unsigned long newv;
newv= 0x00008000L;
DACR= newv;
printf( "\nDACR:%08X->%08X - ", newv, DACR );

printf( "PINSEL1=%08X (P0.26=%d)\n", PINSEL1, (PINSEL1 >> 20) & 3 );
printf( "PCLKSEL0=%08X (DAC=%d, ADC=%d)\n", PCLKSEL0, (PCLKSEL0 >> 22) & 3, (PCLKSEL0 >> 24) & 3 );
printf( "AD0DR0=%08X AD0DR1=%08X\n", AD0DR0, AD0DR1 );
And this is what I get:
-----------------------
DACR:00008000->00000000 - PINSEL1=0021403C (P0.26 function=2)
PCLKSEL0=55515555 (DAC clk=1, ADC clk=1)
AD0DR0=C0000000 AD0DR1=C0000000
Note that DACR dosen't change its value and allways returns 0 and
AD0DR0 and AD0DR1 complete the conversion and also returns 0.
The ADC module is in burst mode running at 4.24MHz (this works fine
in my E.A. board). The ADC is turned on (in PCONP) and the DAC is allways on.

This seems to me like an electrical or CPU problem.
I have checked these 3 pins a hundred of times with an oscilloscope
and a voltimeter.
I have also post this issue to NXP to see is my CPU have a mask problem...

Any help or idea will be apreciated.

Best Regards,
Gabriel.
------------------------------------

______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.


(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )

Re: Help needed getting Aout working on LPC2468 - part 2 - rolf_meeser - Sep 7 12:47:52 2009

--- In l...@yahoogroups.com, "gabdubatti" wrote:
> Hi,
>
> I still have problems with DAC and ADC modules on my board.
> I have tested 3 CPUs and I allways get the same results.
>
> I have checked my design and all seems to be OK
> (Ethernet and external memory access is working fine).
> As far as I know, for ADC/DAC operation only 3 other pins are related:
> VDDA (pin 20), VSSA (pin 22) and VREF (pin 24).
>
> I removed the noise filters from VSSA/VDDA (just in case).
> My uP is an LPC2468 FBD208 (rev.B) with VREF = VDDA = 3.3V / VSSA=VSS / a 10K resistor between P0.26 and VSSA.
> P0.23=AD0[0]= 3.3V/2
> P0.24=AD0[1]= 3.3V/2
> This is my test code:
> ---------------------
> unsigned long newv;
> newv= 0x00008000L;
> DACR= newv;
> printf( "\nDACR:%08X->%08X - ", newv, DACR );
>
> printf( "PINSEL1=%08X (P0.26=%d)\n", PINSEL1, (PINSEL1 >> 20) & 3 );
> printf( "PCLKSEL0=%08X (DAC=%d, ADC=%d)\n", PCLKSEL0, (PCLKSEL0 >> 22) & 3, (PCLKSEL0 >> 24) & 3 );
> printf( "AD0DR0=%08X AD0DR1=%08X\n", AD0DR0, AD0DR1 );
> And this is what I get:
> -----------------------
> DACR:00008000->00000000 - PINSEL1=0021403C (P0.26 function=2)
> PCLKSEL0=55515555 (DAC clk=1, ADC clk=1)
> AD0DR0=C0000000 AD0DR1=C0000000
> Note that DACR dosen't change its value and allways returns 0 and
> AD0DR0 and AD0DR1 complete the conversion and also returns 0.
> The ADC module is in burst mode running at 4.24MHz (this works fine
> in my E.A. board). The ADC is turned on (in PCONP) and the DAC is allways on.
>
> This seems to me like an electrical or CPU problem.
> I have checked these 3 pins a hundred of times with an oscilloscope
> and a voltimeter.
> I have also post this issue to NXP to see is my CPU have a mask problem...
>
> Any help or idea will be apreciated.
>
> Best Regards,
> Gabriel.
>

Hi Gabriel,

Have you checked the DBGEN pin already? It must be pulled high for the ADC to work (not sure about DAC at the moment).

DBGEN=0 brings the JTAG TAP in Boundary Scan mode. Everything will work normally, except the ADC(/DAC)...

Regards,
Rolf

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



(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )

Re: Help needed getting Aout working on LPC2468 - part 2 - gabdubatti - Sep 7 14:48:04 2009

--- In l...@yahoogroups.com, "rolf_meeser" wrote:
>
> --- In l...@yahoogroups.com, "gabdubatti" wrote:
> > Hi,
> >
> > I still have problems with DAC and ADC modules on my board.
> > I have tested 3 CPUs and I allways get the same results.
> >
> > I have checked my design and all seems to be OK
> > (Ethernet and external memory access is working fine).
> > As far as I know, for ADC/DAC operation only 3 other pins are related:
> > VDDA (pin 20), VSSA (pin 22) and VREF (pin 24).
> >
> > I removed the noise filters from VSSA/VDDA (just in case).
> > My uP is an LPC2468 FBD208 (rev.B) with VREF = VDDA = 3.3V / VSSA=VSS / a 10K resistor between P0.26 and VSSA.
> > P0.23=AD0[0]= 3.3V/2
> > P0.24=AD0[1]= 3.3V/2
> >
> >
> > This is my test code:
> > ---------------------
> > unsigned long newv;
> > newv= 0x00008000L;
> > DACR= newv;
> > printf( "\nDACR:%08X->%08X - ", newv, DACR );
> >
> > printf( "PINSEL1=%08X (P0.26=%d)\n", PINSEL1, (PINSEL1 >> 20) & 3 );
> > printf( "PCLKSEL0=%08X (DAC=%d, ADC=%d)\n", PCLKSEL0, (PCLKSEL0 >> 22) & 3, (PCLKSEL0 >> 24) & 3 );
> > printf( "AD0DR0=%08X AD0DR1=%08X\n", AD0DR0, AD0DR1 );
> >
> >
> > And this is what I get:
> > -----------------------
> > DACR:00008000->00000000 - PINSEL1=0021403C (P0.26 function=2)
> > PCLKSEL0=55515555 (DAC clk=1, ADC clk=1)
> > AD0DR0=C0000000 AD0DR1=C0000000
> >
> >
> > Note that DACR dosen't change its value and allways returns 0 and
> > AD0DR0 and AD0DR1 complete the conversion and also returns 0.
> > The ADC module is in burst mode running at 4.24MHz (this works fine
> > in my E.A. board). The ADC is turned on (in PCONP) and the DAC is allways on.
> >
> > This seems to me like an electrical or CPU problem.
> > I have checked these 3 pins a hundred of times with an oscilloscope
> > and a voltimeter.
> > I have also post this issue to NXP to see is my CPU have a mask problem...
> >
> > Any help or idea will be apreciated.
> >
> > Best Regards,
> > Gabriel.
> > Hi Gabriel,
>
> Have you checked the DBGEN pin already? It must be pulled high for the ADC to work (not sure about DAC at the moment).
>
> DBGEN=0 brings the JTAG TAP in Boundary Scan mode. Everything will work normally, except the ADC(/DAC)...
>
> Regards,
> Rolf
>

IT WORKS!!
That was the problem :-)
Thanks a lot Rolf!
Best Regards,
Gabriel.
------------------------------------



(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )