Simon,
Yes, the files are accessible. I was trying to click on the wrong links. I finally found the links that take you to the code. Thanks,
As for the processor hanging. After code inspection and reading the manual, I discovered that I had forgotten to turn on the power to the A/D secton via the PCON register. Once I did this, the processor quit "hanging" during read of registers.
I have read your response above about the ADGDR and ADDRn registers. I have been playing around with different means of using the A/D and have come to the point where I cannot seem to ever get the DONE and OVERRUN bits to clear. I have slowed the clock down significantly and put in consecutive reads and I always end up with a "0xC" in the most significant nibble. Have any advise here?
Ultimately what I am trying to accomplish the ability to sample 1-6 A/D channels at a designated rate. So far, the only way I can determine one might be able to accomplish this on the LPC1768 is as follows:
- Set up A/D to scan specific channels, running at a 12MHz clock rate (to maximize the clocking rate of the 65 conversion clocks)
- Set up a counter to interrupt at the desired sample rate
- Utilize an Interrupt to read the n channels.
Ideally I would prefer the unit to be able to trigger a scan at a designate rate, and have DMA move the converted samples into memory. The the application could just take care of managing the DMA and processing of the acquired data. But it doesn't look like the LPC1768 supports this type of acquisition.
Russ
Hello, I'm developing an IMU board and have some questions about the library internals.
My question is if each time that I call to "read_u16()" the value that the functions returns is readed in that moment (normalized from 12 to 16 bits) from the input voltage, or if the library sets up a continuous DMA sampling with decimation and downsamplig to reduce noise and increment resolution.
Thanks.