Hi David, look below for a very FAST routine to draw on your picture box. Your problem is with thr PlotXY function. Try this routine and you will see how fast it is. Put the value you want to lot in pixelval And Roman, yes, you can do very fast port read in Windows with Delphi! ------- begin -------------------- var line: PByteArray; j,line: integer; Bmp: Tbitmap; begin Bmp:=Image1.Picture.bitmap; Bmp.PixelFormat:=pf8bit; Bmp.width:=400; Bmp.height:=280; for line:=0 to 279 begin line:=PByteArray(Bmp.Scanline[line]); for j:=0 to 399 do begin line[j]:=pixelval; end; end; -------------- end --------------- Friendly Regards Octavio Nogueira =================================================== nogueira@propic2.com ICQ# 19841898 ProPic tools - low cost PIC programmer and emulator http://www.propic2.com =================================================== ----- Original Message ----- From: "David Pearson (SKYTRONICS)" To: Sent: Wednesday, December 27, 2000 3:17 AM Subject: [PIC]: PIC data via PC parallel port to screen > Hi, > To all the PC programming experts a couple of questions. > I'm transferring data from a CCD image sensor for display on a PC via the > parallel port. Works fine, 8 bit gray scale. 400 x 280 pixels. I'm using a > F877 to transfer data to the PC using the parallel port in Bi-directional > mode. On the PC end, I'm using Delphi 5 with my own Assembly Portin, > Portout, Porttest routines. Plotting pixels using the Plotxy functions. > > The problem, it's very slow. It takes ~12 seconds to plot a frame on a > Pentium 120. From what I've read, the maximum toggle rate I can expect on > the parallel port is 500 nsec to 2 usecs, depending on what you read. Even > so, I'm seeing times between setting a bit on the parallel port by the F877 > to the time the PC recognizes the signal of about 15 usecs. Also, the > plotting routine itself is slow, about 6 seconds to plot the 400 X 280 frame > when plotting a test grayscale pattern, no port IO, just incrementing the > plot value. > > Does anyone have any ideas on how to speed things up? I need a Windoze > 95/98 environment using either Delphi or VB. > Any ideas on how to speed up the data transfer? Faster portIO? Faster > Plotting in Delphi? > It seems crazy to me that my $5.00 PIC has to wait for a 120 MHz machine to > do data transfers. Is the Windoze environment that inefficient? > > Any ideas and help is appreciated and may be useful to other group members. > > -- > 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