For users of the Atmel AT91SAM7 and AT91SAM9 ARM CPU chips. Atmel has taken a new direction by combining on chip flash and ram with the ARM CPU on a single die. This provides low cost devices for small systems using the ARM CPU.
This group is to exchange information to help users get started and learn how to use the devices.
Hi all,
I am trying to read some analog values from "Touch Screen ADC
Controller" of AT91SAM9RL64..
My initialization is as follows:
AT91C_BASE_PMC->PMC_PCER = (1 << AT91C_ID_TSADC );
AT91C_BASE_TSADC->TSADC_MR = AT91C_TSADC_PENDET |
( (23
<< 8 ) & AT91C_TSADC_PRESCAL ) |
( (11 <<
16) & AT91C_TSADC_STARTUP ) |
( (15 << 24)
& AT91C_TSADC_SHTIM ) |
AT91C_TSADC_PENDBC;
AT91C_BASE_TSADC->TSADC_CHER = 0x00000007; // Channel 0-1-2
enabled
AT91C_BASE_TSADC->TSADC_CR = AT91C_TSADC_START;
But the problem is, the conversion is only done once.
I am doing
AT91C_BASE_TSADC->TSADC_CDR0 & AT91C_TSADC_DATA0;
AT91C_BASE_TSADC->TSADC_CR = AT91C_TSADC_START;
At the first read, the correct data is in the data register. But next
time, the same data is there. No conversion is done..
Is there something else that I need to initialize or need to do after
reading the data?
Best Regards,
Bekir

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