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_serial windows 'SERIAL DEMO' driver needed ?

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



Joined: 01 Jul 2010
Posts: 9162
Location: Greensville,Ontario

View user's profile Send private message

ex_usb_serial windows 'SERIAL DEMO' driver needed ?
PostPosted: Wed Oct 19, 2011 1:52 pm     Reply with quote

Ok, taking a big leap and trying to use an 18F4550 in USB mode. Program the PIC fine, connect to PC, terminal program shows boot message, then loops forever 'USB connected, waiting for enumaration...


USB disconnected, waiting for connection... '

In the meantime,Windows(XP pro) is wanting a driver for the 'SERIAL DEMO' that it magically found.

I've seached the forum,but can't seem to find what I think I need..

Can someone please help an old DOS guy ,and show me what I need to get this to run?
It was a lot simpler 20 years ago, sigh...
ezflyr



Joined: 25 Oct 2010
Posts: 1019
Location: Tewksbury, MA

View user's profile Send private message

PostPosted: Wed Oct 19, 2011 2:05 pm     Reply with quote

Hi,

Does the Windows 'Found New Hardware' wizard pop up when you plug in the device? Windows has a default 'CDC' driver that will be used with the CCS firmware. You just need to use the cdc_NTXP.inf file (found in the 'Drivers' directory) to point Windows to the correct driver. You just need to specify this .inf file with the Found New Hardware wizard.

John
temtronic



Joined: 01 Jul 2010
Posts: 9162
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Wed Oct 19, 2011 2:19 pm     Reply with quote

well that makes sense ! Found the driver,and installed.
Now it gets to the message...
USB enumerated by PC/HOST
...then just does 'nothing'.

I expect to type on the PC keyboard while in the terminal program and see it 'echo' onto the screen. RealTerm indicates data is sent to PIC but nothing comes back...

progress is slow, but more help is needed....

thanks
ezflyr



Joined: 25 Oct 2010
Posts: 1019
Location: Tewksbury, MA

View user's profile Send private message

PostPosted: Wed Oct 19, 2011 2:48 pm     Reply with quote

Hi,

Take a look at the Windows device manager and see if there is an entry for 'USB-to-Uart (COMXX)' under Ports (COM & LPT)? Open a terminal program using the specified COM port, and you should see a sign on message coming over the USB virtual COM port. Does that work?

I haven't used the UART portion of the CCS sample code, I went right to the USB portion. I used this modified code to toggle an LED based on several keystrokes I typed on the USB virtual COM port. Does this work?

Code:


   while (TRUE) {
      usb_task();
      usb_debug_task();

      if (kbhit()) {
         c=getc();
         if (c=='\n') {usb_cdc_putc('\r'); usb_cdc_putc('\n');}
         if (c=='\r') {usb_cdc_putc('\r'); usb_cdc_putc('\n');}
         else {usb_cdc_putc(c);}
      }
      if (usb_cdc_kbhit()) {
         c=usb_cdc_getc();
         if (c=='\n') {putc('\r'); putc('\n');}
         if (c=='\r') {putc('\r'); putc('\n');}
    if (c=='t') output_high(Pwr_LED);
    if (c=='q') output_low(Pwr_LED);
         else {putc(c);}
      }
   }



John
temtronic



Joined: 01 Jul 2010
Posts: 9162
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Wed Oct 19, 2011 4:08 pm     Reply with quote

Thanks for the help..... seems the usb-uart went to COM4 ! So my hard comport is COM1, USB 'comport' is COM4.
Once I got the right sequence of plugging in the 'USBPIC' testboard, and opening the 2 terminal programs it does WORK !!

thanks for the guiding hands...this 'new' stuff can be very frustration to an old DOS guy like me !

cheers
ezflyr



Joined: 25 Oct 2010
Posts: 1019
Location: Tewksbury, MA

View user's profile Send private message

PostPosted: Wed Oct 19, 2011 7:09 pm     Reply with quote

Hi Temtronic,

I guess your experience proves that an 'old dog' can learn new tricks Laughing !

Coincidentally, I just went through this same process a few weeks ago! I've been taking baby steps towards USB (using FTDI chips) for a few years, and recently I finally bit the bullet, got the PCH compiler and prototyped a 18F2550 circuit for my tests. Frankly, I could not believe how easy it was to get up and running with USB with CCS 'C', and I'm now in the process of redesigning a half dozen products with USB capable PIC's!

John
temtronic



Joined: 01 Jul 2010
Posts: 9162
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Wed Oct 19, 2011 8:26 pm     Reply with quote

Sounds like we're in the same boat, you're just in first class and I'm still in steerage...!
Ever since 'they' got rid of REAL comports on computers it's been an uphill fight.
I'm seriously going to give CCS a call about making my 'does-it-all-in-one' board. They're USB/4550/VNC1l is very close to what I need now and for 99% of future needs. I'd rather pay for 'overkill' now than have to redo it again 6 months from now when clients say' can you add this, or how about a couple more LEDS'.
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