2009-02-10 04:27 AM
ST7 39 Serial TX using interrupt
2009-02-09 01:32 AM
Hi all
I am writing a serial routine in assembler to TX some data using SCI. if I use the code in AN969 which is just a loop it works ok. But I want this to work with interrupts i.e. Send byte Do something When byte sent, send next byte The problem I am having is that whenever I set the TIE bit then the code jumps straight to the interrupt and stays there. Does anybody have any code they could send me or point me to some other examples? Re Brian2009-02-09 04:23 PM
Hello Brian.
I have an example of what you ask. You can download this example from http://sourceforge.net/projects/uants4home On the cvs repository, there is the uAnthill project that uses a ST7FLite39 to ''talk'' with a PC with CTS/RTS hardware flow control. The RS-232 link uses SCI and iterrupts. The PcLink.asm source file contains the SCI interrupt handler (SCI_INT) and the external interrupt (CTS_INT) that manages the CTS line which the PC raises when its receive buffer is full. Regards EtaPhi2009-02-10 04:27 AM
Thanks
So as I have found as soon as you set the TIE flag it jumps to the interrupt You then load you data into SCIDR and Reset Int RIM keep doing this untill yoyr TX buffer is empty? Does this sound correct Re Brian