Modification EZ-Kit lite
by Michael Keller
(DL6IAK)
This modification enables the direct acces to the seriell interface of the EZ-Kit from the user program. Normally the 16550 seriell interface causes IRQ2, which branches into the hostmode program in the EPROM. Communication therefore is only possible using the protocol specified in the docs. The proposed modification links the IRQ2 to the IRQ1 line, so both interrupts exist. The user has to disable the interrupt IRQ2:
interrupt( SIG_IRQ2, SIG_IGN);
this disables the control of the hostmode program over the seriel interface.
After initializing the 16550 (in the example to 9600/8N, further information how to initialize the 16550,
look to the datasheet )
(* (int *) 0x00402003) = 0xff; //set DLAB
(* (int *) 0x00402000) = 120; //DIVISOR LSB 9600 Baud
(* (int *) 0x00402001) = 0; //DIVISOR MSB
(* (int *) 0x00402003) = 0x03; //1StOP 8 Daten NoParity
the user program gets controll via the statement
interrupt( SIG_IRQ1 ,rs232_empf);
rs232_empf is an user written interruptroutine, which handles the incomming datastream.
If you reset the board, normal operation is guarantied, so downloading with the diag21k is no problem. There are some error messages possible after starting the program with PS, because, after disabling IRQ2 diag21k has nomore controll over the board. You can handle this, by waiting to disable the IRQ2 until the flag button S1 is pressed or using a time delay to disable IRQ2.
Just connect PIN2 of IC U6 to PIN3 .Thats all, the board works like before, the only difference is IRQ1 is also used by the seriel Interface.