CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

ex_usb_serial2 no communication

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
crystal_lattice



Joined: 13 Jun 2006
Posts: 164

View user's profile Send private message

ex_usb_serial2 no communication
PostPosted: Mon Jan 19, 2009 2:34 am     Reply with quote

I've been playing with the usb examples and got all except the "virtual com port" ones to work. I use a 18LF4550@20MHz crystal and no usb sense pin. When it connects to the pc it requests a driver and i point it to the "picc\drivers\" folder where it finds the INF.

Selecting either one of the ccs inf files requires an aditional file "ccsport.sys" which windows XP SP2 nor me could locate. If i select a generic windows "oem29.inf", which is also listed as an option, it installs fine.

Problem is that when i open SIOW, hyperterminal or bray++ terminal and 'connect' to the newly created port, nothing happens. I've included two lines of code to turn on leds connected to spare pins as shown below.
Code:

if (usb_enumerated()) (
output_high(pin_a2);
printf(usb_cdc_putc,"Hello World");
output_high(pin_a3);


As soon as i select 'connect' in bray++ terminal, both leds light but nothing apears in the terminal window. I suspect it could be the driver, but can not use the ccs inf due to the missing "ccsport.sys" file.
Ttelmah
Guest







PostPosted: Mon Jan 19, 2009 3:55 am     Reply with quote

Start, by copying the inf files into a different directory, and only put the _one_ you are going to use in there. The XP (and Vista) installs, have an (annoying) habit, of actually selecting the wrong file, if all are sitting in the directory together.
Now, if you open the .inf files, and look at them (they are only text files), you will find that the only one that refers to 'ccport.sys' (not ccsport.sys), is the one for Windows ME/98!... So it is this one that is being selected. :-(
There are two useable install files for XP. I'd use the second one now, which is the file 'CDCNTXPVista.inf'. Put this in a directory on it's own, and install this.
OEM29.inf, is _not_ a 'generic' driver. In XP, as you install drivers for devices, the text files accessing these drivers (for some annoying reason, MS, insists on calling these 'drivers', though they are not), are copied into the .inf directory, and renamed to OEMxx.inf. So this (given the quite high number), is a fairly recent install, and is probably a copy of one of the CCS files. However whether it is a copy of the _right_ CCS file, is open to question.
Now, 'enumeration', takes place as soon as a driver is identified and loaded. This is well _before_ hyperterminal wll be connected. Hence your message will be lost. Use a call to 'usb_cdc_connected' instead, which will only go 'true', once hyperterminal actually opens the port, and sets the line coding.

Best Wishes
crystal_lattice



Joined: 13 Jun 2006
Posts: 164

View user's profile Send private message

PostPosted: Mon Jan 19, 2009 5:54 am     Reply with quote

Thanx, I tried the "inf file in own directory" approach but no luck, it installs like in the past, no ccport.sys required, but not working. I also looked at your other comment regarding the enumeration. Above the line i quoted is another line:
Code:

while(!usb_cdc_connected()) ()


and then a do...while loop which contains the previous portion of code as posted in my first post. Thus once the port is "connected" will the enumeration test be performed (or should i say, checked again) and the leds light up. All this happens except that no text is displayed???

As said before, all the other examples work except these two...

Not wanting to jump the gun too far, but was wondering if someone could comment on the best suited solution for fast data/realtime data transfer from pic to pc.

I want to make a small logic analyser and from the little that i have read, the HID has limitations regarding the packet sizes and that the pc has to poll the pic which will not ensure realtime transfer. The UART method will probably also have some limitations as i have not seen any such devices use the usb connection as a virtual com port.

I've read somewhere that one can do raw data transfer, but have no idea of how it works. The other option would be to buffer the samples in the pic/ram and then transfer it to the pc on regular intervals using uart. Any suggestions are welcome.
crystallattice
Guest







PostPosted: Tue Jan 20, 2009 1:28 am     Reply with quote

I've even tried the code on new hardware, and no luck. Is there maybe another inf I could try or someone else who got it to work and could give some advice?
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group