Commit Graph

3 Commits

Author SHA1 Message Date
Markus Hitter 7805e741cd analog-arm.c: read not by ADC channel number, but by Teacup number.
Analog reading should be complete by now :-)
2015-08-12 14:26:37 +02:00
Markus Hitter 708289714f analog-arm.c: use configured analog pins, not two fixed ones.
An obvious neccessity, just not done before to show better how
stuff works.
2015-08-12 14:26:37 +02:00
Markus Hitter f81000a4b6 ARM: implement analog-arm.c.
Very simple, because the LPC1114 features a hardware scan mode,
which automatically scans a given set of pins in freerunning mode
and stores all the values separately. No need for an interrupt!

Not yet done: configure not PIO1_0 and PIO1_1, but the pins
actually defined in the board file.

For testing, add this to ifclock(clock_flag_1s) in clock.c:
  uint8_t i;

  for (i = 0; i <= 7; i++) {
    sersendf_P(PSTR("%lu "), analog_read(i));
  }
  serial_writechar('\n');

This should print all 8 ADC values repeatedly. Only two pins are
actually set up, these values should change depending on the
thermistor temperature. More precisely: depending on the voltage
on the pin.
2015-08-12 14:26:37 +02:00