View previous topic :: View next topic |
Author |
Message |
temtronic
Joined: 01 Jul 2010 Posts: 9221 Location: Greensville,Ontario
|
ex_usb_serial windows 'SERIAL DEMO' driver needed ? |
Posted: Wed Oct 19, 2011 1:52 pm |
|
|
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
|
|
Posted: Wed Oct 19, 2011 2:05 pm |
|
|
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: 9221 Location: Greensville,Ontario
|
|
Posted: Wed Oct 19, 2011 2:19 pm |
|
|
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
|
|
Posted: Wed Oct 19, 2011 2:48 pm |
|
|
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: 9221 Location: Greensville,Ontario
|
|
Posted: Wed Oct 19, 2011 4:08 pm |
|
|
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
|
|
Posted: Wed Oct 19, 2011 7:09 pm |
|
|
Hi Temtronic,
I guess your experience proves that an 'old dog' can learn new tricks !
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: 9221 Location: Greensville,Ontario
|
|
Posted: Wed Oct 19, 2011 8:26 pm |
|
|
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'. |
|
|
|