Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Quick question. (PIC as USB master)

Status
Not open for further replies.

()blivion

Active Member
Is it possible for the PIC18F14K50 or similar device oriented USB PIC to be "tricked" into being a basic hosts if it's done only for specific, and simple devices? Like say writing MSD firmware to attach a USB thumb drive to the PIC for data logging? Or maybe for adding a USB mouse to your project? I goggled the idea and got nothing. And yes, I fully realize they were never intended to do that.
 
No, slaves are much simpler devices than hosts. Some of the 32bit PICs have USB host though.

Most folks have learned to get around it, use an SD card (SPI) instead of USB flash. Or a PS/2 mouse instead of a USB mouse.

If you want to know more; USB complete by Jan Axelson or the FTDI Vinculum IC would offer more insight.
 
Yeah, I figured as much and I really didn't have high of hopes for it. And I knew about the other PIC's already.

But now how about something as brutally simple as a direct 1:1 com converter, Like USB to X back to USB? (Like a USB cable extender) And I don't even care if it breaks USB specs, This is hobby project stuff after all.
 
Any thing really.

But for the sake of argument, lets say a WiFi dongle (two way coms), using IR laser modules(may violate laws in some areas) line of sight with PIN diode photo-sensors. Or perhaps a USB web cam (mostly one way coms) on some random RF band.

That’s a few projects I want to be able to do. I could probably think up some more fairly easily.
 
Then don't use USB but instead use RS485 or Ethernet. Do any of those devices you described actually exist in USB form?
 
Last edited:
I considered Ethernet and other consumer products to do what I want. But It usually all ends up coming down to not enough range, or just too expensive for me. Consider these at this link...

**broken link removed**


Or as you said, I could try to buy consumer grade products that already do what I want from standard retailers, However...

1: Typing in "wireless USB extender" in google shopping results in $150-$300 USD for items that are to short a distance.

2: "wireless Ethernet extender" returns either standard WiFi gear and range, or stuff that’s also to expensive. (I have a WiFi link and it kinda sux)

3: "wireless web camera" Is mostly the same boat, but to even more of an extreme.

I don't want something measured in feet/meters, I want miles/kilos (almost a mile would be fine for at least one of my projects). And I think It can be done on the cheep with MCU's/DSP's, standard commodity equipment, and a little ingenuity.

I can build a moderately powerful radio in one of the many ham bands that would work for a few bucks, provided there is lots of error correcting done. Or cheat my a$$ off and use some one else s radio band, (the FCC doesn't carry guns ;-) . And the MCU's I have are a buck or two each from DigyKey (What small low pin count devices have USB host ability?). Then the WiFi dongle to go the last few feet is ~$15, or I suppose a wireless Ethernet cable could be done just as well and would be a better connection (I hate 100baseTX's electrical though).

As for a web cam, There are tons of cheep crappy USB ones that you can find every where. Thrift stores have them for like ~$3 some times. And the circuits are light and small, which would be perfect for my RC projects. I have a Labtec one right now no bigger than a stamp that was $20 at WalMart new.

The one project I wanted to do using the Lasers would be for a point to point high speed LAN connection. And is in an area that I can't lay wires down. I have plans some one made for a LAN laser pointer based link, but honestly I doubt they even really work. So I wanted to come up with something of my own.

An other killer project would be a wireless thumbstick with an AMAZING range. Then you could in theory access it remotely from inside a high security building (just an example, nothing planed... OK!?) and move on to it files your not supposed to have or get. With out bringing in the thumbstick it's self. Not really a practical example, but it's uses can be figured out after it has been made.

And what this all comes down to. These projects haven't been done and published as far as I have seen, or at least aren’t done by many. And I have the parts to do it if it can be done. Because I like to try to achieve new goals as opposed to just following already made, step-by-step project like what you would find on instructables and else where. Not that there is any thing wrong with that.
 
I don't remember the username here, but he has had quite a bit of success with the MAX3421E and has made a USB host shield for the Arduino.

Circuits@Home
 
I modified this thread title to reflect its nature. In the future please use meaningful titles.

I don't see how the new title indicates a post by someone who has absolutely no regard for FCC regulations... Based on careless and irresponsible comments in post #7 I would recommend deleting the thread and banning this individual from the Forum...
 
I don't see how the new title indicates a post by someone who has absolutely no regard for FCC regulations... Based on careless and irresponsible comments in post #7 I would recommend deleting the thread and banning this individual from the Forum...
The new title reflects the original post. I do not care for what he is suggesting and urge others to stay within the bounds as set by the agencies that regulate radio.

How did I do ?
 
Sorry every one, for some reason I stopped getting messages letting me know there were new posts here so I assumed there weren’t any.

I modified this thread title to reflect its nature. In the future please use meaningful titles.

Thank You

My bad, yeah something along the lines of "USB device PIC's as USB Hosts" would have been my second choice for a title. And now we are even kinda getting off topic from that discussion. I'll try to bring the conversation back in that direction. Sorry again.

What is the budget in terms of time and money ?

It's my hobby, so more or less unlimited time (there is no dead line) but very limited budget I would say. Every penny I save will end up going to some other project or making these ones better so the budget should be as cheep as possible. There are obvious limits, it's not going to be free of course. but lets say $50~100 per project for now. With the wiggle room being on the lower side of the price.

I don't remember the username here, but he has had quite a bit of success with the MAX3421E and has made a USB host shield for the Arduino.

Circuits@Home

That’s a good link, will read all those projects a few times for sure. The MAX3421E is cool. Thing is the PIC18F13K50 and similar PIC's already have a low level USB hardware "engine" on the chip it's self. So adding another one (that’s basically what the MAX3421E is) wouldn't solve this problem I don't think. Thing is these PIC's were intended to be devices only. BUT the hard ware is still the same, so in theory it should be do able.

What needs to be done is firmware needs to be written for the PIC it's self that supports "THE BARE MINIMUM" of host functionality and only for each projects specific device. Like a cut down, reworked MSD driver for the wireless thumb drive. The problem as would be expected is that "USB host" is much more complex in comparison to "USB device" and MCU's in general. And these PIC's don't have very much flash or CPU speed. But I still think it can be done with some tight ninja ASM coding. Even if all the chip does is just convert USB to some other communication medium. In that case the MAX3421E would be a great part to play with. You would still need a glue chip to convert the SPI to whatever, but there are a lot better cheep SPI PIC's on the market. I would however like to work with what I have so as to be most efficient with my money and time. Why spend $20 and wait for a week when it *MAY* be doable with what I already have?

Anyway, If blue says that it can't be done then I will believe it and consider the discussion over. I kinda figured it was guna be bust form the get go, which is why the title was called "Quick question". Because I was willing to accept a quick yes or no and be done with it. So unless any one has any thing to add along the lines of "Wait!!! It can be done maybe!!!" then this thread can be closed as far as I'm concerned. And thanks for all the help.
 
It can be done with several 32bit (MIPS) PICs.

The MAX3421E is $13 and still needs a microcontroller (Digikey)

PIC32MX420F032H-40I/MR is $6 and includes everything you need.

Look for OTG (On The Go) **broken link removed**
 
Last edited:
I don't see how the new title indicates a post by someone who has absolutely no regard for FCC regulations... Based on careless and irresponsible comments in post #7 I would recommend deleting the thread and banning this individual from the Forum...

Please relax friend, I fully abide by the FCC rules and regulations. My comments were intended as humor nothing more. I don't do any thing illegal, and am not suggesting that any one else do any thing illegal. I'm sorry if my joking went a little over the edge. Please forgive me (T.T)
 
Status
Not open for further replies.

Latest threads

Back
Top