In SX Microcontrollers, SX/B Compiler and SX-Key Tool, g_daubach wrote: Frasse, unfortunately, there is a typo in my book text and in the TUT40.SRC code. You are right, for 9600 Baud, the definition of start_delay must read 32+16+1 instead of 16+8+1 (which is the definition for 19,200 Baud). Besides this, I'm using a similar code in many of my own applications without having problems. For a step-by-step start, I'd recommend that you first test the transmitter code, i.e. comment out the receiver code in the ISR, as the transmitter is the easier part. When you have attached a MAX232, make sure that the SX pin driving the MAX232 transmitter input is initialized to high at reset. Tthis will let the MAX 232 output a negative (idle) signal on the associated TxOut pin. In the ISR, don't invert tx_low.6, as shown in line 12 of TUT40.SRC. When setting up for transmitting, like shown in send_byte (lines 32, ff. in TUT40.SRC), don't invert the byte to be sent (i.e. comment out the "not w" instruction at line 35), and simply clear tx_low, instead of setting bit 7, as shown in line 37. For a first test, I would let the main program run in a loop, checking tx_count. When tx_count holds zero, the transmitter is no longer busy, so you can prepare it to send a new character. Move some ASCII code into tx_high (e.g. $41 for 'A'), clear tx_low, and finally set tx_count to #10.. Then re-enter the loop waiting for tx_count to reach 0. This should send out a continouous string of characters. When you have connected the MAX 232 to a PC's COM port, you should be able to verify this with HyperTerminal, or any other terminal program. This is the way how I test serial output from the SX, and I hope it works for you as well. ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=155203#m155340 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2006 (http://www.dotNetBB.com)