A thought, a photo and a handful of curiosity

 

General project info

Title: Project Gamma - Master USB
Start: 20/07/06

Objective: Serial ports are getting more and more old-fashioned. Furthermore they don't provide much power, which means you have to have an external power-source (in project Alpha I used the data port, which is not really nice (ever seen a device with an extra wire you have to manually insert into your data port just to let it suck in +5v ?). Project goal is kinda vague, apart from learning how to interface in USB. Maybe it'll be a nice goal to be able to remake my remote control reciever into USB. But, I'll be happy when I get a PC and a micro-controller to interact via an USB port (version 1.1 would be fine).

MSD ... - Scribble

By Jason [- 02/05/06 (21:43:36) -]
Just a few notes/remarks while I'm getting acquainted with the Mass Storage Device firmware from microchip. To get this thingy to work with the bootloader firmware, you have to use the rm18F4550.lkr as linker file, but you have to alter this file (I just compared it with the 18F4550.lkr that was originally used for the MSD firmware code). ... (read more)

Stuff

By Jason [- 01/05/06 (12:32:42) -]
Okay, I've got re-acquainted with the whole set-up. I also noticed that I had been testing serial over USB (CDC it is called, don't know where it stands for), simultaniously with A/D conversion tests already.

I got the serial thing really going yesterday (most code was already provided by Microchip, and for the serial part on the PC I re-used some code from project Alpha), although one does need a driver for it, which luckily is provided by Microchip as well. Another disadvantage is that you have to close your PC-program, reset your chip, start your program and press a button on the chip before communication is set up. Any restart from pic or pc-prog requires this whole procedure again. Couldn't this be simplified?? A Challenge! :)

I got to get the A/D conversion to work as well. A usefull class in Borland C++ (TChart) makes it really easy to visualise what's going on. I still feel that there's something (hardware wise) that could improve it. The TChart knowledge will be used in future projects (debugging) as well I foresee!

I also figured that I'd better do the remote control using a 18F2455, which is a smaller chip yet still suitable for the project. I have 2 of those as well (love the Microchip free samples), although not yet with bootloading configuration.

I don't know where to go from here, the A/D part is certainly kinde off-topic for this project (although I do see cool options there as well: imagine a light, humidity and temperature sensor connected to the pc, it should be possible to access the conditions of ones room or garden using mobile phone (WAP->website php->socket to pc at home->serial layer->USB->pic->A/D's).

Instead of rebuilding project Alpha onto USB, I could try and do something with the mass-storage-device protocols. Wouldn't it be cool if you can plug in your chip and obtain some data from it using windows explorer...on every windows XP system around without extra drivers? I think it is, but whether it's usefull? Who knows. Creativity will be the limit.

Other options might be an alternative input (HID) device, or (partly) program my own device drivers (scary), which would literally make the sky the limit. [popup]

Got a long way without posts

By Jason [- 30/04/06 (15:02:53) -]
So at this moment, I'm looking at some project boards all wired up. But what the f*ck am I looking at? (besides the mug of tea to get me through this mess). That's what you get when you wait too long with posting anything. I know in this bunch of mess is a chip that can communicate over USB. It's a microchip 18F4550. I did manage to program it with a bootloader (firmware and computer-upload-software from microchip). Not sure anymore using what program, I think it was winpic800 (luckily I DID save the URLs in a logical manner, finding the program on my harddisk was harder, cause pic-programmers are scattered all over the place!).

I also managed to get it to act as human interface device, whose device drivers are included in XP (writing your own driver is said to be a tough job). If I recall correctly the setup you see here does nothing more than drawing power from the USB port to run and control a stepping motor (ripped from a scanner I think) using a 9V battery (don't expect the USB port to supply endlessly amounts of power :).

I think I'm gonna clean up this mess and try to program it from step 1 onward. Then I think I'll try to let it act as a serial-device over USB. Then the computer software thinks its serial, while its plugged in into USB. This way you can let your pc software communicate with your chip.

From there on, I might remake my remote receiver as USB device. The good thing is the 4550 has a built-in crystal. Saidly this works only on lower frequencies, and you still need one if you want to use USB :(

I'll keep posting here with progress (I hope). BTW: this place helped me out with a lot of steps (fixing the bootloading, emulating a human intervace device) and has lots of other info available! [popup]