2003-11-02 09:39 PM
2003-11-02 09:39 PM
dear all,
I am making a ADC project, check analog data ( level 0- 255 ), level 000-063 ->> LED1 off LED2 off level 064-127 ->> LED1 off LED2 on level 128-255 ->> LED1 on LED2 off I have reference the example from indart, but I dont know how to handle the range determination is better. Please recommend some simple method, Is it the following okay ? please advice, thank you very much eg) .CHECK_3_LEVEL LD A , ADCDR LD VALREAD , A LD A , #$20 SUB A , VALREAD JGURE RANGE_000_063 LD A , #$40 SUB A , VALREAD JGURE RANGE_064_127 LD A , #$80 SUB A , VALREAD JGURE RANGE_128_255 JP CHECK_3_LEVEL