In SX Microcontrollers, SX/B Compiler and SX-Key Tool, kmonsx wrote: [quote="Guenther Daubach"] For now, I think you should consider to let the ISR do the job of shifting the eight bits into a register (like a serial UART receiver). When the eight bits are complete, the ISR sets a flag for the main program that it is time to fetch that byte. The main program then reads the byte, transfers it to the PC, and finally clears the flag again. As I said before, give me some time to have a look at your code, and I'll be back here again.[/quote]Hi again. Yeah, that's basically how my program works. The ISR shifts them in, and increases a byte variable for each bit, when main detects that 8 bits are ready to go, it ships the byte to the PC. There's no real need to notify the ISR that the shifter variable is ready to be written again, because the drive just keeps pumping data, the ISR *has* to be ready to write a bit at any time(well at least one bit per 2us.) Since main is so small, grabbing the byte and sticking it on the port takes something on the order of hundreds of ns at the most --- and would happen as soon as the ISR exited from processing the 8th bit. Thanks for taking a look. Keith ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=78490#m78558 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2005 (http://www.dotNetBB.com)