Page 1 of 1

Serial PCI Card or Adapter?

Posted: 13 July 2011, 6:33 AM
by liam.zbasic
My Dell desktop with Windows XP finally died. I'll likely purchase an Intel-based 64-bit PC with Windows-7, but I noticed serial ports are no longer included.

I plan to buy a serial PCI card, but concerned with compatibility issues. Am I better off with a serial-to-USB adapter?

Re: Serial PCI Card or Adapter?

Posted: 13 July 2011, 7:43 AM
by dkinzer
liam.zbasic wrote:I plan to buy a serial PCI card, but concerned with compatibility issues.
I've been using a two-port CyberSerial PCI card in my PC for several years with no problems. I would aver that there will be fewer compatibility/performance issues with PCI serial cards as a class than there will be with USB-Serial adapters. If you do opt for the USB-Serial adapter, I would recommend getting one based on the FTDI chipset. If you search the ZBasic Forum you'll find reports on other adapter/chipset brands that work.

Posted: 13 July 2011, 8:04 AM
by liam.zbasic
My preference is definitely the PCI card for speed. Are you running Windows-7? Did your system recognize the device or was a driver required? Thanks.

Posted: 13 July 2011, 19:04 PM
by stevech
If you need just one serial port, I'd suggest choosing a product which internally is based on an FTDI chip - because FTDI's Windows/Linux drivers are bug-free.

If you need several serial ports, I've long used the Edgeport boxes; they're driver software actually works properly! Not so most of the cheap stuff from over there. The Edgeport USB/serial boxes can be found on eBay as a rule.

Posted: 14 July 2011, 21:31 PM
by dlh
I've used both with a 4-port and an 8-port PCI card and with many USB/serial adapters. As Don noted, you get higher speed this way because USB adapters need to translate from serial->USB & vice Versa on both ends. The delay is readily apparent with something like downloading to a ZX chip.

I've used USB with FTDI, Prolific and Silicon Labs chips. All have drivers for Windows/Linux/OSX and I've had no issues with any. But, a large part depends on the manufacturers who do not always do things as they should.

IIRC my PCI card needed drivers prior to Windows 7 but 7 found drivers on its own.

Whichever way you go I recommend http://www,byterunner.com They know what they are doing and you can trust what they say.

Posted: 15 July 2011, 10:57 AM
by liam.zbasic
All, thanks for your responses.

I ordered the CyberSerial Dual PCI-express card (JJ-E10D11-S3) a few days ago per dbkinzer's recommendation.

Its for a Windows-7 64-bit desktop (HP).

Posted: 18 July 2011, 22:45 PM
by liam.zbasic
CyberSerial PCI card arrived today and I just installed it on my Windows 7 64bit HP - the enclosed instructions were clear and straightforward. Only issue was the ZBasic IDE serial port options window did not see the COM ports. After rebooting the PC, all was fine.

I powered a simple circuit involving a ZX-40n device and it correctly streamed ADC data to the IDE.

Problems:

1) I tried re-compiling the simple ADC data streamer program but the IDE (under Device Options) would not let me change the Target Device from ZX24 to ZX40n - the "Edit Target List" did not function properly. Nor did the "Option TargetDevice ZX40n" statement in the program. Running the 'Auto-select Device' fixed the problem - it added "ZX40n" to the device list.

2) The simple program compiled but generated the following error:

Code: Select all

>"C:\Program Files (x86)\ZBasic\zbasic.exe"  --target-device=ZX40n --directory="C:\$projects\zbasic2\gbot90b\mcu/" --project="xxx.pjt"
"C:\Program: Interrupt/Exception caught (code = 0xc00000fd, addr = 0x4217b3)
Error: one or more errors occurred in the back-end build process for "xxx.zxb"
>Exit code: 1
This program compiled before on my Windows XP system, and I never seen that cryptic error message. Your help is appreciated. For now I'm stuck in the mud.

Here's the simple program for reference:

Code: Select all

option TargetDevice ZX40n
option base 1

' INITIALIZE CONSTANTS
'-------------------------
public const  trun        as single = 10.0   ' Run Time
public const  vref        as single = 5.18   ' ADC reference voltage


Sub Main()

   dim ii as long, ival as Integer, tmp as single
   dim hour as byte, minute as byte, sec as single
   dim tsec as single, told as single, dt as single
   dim accelg as single, rawg as single

   call putpin(21,1)    
   delay(1.0)
   call putpin(21,0)    
   delay(1.0)
   call putpin(21,1)    


   ' MAIN PROGRAM LOOP
   '-----------------------
   call gettime(hour, minute, sec)
  
   tsec = sec
   told = sec
   dt   = 0.0
   ii   = 0
   
   do while tsec <= trun
	  ii = ii+1

	  call gettime&#40;hour, minute, sec&#41;

	  call getadc&#40;37,tmp&#41;
	  accelg = tmp*vref
	  	  
	  tsec = csng&#40;minute&#41;*60.0 + sec
	  dt   = tsec - told

	  debug.print tsec & " " & accelg

	  told    = tsec
	  
'	  delay&#40;0.5&#41;
   loop

   debug.print "Done."
   
   call putpin&#40;21,0&#41;    ' LED Active OFF

End Sub


Posted: 18 July 2011, 23:27 PM
by dkinzer
liam.zbasic wrote:This program compiled before on my Windows XP system, and I never seen that cryptic error message.
This is a known problem caused by the IDE having been installed in a directory whose path contains parentheses. (It's actually an issue with the backend compiler and not the IDE itself.) You can avoid the issue by uninstalling and reinstalling in a directory path that does not contains parentheses.

See http://www.zbasic.net/forum/about1357.html for an earlier report of the same problem, particularly the last two posts of the thread.

Posted: 18 July 2011, 23:33 PM
by liam.zbasic
You responded just before I corrected my issue.

Yes, the simple ADC program is functioning correctly after re-installing the IDE in the "C:\Program Files" directory as opposed to the Windows 7 64-bit default of "C:\Program Files (x86)".

I suspect this will happen frequently once users start upgrading to 64-bit computers.