/* file: chop.c project: oLogic description: Chop line display mode (staircase) written by : Michael Bradley Changelog: 08/01/09 separate chop/alt source files */ void showTracesChop(void) { output_c(TRACE_FLOOR); // create trace floor (10/01/08) delay_us(traceWidth); //v1.1 not needed, overhead before loop works fine tracePos = TRACE_BEGIN; portData = input_b(); // read data from port B output_high(SYNC_OUT); for (bitTest=0; bitTest < showTraces; bitTest++) { traceData = 0; // v1.1 by testing bit 0, instead of bitTest, then >>1 data // we reduced decreased loop time in half if (bit_test(portData,0) == 1){ traceData = TRACE_HEIGHT; } portData = portData >> 1; // v1.1 buy passing the addition in the output_c, saved 10uS output_c(tracePos + traceData); delay_us(traceWidth); tracePos += TRACE_SPACING; } output_low(SYNC_OUT); }