I ment post 54!
Sorry for the confusion
I ment post 54!
Sorry for the confusion
-Bert
The glass is not half full or half empty, Its twice as big as needed for the job!
http://foamcasualty.com/ - Warbird R/C scratch building with foam!
Back to your question about speed....
I think it runs at USB speeds....
Universal Serial Bus Features:
• USB V2.0 Compliant
• Low Speed (1.5 Mb/s) and Full Speed (12 Mb/s)
Dave
Always wear safety glasses while programming.
Just tech notes about USB speeds:
http://en.wikipedia.org/wiki/Universal_Serial_BusThe original USB 1.0 specification, which was introduced in January 1996, defined data transfer rates of 1.5 Mbit/s "Low Speed" and 12 Mbit/s "Full Speed". The first widely used version of USB was 1.1, which was released in September 1998. The 12 Mbit/s data rate was intended for higher-speed devices such as disk drives, and the lower 1.5 Mbit/s rate for low data rate devices such as joysticks.
The USB 2.0 specification was released in April 2000 and was standardized by the USB Implementers Forum (USB-IF) at the end of 2001. Hewlett-Packard, Intel, Lucent Technologies (now Alcatel-Lucent), NEC and Philips jointly led the initiative to develop a higher data transfer rate, with the resulting specification achieving 480 Mbit/s, a fortyfold increase over the original USB 1.1 specification.
The USB 3.0 specification was published on 12 November 2008. Its main goals were to increase the data transfer rate (up to 5Gbps), to decrease power consumption, to increase power output, and to be backwards-compatible with USB 2.0. USB 3.0 includes a new, higher speed bus called SuperSpeed in parallel with the USB 2.0 bus. For this reason, the new version is also called SuperSpeed. The first USB 3.0 equipped devices were presented in January 2010.
I don't know whether I'm too dumb or not dumb enough to grasp all the intricacies of CDC but, if I understand it, there are virtual serial port drivers for interfacing on the PC side. When these are used, there's likely to be a slight speed hit as the data needs to be 'translated' from its RS232-ish form before transmitting and the reverse is true when receiving.
This may not be noticed for normal communications but can be readily apparent when doing something like a firmware download which usuall includes short bits of data and CRC which is ACKed or NAKed from the embedded device. Of course, the faster the version of USB, the less this is a big factor.
Last edited by dhouston; - 30th May 2011 at 23:16.
For CDC, baudrate is a meaningless parameter. You can set hyperterminal/vbSerialPort a whatsoever baudrate, the usb engine will emulate a serial communication as fast as it can
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
I'm not talking about transmission speed and I agree that baudrate has little meaning in this context. However, I have had a lot of experience downloading firmware files which might be as big as 64KB and there is a very noticeable difference between sending them via Serial->USB->Serial vs. sending them Serial->Serial with the latter being much faster as a result of the translation that must occur (on both ends). CDC should only need to translate on the PC end but I suspect there will be a significant speed hit never-the-less on certain applications.
True that. CDC is really handy for older software unable to deal with USB, somehow easier to program on both side... but to me, IN 20XX... it still sucks.
I know your arguments... but ...Pure USB for me... all the way.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Steve, when do we get the pure USB for dummies? Both ends, PiC and PC??
-Bert
The glass is not half full or half empty, Its twice as big as needed for the job!
http://foamcasualty.com/ - Warbird R/C scratch building with foam!
USBDemo was a kickstart for many. Time changed, PBP work tad different now, mcHID.dll/MCSP/EasyHid = somehow a dead duck, VB6 is a long time outdated thing, seems Jan Axelson code examples are not for everyone... so yeah I think it's about time.
I know how, I know something rock solid. Keyword: be patient...
(Still, there's LOAD of ressource/ready to go components/lib over the net on the PC side)
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
and I quote:
After spending my weekend searching and reading. I have come to the conclusion there is in fact - tons of examples and ready stuff all over the net. But does this help if one doesn't know where to start? Even bought Jan's book to help me. And it did. Now I assume my weekends work would amount to 30 minuites for someone able to write a picmulticalc. So a quick VB express (cuz it free to all) example passing a byte or 2 back and forth. Nothing more then that as it will overwhelm those who don't get it. ( read as ME ME ME)AAwwww come on guy, don't be lazy
-Bert
The glass is not half full or half empty, Its twice as big as needed for the job!
http://foamcasualty.com/ - Warbird R/C scratch building with foam!
Everyone must start somewhere. Been there done that. I'm not more clever than anybody, but maybe I put more time & effort. I never found a magic potion to know everything and how to do things in a snap.
1) have a project
2) find information, read, digest them
3) try something
4) wash & rinse 'till it works
You CAN'T learn VB (or else) in a day. It take months, years. I learnt the hard way too. The more you do, the more you develop tricks....the easier it gets.
Don't give up!
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Humanity have been created in 7 days (or so) ... this ought to be a huge firmware
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
-Bert
The glass is not half full or half empty, Its twice as big as needed for the job!
http://foamcasualty.com/ - Warbird R/C scratch building with foam!
Keep it for yourself, I'll share a secret with you... I'm a forum addicted guy They are golden opportunities to learn faster... grab someone's problem, work on, find a solution... then someone else post an alternative, observe, wash & rinse.
Again... keep it for yourself
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Hi guys,
can you help me with program USB CDC Communicator on uC PIC18F47J53?
I never use USB, this is my first try.
I tried use the sample code from USB18 (CDC_demo). I tried rewrite the code but without success.
Thx.
Proglem solved:
Must use #congif for PIC.
' USB sample program for PIC18F47J53 CDC serial port emulation
' Requires PBP 2.60 or later
Include "cdc_desc.bas" ' Include the HID descriptors
Define OSC 48
#CONFIG
CONFIG WDTEN = OFF ;WDT disabled (enabled by SWDTEN bit)
CONFIG PLLDIV = 3 ;Divide by 3 (12 MHz oscillator input)
CONFIG STVREN = ON ;stack overflow/underflow reset enabled
CONFIG XINST = OFF ;Extended instruction set disabled
CONFIG CPUDIV = OSC1 ;No CPU system clock divide
CONFIG CP0 = OFF ;Program memory is not code-protected
CONFIG OSC = HSPLL ;HS oscillator, PLL enabled, HSPLL used by USB
CONFIG FCMEN = OFF ;Fail-Safe Clock Monitor disabled
CONFIG IESO = OFF ;Two-Speed Start-up disabled
CONFIG WDTPS = 32768 ;1:32768
CONFIG DSWDTOSC = INTOSCREF ;DSWDT uses INTOSC/INTRC as clock
CONFIG RTCOSC = T1OSCREF ;RTCC uses T1OSC/T1CKI as clock
CONFIG DSBOREN = OFF ;Zero-Power BOR disabled in Deep Sleep
CONFIG DSWDTEN = OFF ;Disabled
CONFIG DSWDTPS = 8192 ;1:8,192 (8.5 seconds)
CONFIG IOL1WAY = OFF ;IOLOCK bit can be set and cleared
CONFIG MSSP7B_EN = MSK7 ;7 Bit address masking
CONFIG WPFP = PAGE_1 ;Write Protect Program Flash Page 0
CONFIG WPEND = PAGE_0 ;Start protection at page 0
CONFIG WPCFG = OFF ;Write/Erase last page protect Disabled
CONFIG WPDIS = OFF ;WPFP[5:0], WPEND, and WPCFG bits ignored
#ENDCONFIG
buffer Var Byte[16]
cnt Var Byte
OSCTUNE.6 = 1 ' Enable PLL for 18F47J50 family
Pause 10
USBInit ' Get USB going
'************************************************* ***************
'* Set PORTA, PORTB, PORTC, PORTD PORTE to input/output *
'************************************************* ***************
TRISA = %00100010 ' Set PORTA to output
TRISB = %00001000 ' Set PORTB to output
TRISC = %00---000 ' Set PORTC to output
PortA = %00000000 ' Set PORTA to 0
PortB = %00000000 ' Set PORTB to 0
PortC = %00000000 ' Set PORTC to 0
PortD = %00000000 ' Set PORTD to 0
PortE = %00000000 ' Set PORTE to 0
'************************************************* ***************
'* SET LCD *
'************************************************* ***************
' Define LCD registers and bits
Define LCD_DREG PORTD
Define LCD_DBIT 4
Define LCD_RSREG PORTB
Define LCD_RSBIT 0
Define LCD_EREG PORTB
Define LCD_EBIT 1
DEFINE LCD_LINES 2
DEFINE LCD_COMMANDUS 1500
DEFINE LCD_DATAUS 50
Pause 1000 ' Wait for LCD to start up
'************************************************* ***************
'* LOOP *
'************************************************* ***************
' Wait for USB input
idleloop:
USBService ' Must service USB regularly
cnt = 16 ' Specify input buffer size
USBIn 3, buffer, cnt, idleloop
' Message received
buffer[0] = "O"
buffer[1] = "K"
buffer[2] = 13
buffer[3] = 10
buffer[4] = 0
outloop:
USBService ' Must service USB regularly
USBOut 3, buffer, 5, outloop
Goto idleloop ' Wait for next buffer
Hi.. I have windows 7 64bit machine... I download the 64_mchpcdc.inf provided by mackrackit...and copy and paste it in the Windows\sysWOW64 folder, I also reboot the machine but I'm getting exclamation icon(CDC - R232 Emulation Demo) in the devices and printers window. What do you think I'm doing bad? Please give advice.
Thanks in advance,
tacbanon
The driver provided with PBP now has 64 bit support added. So you do not need the one I linked to, although it should still work.
I think your problem might be that you copied it to a directory rather than letting the OS install it. Try deleting the file from the sysWOW directory, then do a reboot.
When your project is plugged into your PC windows should bring up the usual dialog asking to install a driver. Do not let windows look for it, point to where the file has been saved to and let windows do the installing. You then should see a virtual com-port in device manager.
Dave
Always wear safety glasses while programming.
Hello macrackit, thank you so much for replying...I got it working now.
Good day,
I have PBP 250_b running on a windows_7 64 bit.
What files are required in my PBP to update it to the 2.60 version and use the USB programs ?
Where could I download them ?
Thanks for helping
Ambrogio
You will have to go to MeLabs website and pay for the upgrade.
Dave
Always wear safety glasses while programming.
Bookmarks