Index: par.c =================================================================== RCS file: /cvsroot/avrdude/avrdude/par.c,v retrieving revision 1.6 diff -u -w -r1.6 par.c --- par.c 3 Jan 2004 18:04:54 -0000 1.6 +++ par.c 24 Jan 2004 22:54:13 -0000 @@ -232,12 +232,6 @@ for (i=0; i<8; i++) { b = (byte >> (7-i)) & 0x01; - /* - * read the result bit (it is either valid from a previous clock - * pulse or it is ignored in the current context) - */ - r = par_getpin(pgm->fd, pgm->pinno[PIN_AVR_MISO]); - /* set the data input line as desired */ par_setpin(pgm->fd, pgm->pinno[PIN_AVR_MOSI], b); @@ -245,7 +239,15 @@ * pulse the clock line, clocking in the MOSI data, and clocking out * the next result bit */ - par_pulsepin(pgm->fd, pgm->pinno[PIN_AVR_SCK]); + par_setpin(pgm->fd, pgm->pinno[PIN_AVR_SCK],1); + + /* + * read the result bit (it is either valid from a previous clock + * pulse or it is ignored in the current context) + */ + r = par_getpin(pgm->fd, pgm->pinno[PIN_AVR_MISO]); + + par_setpin(pgm->fd, pgm->pinno[PIN_AVR_SCK],0); rbyte = rbyte | (r << (7-i)); }