Hi everyone,
I started playing with Grace today and so far I've understood how to use it for Timers, UART, GPIO… but I'm having troubles setting up the ADC10 (I am using a MSP430G2553). I would like to periodically read a value from one pin (any) with the ADC10 and send it to another device over UART. I did some independent tests and I got the UART working fine.
For doing this, it seemed to me that the best setting was the "Single-channel Repeated conversion" described in the Grace how-to. The steps are the following:
- Enable the ADC10 and select the Power User View
- Select single channel and repeated conversion mode on ADC channel 0 and enable the external GPIO pin as needed (not clear to me...)
- Select a timer in the ADC Trigger source and configure the respective Grace timer module to generate a PWM signal
- Enable Automatic Data Transfer and specify the memory start address and a block size
- Enable the Analog to Digital Converter Interrupt. You can insert your custom ISR code inside ADC10_ISR_HOOK in src/grace/InterruptVectors_init.c