terval
Newbie
Offline
Posts: 27
Thank You
-Given: 15
-Receive: 6
|
 |
« on: November 20, 2007, 08:52:12 20:52 » |
|
any one can help me on :
i need usb connectivity to pc (pic18f2550 or pic18f4550) to everything ,port(x), i2c, serial ,adc ?
any idea or soft.
Best regards to all.
|
|
|
Logged
|
|
|
|
8K51
Junior Member

Offline
Posts: 80
Thank You
-Given: 86
-Receive: 40
|
 |
« Reply #1 on: November 20, 2007, 09:00:33 21:00 » |
|
Hi If you don't want to developp your own firmware UBW board is an answer : http://greta.dhs.org/UBW/Regards
|
|
|
Logged
|
|
|
|
FlvAnm
Newbie
Offline
Posts: 15
Thank You
-Given: 29
-Receive: 3
|
 |
« Reply #2 on: November 20, 2007, 09:09:50 21:09 » |
|
Perhaps this link ( http://www.alanmacek.com/usb/) - USB and PIC Microprocessors 16C745 and 18F2455 could be usefull. it's quite old, but interesting. Best Regards, FLV
|
|
|
Logged
|
|
|
|
microled
Newbie
Offline
Posts: 11
Thank You
-Given: 15
-Receive: 2
|
 |
« Reply #3 on: November 20, 2007, 09:40:12 21:40 » |
|
If you check the picbasic forum you will find all the answers you need, plus quite a few more!!
|
|
|
Logged
|
|
|
|
frasenci
Translator
Active Member
 
Offline
Posts: 171
Thank You
-Given: 142
-Receive: 85
|
 |
« Reply #4 on: November 21, 2007, 02:32:51 02:32 » |
|
@terval
All suggestions given already are ok but maybe you get confused analyzing already made examples that are more complicated than needed. I would say , try to keep it always as simple as the proyect at hands permits.
1.- First establish a clean link between PIC and Pc , that you can accomplish easy with CDC ( USb Serial ) or HID ( Both supported by MS Visual on Pc and BASIC for PIC )
2.- Develop an communication code to talk between both platforms wich includes the commands and type of info you want to share.
3.- Write the code to handle the messages on both sides based on 2.-
For example , one message coming from Pc to PIC could be the string "AAAC01XXX" where AAA = Flag to announce message start , C01 = Command for PIC to sample analog port 1 , XXX = Flag to indicate termination off message. To this , PIC could answer with another message "AAAV010985XXX" . In this mesage , AAA and XXX can have the same meaning as before and V010985 will indicate V01 = value of variable 01 , 0985 = value 985
On Pc side it will be easy to manage the polling of serial port with function OnCom() ( prescence of data on com port ). On PIC side it can be more tricky but you will soon find a way to poll the port with needed timing and let the code handle the messages from there on.
Hope this simple description helps you as a very basic startpoint For CDC and HID see examples in Proteus,Proton and PBPro
Greetings
|
|
|
Logged
|
|
|
|
terval
Newbie
Offline
Posts: 27
Thank You
-Given: 15
-Receive: 6
|
 |
« Reply #5 on: November 27, 2007, 08:12:22 20:12 » |
|
Hi frasenci
Now i understand much more about, using your information,and it seem“s not so dificult,this protocol looks an easy way to work.
regards
|
|
|
Logged
|
|
|
|
aj49m
Active Member
 
Offline
Posts: 102
Thank You
-Given: 36
-Receive: 41
|
 |
« Reply #6 on: November 27, 2007, 08:57:58 20:57 » |
|
Certainly class CDC is easier for working with transfer data usb, Programming PC Simplifies
|
|
|
Logged
|
|
|
|
drovik
Newbie
Offline
Posts: 9
Thank You
-Given: 1
-Receive: 5
|
 |
« Reply #7 on: November 28, 2007, 11:06:17 11:06 » |
|
www.microchip.com  or Proteus 7.2 (samples CDC, HID, GeneralUSB with temperature sensor for 18F4550)
|
|
|
Logged
|
|
|
|
bogdantk
Active Member
 
Offline
Posts: 100
Thank You
-Given: 40
-Receive: 18
|
 |
« Reply #8 on: November 28, 2007, 02:25:19 14:25 » |
|
Hello The easy way is to coonect via the serial port and an FT245R adapter to USB Check http://www.ftdichip.com/Products/FT245R.htmyou will find the driver also it will map the usb to a com port very easy to use
|
|
|
Logged
|
|
|
|
micro_2000
Inactive
Offline
Posts: 3
Thank You
-Given: 28
-Receive: 0
|
 |
« Reply #9 on: November 28, 2007, 07:20:28 19:20 » |
|
Hi.. The FT232R also easy to used as USB to serial converter too. Need not additional external component.
|
|
|
Logged
|
|
|
|
|