Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to Write a driver for an MCU?

Status
Not open for further replies.

seadolphine2000

Advanced Member level 3
Joined
Apr 12, 2005
Messages
881
Helped
122
Reputation
244
Reaction score
86
Trophy points
1,308
Activity points
7,372
pic18f4550 cusb

Hi,...

Can anyone help me in writing a driver for a USB Bluetooth dongle.?

I want to upload this driver on a microcontroller.

The whole idea is I want to connect a Bluetooth dongle to an MCU in order to communicate with my cell phone via Bluetooth.

Can anyone help.?

Thanks very much for your time.
 

dipal_z

Full Member level 5
Joined
Apr 21, 2005
Messages
278
Helped
37
Reputation
74
Reaction score
7
Trophy points
1,298
Location
India
Activity points
3,008
mcu+driver+purpose

First you need to choose a microcontroller which provide USB Host port. AFAIK you can find this kind of support on high end microcontollers only and its not possible to provide a generic solution until you finalize the micorcontroller.
 

seadolphine2000

Advanced Member level 3
Joined
Apr 12, 2005
Messages
881
Helped
122
Reputation
244
Reaction score
86
Trophy points
1,308
Activity points
7,372
writing driver for microcontroller

Thanks very much for your reply, I was waiting for a long time.

The microcontroller will be one of these:
PIC18F2455, PIC18F2550, PIC18F4455, PIC18F4550.

The bluetooth dongle is from Billionton
https://www.billionton.com.tw/website/product/doc/GUBTCR41.htm

Unfortunately, this USB bluetooth dongle is the only model available where I live.

Thanks very much for your help.
 

budhy

Advanced Member level 3
Joined
Oct 21, 2006
Messages
828
Helped
218
Reputation
436
Reaction score
32
Trophy points
1,308
Location
Indonesia
Activity points
5,230
how to write mcu drivers

dipal_z wrote:
First you need to choose a microcontroller which provide USB Host port.

seadolphine2000 wrote:
The microcontroller will be one of these:
PIC18F2455, PIC18F2550, PIC18F4455, PIC18F4550.

Are you sure those microcontroller provide USB Host port? I don't think so
 

dipal_z

Full Member level 5
Joined
Apr 21, 2005
Messages
278
Helped
37
Reputation
74
Reaction score
7
Trophy points
1,298
Location
India
Activity points
3,008
how to write a driver?

budhy said:
Are you sure those microcontroller provide USB Host port? I don't think so
I agree with you Budhy, here is the quote from datasheet where it clearly mentions that USB host is required on other side.
The PIC18FX455/X550 device family contains a
full-speed and low-speed compatible USB Serial Interface
Engine (SIE) that allows fast communication
between any USB host and the PIC® microcontroller.
 

seadolphine2000

Advanced Member level 3
Joined
Apr 12, 2005
Messages
881
Helped
122
Reputation
244
Reaction score
86
Trophy points
1,308
Activity points
7,372
how to make usb host using pic18f4455

Thanks to all of you guys,..

I know that the MCU's I mentioned above don't have USB host controllers. That's why I'll use the MAX3421E or any equivalent. But, I'll still need to write the driver of the USB Bluetooth dongle I have.

Thanks again for your time.
 

yali

Newbie level 6
Joined
Dec 31, 2006
Messages
12
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,281
Activity points
1,346
writing mcu code

if you want to write a usb driver for PIC18FXXXX you can use Mikroc compiler it make a simple driver for this MCUs but this compiler creat an slave driver for you and you need a host driver too. i think this site will help you for writing the host driver
www.usb.org
 

seadolphine2000

Advanced Member level 3
Joined
Apr 12, 2005
Messages
881
Helped
122
Reputation
244
Reaction score
86
Trophy points
1,308
Activity points
7,372
max3421e bluetooth

Yali,...

Thanks very much for your help. I'm know about the host/peripheral issue. I'll use the MAX3421E as a host but I still need the driver of the Bluetooth dongle.

I working now on the MikroC compiler, However it will take some time to get used to it.

Thanks again my friend for your help.

I found that the MikroBasic 5.0.0.2 have the same USB_HID library that MikroC have.
 

seadolphine2000

Advanced Member level 3
Joined
Apr 12, 2005
Messages
881
Helped
122
Reputation
244
Reaction score
86
Trophy points
1,308
Activity points
7,372
Attached here is the code I found for a USB connection however, this code is written for an HID.
Also, it's only the intialization, there's nothing mentioned about how to write a driver.

I have question:
The code says that there's a sequence of numbers is sent to the PC via USB cable. How will I receive this sequence? I can I check it?

Thanks very much for your help.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top