On Sun, 6 Jan 2002, John De Villiers wrote: > Greetings > > Im in the process of trying to code a plugin for misim DE that does serial > ( Receive ) comms. Transmit will come later, have to get my head around java > first. > > Anyways, I can never remeber the polarity issue. > > When i use a pic ( 16f84 ) to talk rs232 via a max232 or similar level > translator, does my "1" bit have to be ttl high or ttl low ? I know the > serial line uses high for 0 and low for 1 and idle is 0 ( high line states ) > and start is 1 ( low line state ) > > Also, besides actually catching the transmitted bytes and displaying them > what other "features" should i add to the plugin? > > I was thinking of : > > 1) Checking the pluse lenghts to check for possible overruns > 2) Baud rate to be wholy user settable, even allowing rates that a PC cannot > do ) > 3) Parity checking > 4) Option to look for 9-bit addresses > 5) Option to select transmission via max 232 type or "direct drive" > 6) Any Speed Processor I've written a module to do this for gpsim: http://www.dattalo.com/gnupic/gpsim.html. It's written in C++ instead of Java, but it might can serve as a starting point. Check out the source in gpsim's CVS repository: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/gpsim/modules/ Unlike other gpsim modules, the usart module lacks a gui interface. As a consequence it's somewhat difficult to use. For example, the bit streams are dumped in ascii art (__--_-__-) and the byte streams are dumped as raw hex. However, I've used it to actually debug the gpsim usart simulation engine. Scott -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu