Atari BadSector "A" Project Diary

Atari Logo

March 2001

Sun 25-Mar-2001

Time to start on the Atari SIO interface code. The intention is to use the falling edge of the Clock Out to generate an interrupt, at which time the Data Out value is sampled and a byte value created bit by bit.
There isn't any board space left on the circuit board, so for the moment I will use flying leads which connect to the SIO connector on the PIC LCD project circuit board.
The first code just increments a variable when INT0 goes low. I am using the T0 and T1 port bits as outputs. I toggle these pins to see what is happening in the interrupt code. I use my 60MHz Hitachi scope to view the SIO header waveforms and the response of my software on T0 and T1.

Tue 27-Mar-2001

Continue to play with interrupts. Reserve register set #1 (RAM locations 8 to 15) for interrupt function use. I can print out the number of interrupts. I setup my Atari 130XE and 1050 floppy drive and chain the PIC LCD project board SIO connector. Flying wires for ground, Command and Clock Out allow the interrupt routine to be tested. I can print the number of interrupts which happen.
I load up BUG65 in order to allow me to read sectors using the R% command.
I am starting to realise that interrupting on a bit to bit basis leaves very little time to execute the interrupt code. Since a state variable is been checked and updated I suspect that some interrupts are being lost. I am expecting a fixed number of interrupts per header packet, but this number is not stable. Looking at the machine code generated from the C code I can see that the interrupt routine might be too slow.

Thu 29-Mar-2001

The interrupt routine is re-coded in machine code only for speed. I have also discarded the interrupt per bit method. I will now interrupt on the falling edge (start bit) of the Data Out wire and then use software delays to grab all the remaining 8 bits and form into a byte value. I need to use my 60MHz scope to monitor the SIO waveforms in order to get the timings correct. Each bit is about 52us. Once again I use T0 and T1 to show how the interrupt routine ties up with the SIO Data Out signal. T1 toggles at the exact point that I sample the data.

Return to Atari Projects home page