Hi there, I have a very simple thing I would like to do. I have an ultrasonic rangefinder connected to the ADCINA0 port of my 28035 MCU. The rangefinder outputs a voltage level (0 to 3.3V) depending on how close the nearest object is. I would like to program the MCU so that, when I ask it to, it samples this voltage once and returns the value. A couple specifications about this:
1.) I don't need oversampling. The rangefinder isn't precise enough to need it. (Though I suppose if it's super simple to implement it certainly wouldn't hurt.)
2.) I have plenty of time to be able to wait for the ADC data. I would much rather not use interrupts to handle this. Instead, I'd like to just wait for the data to be ready before moving on.
I'm just having trouble cutting through all the bells and whistles that the ADC peripheral offers to get at what I consider to be a super simple task.. If someone could give me an idea of what registers to set, I'm sure I could take it from there with the code.
Thanks!
--Daniel