Reply To: "Simon Redwood" X-Mailer: ELM [version 2.4ME+ PL60 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit I too am having a bit of an nightmare trying to use the seral and paralle ports for a programmer under Windows. Dos/Unix works great, but Win9x is a real mare. If you could possibly also send me those snippets, I would be most grateful. Thanks in advance, Simon > If you're writing a WIN application, you probably want to look at > CreateFile, ReadFile() and WriteFile() instead of _inp(). VC++ has > documentation on these. Contrary to what it says, you do not need to write a > threaded application; i wrote a serial port programmer for an ADuC812 using > these functions and polling at 9600 baud. I can send you code snippets for > opening the file, reading, and writing if you want. That will give you > something to base your stuff on. > > > > -----Original Message----- > > From: sam woolf [mailto:samw@COGS.SUSX.AC.UK] > > Sent: Tuesday, July 10, 2001 8:56 AM > > To: PICLIST@MITVMA.MIT.EDU > > Subject: [OT]:serial port communication > > > > > > I'm having a bit of a nightmare doing serial port > > communication between a computer and a 16f84. The pic is > > sending data at 19200 baud to the computer. I have been using > > a c program based on craig peacock's at > > www.beyondlogic.org/serial/termpoll.c . But unfortunately I > > am losing significant amounts of data. I think this is > > because the code needs to be interrupt driven but I can't get > > the interrupt driven version > > (www.beyondlogic.org/serial/buff1024.c )to work... My > > compiler does not like the weird pointer-to-function or > > whatever it is stuff going on with the interrupt function and > > I cant get my head around what its supposed to be doing > > either... I'm using microsoft visual c++ 5.0 and have already > > had to make several adjustments such as changing all the > > inportb()s to _inp()s... does anyone know what I need to do > > to make this work, or does anyone have any simple to > > understand and working microsoft visual c++ 5.0 code for > > doing interrupt driven serial comms?? I know this is slightly > > off topic but I am at my wits end!! > > SW > > > > -- > > http://www.piclist.com hint: To leave the PICList > > mailto:piclist-unsubscribe-request@mitvma.mit.edu > > > > > > -- > http://www.piclist.com hint: To leave the PICList > mailto:piclist-unsubscribe-request@mitvma.mit.edu > > -- Regards, Simon { ICQ#: 12226096 } { Email: spredwood@sri-net.demon.co.uk } { Internet: www.sri-net.demon.co.uk } -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu