looks like Adc periphery is not working in parallel with uC

Discussion in 'Embedded Systems and Microcontrollers' started by arry, Jun 30, 2010.

  1. arry

    Thread Starter New Member

    Apr 2, 2010

    I have a pic18f4550 and an Lcd 160x80. I have made an oscilloscope which
    functions ok.

    I tried to improve my architecture by refreshing the LCD every 80ms. The adc fills a static buffer in an interrupt with measured values. The idea is the Adc to work in parallel with the uC which is redrawing the Lcd screen, no matter whether the whole static buffer has been filled with values or not.

    The result is that some of the sine signals look cut in half. As if the Adc periphery stopped working for a short time. But the Adc measures constantly.

    I have not put any critical sections in the redrawing routines, but all they do is
    read the measurement buffer. Anyway I could try it.

    Any ideas ?
  2. retched

    AAC Fanatic!

    Dec 5, 2009
    If you change the refresh rate to 100ms is there a difference?
  3. arry

    Thread Starter New Member

    Apr 2, 2010
    it is my mistake. I had forgotten the triggering of Adc in uC logic.
    I shall put it in a Timer overflow interrupt.